Commit 62ffcbbf authored by Reshma Atmaram Bhatawadekar's avatar Reshma Atmaram Bhatawadekar
Browse files

orgstategstin column is added in invoice table.

parent 2e1b98cf
......@@ -295,6 +295,7 @@ Bankdetails is a dictionary will have bankname,accountno., branchname and ifscco
taxstate is a destination sate.
sourcestate is source state from where invoice is initiated.
Structure of a tax field is {productcode:taxrate}
save orgstategstin of sourcestate for organisation.
"""
invoice = Table('invoice',metadata,
Column('invid',Integer,primary_key=True),
......@@ -311,6 +312,7 @@ invoice = Table('invoice',metadata,
Column('icflag',Integer,default=9),
Column('taxstate',UnicodeText),
Column('sourcestate',UnicodeText),
Column('orgstategstin',UnicodeText),
Column('attachment',JSON),
Column('attachmentcount',Integer,default=0),
Column('orderid', Integer,ForeignKey('purchaseorder.orderid')),
......
......@@ -60,6 +60,7 @@ class api_organisation(object):
"""
self.con = eng.connect()
try:
self.con.execute(select([func.count(gkdb.invoice.c.orgstategstin)]))
self.con.execute(select([func.count(gkdb.invoice.c.cess)]))
self.con.execute(select([func.count(gkdb.state.c.statecode)]))
self.con.execute(select([func.count(gkdb.invoice.c.reversecharge)]))
......@@ -79,6 +80,7 @@ class api_organisation(object):
self.con.execute(select(gkdb.organisation.c.billflag))
self.con.execute(select([func.count(gkdb.billwise.c.billid)]))
except:
self.con.execute("alter table invoice add orgstategstin text")
self.con.execute("alter table invoice add cess jsonb")
self.con.execute("alter table product add UNIQUE(productdesc,orgcode)")
self.con.execute("create table state( statecode integer,statename text,primary key (statecode))")
......
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