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
Hide 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):
cekqris
=
DBSession
.
query
(
BJBQRIS
)
.
\
filter
(
BJBQRIS
.
invoice_no
==
values
[
'invoice_no'
],
BJBQRIS
.
expired_date
>
datetime
.
now
(),
BJBQRIS
.
status
.
in_
([
'0'
,
'1'
]))
.
first
()
BJBQRIS
.
status
.
in_
([
'0'
]))
.
first
()
if
cekqris
:
msg
=
'BJBQRIS No. Billing
%
s sudah ada.'
%
cekqris
.
va_number
if
not
response
:
...
...
esipkd/views/bjb_va.py
View file @
a5b4e35
...
...
@@ -249,7 +249,7 @@ def cekva(values,request, response=False):
cekva
=
DBSession
.
query
(
BJBVA
)
.
\
filter
(
BJBVA
.
invoice_no
==
values
[
'invoice_no'
],
BJBVA
.
expired_date
>
datetime
.
now
(),
BJBVA
.
status
.
in_
([
'0'
,
'1'
]))
.
first
()
BJBVA
.
status
.
in_
([
'0'
]))
.
first
()
if
cekva
:
msg
=
'BJBVA No. VA
%
s sudah ada.'
%
cekva
.
va_number
if
not
response
:
...
...
@@ -391,7 +391,10 @@ class view(object):
controls
=
form
.
validate
(
controls
)
except
ValidationFailure
as
e
:
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
:
request
.
session
.
flash
(
'BJBVA No.
%
s sudah ditambahkan.'
%
save
.
va_number
)
else
:
...
...
esipkd/views/rpc.py
View file @
a5b4e35
...
...
@@ -109,7 +109,7 @@ def set_invoice(request, data):
unit
=
Unit
.
get_by_id
(
values
[
'unit_id'
])
if
not
unit
:
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
rek
=
Rekening
.
get_by_kode
(
values
[
'rek_kode'
])
if
not
rek
:
...
...
@@ -120,7 +120,9 @@ def set_invoice(request, data):
for
v
in
values
:
v
=
v
.
strip
()
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
.
status_bayar
==
1
:
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