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
49206f85
Commit
49206f85
authored
Nov 17, 2017
by
Krishnakant Mane
Browse files
Corrected the update reverse charge issue.
parent
814126b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
gkcore/views/api_organisation.py
View file @
49206f85
...
...
@@ -63,7 +63,10 @@ class api_organisation(object):
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
)]))
countResult
=
self
.
con
.
execute
(
select
([
func
.
count
(
gkdb
.
invoice
.
c
.
reversecharge
).
label
(
'revcount'
)]))
countData
=
countResult
.
fetchone
()
if
int
(
countData
[
"revcount"
])
>
0
:
self
.
con
.
execute
(
"update invoice set reversecharge = '0'"
)
self
.
con
.
execute
(
select
(
gkdb
.
organisation
.
c
.
gstin
))
self
.
con
.
execute
(
select
([
func
.
count
(
gkdb
.
invoice
.
c
.
consignee
)]))
self
.
con
.
execute
(
select
([
func
.
count
(
gkdb
.
customerandsupplier
.
c
.
gstin
)]))
...
...
@@ -80,7 +83,6 @@ 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
(
"update invoice set reversecharge = '0'"
)
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)"
)
...
...
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