Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sakshi Agrawal
gkcore
Commits
62ffcbbf
Commit
62ffcbbf
authored
Nov 08, 2017
by
Reshma Atmaram Bhatawadekar
Browse files
orgstategstin column is added in invoice table.
parent
2e1b98cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
gkcore/models/gkdb.py
View file @
62ffcbbf
...
...
@@ -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'
)),
...
...
gkcore/views/api_organisation.py
View file @
62ffcbbf
...
...
@@ -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))"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment