Commit fd4acf04 authored by Prajkta_Patkar's avatar Prajkta_Patkar
Browse files

corrected data type in gkupgrade

parent 7040de9d
......@@ -802,7 +802,7 @@ The bills grid calld gkresult will return a list as it's value.
if authDetails['auth'] == False:
return {"gkstatus":enumdict["UnauthorisedAccess"]}
else:
try:
# try:
self.con = eng.connect()
dataset = self.request.json_body
invid = dataset["invid"]
......@@ -855,10 +855,10 @@ The bills grid calld gkresult will return a list as it's value.
dcdetails["gostate"] = goname["state"]
dcdetails["goaddr"] = goname["goaddr"]
return {"gkstatus":enumdict["Success"], "gkresult": items, "delchal": dcdetails}
except:
return {"gkstatus":enumdict["ConnectionFailed"]}
finally:
self.con.close()
# except:
# return {"gkstatus":enumdict["ConnectionFailed"]}
# finally:
# self.con.close()
'''This method gives list of invoices. with all details of invoice.
This method will be used to see report of list of invoices.
Input parameters are: flag- 0=all invoices, 1=sales invoices, 2=purchase invoices
......
......@@ -119,15 +119,15 @@ class api_organisation(object):
self.con.execute("alter table invoice drop column cancelflag,drop column canceldate")
# this is to clean null and empty values during old vat based invoices
self.con.execute("update invoice set taxstate = null where taxstate = '' or taxstate = 'none'")
self.con.execute("alter table invoice add sourcestate text ,add discount jsonb ,add taxflag integer default 22, add reversecharge text, add bankdetails jsonb,add transportationmode text,add vehicleno text,add dateofsupply timestamp")
self.con.execute("alter table invoice add consignee jsonb, add sourcestate text ,add discount jsonb ,add taxflag integer default 22, add reversecharge text, add bankdetails jsonb,add transportationmode text,add vehicleno text,add dateofsupply timestamp")
self.con.execute("update invoice set column taxflag = 22 ")
self.con.execute("alter table delchal drop column issuerid")
self.con.execute("ALTER TABLE delchal DROP CONSTRAINT delchal_custid_fkey, ADD CONSTRAINT delchal_custid_fkey FOREIGN KEY (custid) REFERENCES customerandsupplier(custid)")
self.con.execute("ALTER TABLE invoice DROP CONSTRAINT invoice_custid_fkey, ADD CONSTRAINT invoice_custid_fkey FOREIGN KEY (custid) REFERENCES customerandsupplier(custid)")
self.con.execute("alter table organisation add gstin text")
self.con.execute("alter table organisation add gstin jsonb")
self.con.execute("alter table product alter specs drop not null,alter uomid drop not null")
self.con.execute("alter table invoice add consignee jsonb")
self.con.execute("alter table customerandsupplier add gstin text")
#self.con.execute("alter table invoice add consignee jsonb")
self.con.execute("alter table customerandsupplier add gstin jsonb")
self.con.execute("alter table customerandsupplier add UNIQUE(orgcode,custname,gstin)")
self.con.execute("alter table product add gsflag integer")
self.con.execute("update product set gsflag = 7")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment