Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Taufik Yulianto
/
esipkd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a5b4e353
authored
Oct 08, 2024
by
Taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update va, qris, no_skrd tidak bisa update jumlah
1 parent
6921da0c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
esipkd/views/bjb_qris.py
esipkd/views/bjb_va.py
esipkd/views/rpc.py
esipkd/views/bjb_qris.py
View file @
a5b4e35
...
@@ -251,7 +251,7 @@ def cekqris(values,request, response=False):
...
@@ -251,7 +251,7 @@ def cekqris(values,request, response=False):
cekqris
=
DBSession
.
query
(
BJBQRIS
)
.
\
cekqris
=
DBSession
.
query
(
BJBQRIS
)
.
\
filter
(
BJBQRIS
.
invoice_no
==
values
[
'invoice_no'
],
filter
(
BJBQRIS
.
invoice_no
==
values
[
'invoice_no'
],
BJBQRIS
.
expired_date
>
datetime
.
now
(),
BJBQRIS
.
expired_date
>
datetime
.
now
(),
BJBQRIS
.
status
.
in_
([
'0'
,
'1'
]))
.
first
()
BJBQRIS
.
status
.
in_
([
'0'
]))
.
first
()
if
cekqris
:
if
cekqris
:
msg
=
'BJBQRIS No. Billing
%
s sudah ada.'
%
cekqris
.
va_number
msg
=
'BJBQRIS No. Billing
%
s sudah ada.'
%
cekqris
.
va_number
if
not
response
:
if
not
response
:
...
...
esipkd/views/bjb_va.py
View file @
a5b4e35
...
@@ -249,7 +249,7 @@ def cekva(values,request, response=False):
...
@@ -249,7 +249,7 @@ def cekva(values,request, response=False):
cekva
=
DBSession
.
query
(
BJBVA
)
.
\
cekva
=
DBSession
.
query
(
BJBVA
)
.
\
filter
(
BJBVA
.
invoice_no
==
values
[
'invoice_no'
],
filter
(
BJBVA
.
invoice_no
==
values
[
'invoice_no'
],
BJBVA
.
expired_date
>
datetime
.
now
(),
BJBVA
.
expired_date
>
datetime
.
now
(),
BJBVA
.
status
.
in_
([
'0'
,
'1'
]))
.
first
()
BJBVA
.
status
.
in_
([
'0'
]))
.
first
()
if
cekva
:
if
cekva
:
msg
=
'BJBVA No. VA
%
s sudah ada.'
%
cekva
.
va_number
msg
=
'BJBVA No. VA
%
s sudah ada.'
%
cekva
.
va_number
if
not
response
:
if
not
response
:
...
@@ -391,7 +391,10 @@ class view(object):
...
@@ -391,7 +391,10 @@ class view(object):
controls
=
form
.
validate
(
controls
)
controls
=
form
.
validate
(
controls
)
except
ValidationFailure
as
e
:
except
ValidationFailure
as
e
:
return
dict
(
form
=
form
)
return
dict
(
form
=
form
)
save
=
BJBVA
.
update_va
(
dict
(
controls
),
row
,
rpc_params
())
c
=
dict
(
controls
)
c
.
update
({
'expired_date'
:
row
.
expired_date
})
save
=
BJBVA
.
update_va
(
c
,
row
,
rpc_params
())
if
save
:
if
save
:
request
.
session
.
flash
(
'BJBVA No.
%
s sudah ditambahkan.'
%
save
.
va_number
)
request
.
session
.
flash
(
'BJBVA No.
%
s sudah ditambahkan.'
%
save
.
va_number
)
else
:
else
:
...
...
esipkd/views/rpc.py
View file @
a5b4e35
...
@@ -109,7 +109,7 @@ def set_invoice(request, data):
...
@@ -109,7 +109,7 @@ def set_invoice(request, data):
unit
=
Unit
.
get_by_id
(
values
[
'unit_id'
])
unit
=
Unit
.
get_by_id
(
values
[
'unit_id'
])
if
not
unit
:
if
not
unit
:
return
custom_error
(
-
1
,
'Unit id {} not found, contact admin'
.
format
(
values
[
'unit_id'
]))
return
custom_error
(
-
1
,
'Unit id {} not found, contact admin'
.
format
(
values
[
'unit_id'
]))
values
[
'unit_kode'
]
=
unit
.
id
values
[
'unit_kode'
]
=
unit
.
kode
values
[
'unit_nama'
]
=
unit
.
nama
values
[
'unit_nama'
]
=
unit
.
nama
rek
=
Rekening
.
get_by_kode
(
values
[
'rek_kode'
])
rek
=
Rekening
.
get_by_kode
(
values
[
'rek_kode'
])
if
not
rek
:
if
not
rek
:
...
@@ -120,7 +120,9 @@ def set_invoice(request, data):
...
@@ -120,7 +120,9 @@ def set_invoice(request, data):
for
v
in
values
:
for
v
in
values
:
v
=
v
.
strip
()
v
=
v
.
strip
()
row_invoice
=
DBSession
.
query
(
ARInvoice
)
.
\
row_invoice
=
DBSession
.
query
(
ARInvoice
)
.
\
filter
(
ARInvoice
.
no_skrd
==
values
[
'no_skrd'
])
.
first
()
filter
(
ARInvoice
.
no_skrd
==
values
[
'no_skrd'
],
ARInvoice
.
jumlah
==
values
[
'jumlah'
],
ARInvoice
.
unit_id
==
values
[
'unit_id'
])
.
first
()
if
row_invoice
:
if
row_invoice
:
if
row_invoice
.
status_bayar
==
1
:
if
row_invoice
.
status_bayar
==
1
:
raise
JsonRpcBillAllreadyPaidError
raise
JsonRpcBillAllreadyPaidError
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment