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 cd2e4c40
authored
Sep 06, 2024
by
Taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
cek va, cek qris double
1 parent
e19b617b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
29 deletions
esipkd/views/rpc.py
esipkd/views/rpc.py
View file @
cd2e4c4
...
...
@@ -304,21 +304,6 @@ def create_qris(request, data):
cek
=
cekqris
(
dt_qris
,
request
,
response
=
True
)
if
cek
:
raise
custom_error
(
code
=-
1
,
message
=
cek
)
cekQr
=
DBSession
.
query
(
BJBQRIS
)
.
filter
(
BJBQRIS
.
invoice_no
==
data
[
'kd_bayar'
])
.
first
()
if
cekQr
and
cekQr
.
expired_date
>
datetime
.
now
()
and
cekQr
.
status
in
[
'0'
,
'1'
]:
dt_qris
=
dict
(
client_type
=
cekQr
.
client_type
,
product_code
=
cekQr
.
product_code
,
invoice_no
=
cekQr
.
invoice_no
,
description
=
cekQr
.
description
,
customer_name
=
cekQr
.
customer_name
,
customer_email
=
cekQr
.
customer_email
and
cekQr
.
customer_email
or
'-'
,
customer_phone
=
cekQr
.
customer_phone
and
cekQr
.
customer_phone
or
'-'
,
expired_date
=
ymdhms
(
datetime
.
combine
(
cekQr
.
expired_date
,
time
(
20
,
59
,
59
))),
amount
=
cekQr
.
amount
,
qrcode
=
cekQr
.
qrcode
,
qris_id
=
cekQr
.
va_number
)
return
dict
(
code
=
0
,
message
=
"Success Create Qris"
,
data
=
dt_qris
)
row
=
DBSession
.
query
(
ARInvoice
.
id
.
label
(
'id'
),
ARInvoice
.
jumlah
.
label
(
'jumlah'
),
...
...
@@ -409,20 +394,6 @@ def create_va(request, data):
cek
=
cekva
(
dt_va
,
request
,
response
=
True
)
if
cek
:
raise
custom_error
(
code
=-
1
,
message
=
cek
)
cekVa
=
DBSession
.
query
(
BJBVA
)
.
filter
(
BJBVA
.
invoice_no
==
data
[
'kd_bayar'
])
.
first
()
if
cekVa
and
cekVa
.
expired_date
>
datetime
.
now
()
and
cekVa
.
status
in
[
'0'
,
'1'
]:
dt_va
=
dict
(
client_type
=
cekVa
.
client_type
,
product_code
=
cekVa
.
product_code
,
invoice_no
=
cekVa
.
invoice_no
,
description
=
cekVa
.
description
,
customer_name
=
cekVa
.
customer_name
,
customer_email
=
cekVa
.
customer_email
and
cekVa
.
customer_email
or
'-'
,
customer_phone
=
cekVa
.
customer_phone
and
cekVa
.
customer_phone
or
'-'
,
expired_date
=
ymdhms
(
datetime
.
combine
(
cekVa
.
expired_date
,
time
(
20
,
59
,
59
))),
amount
=
cekVa
.
amount
,
va_number
=
cekVa
.
va_number
)
return
dict
(
code
=
0
,
message
=
"Success Create Va"
,
data
=
dt_va
)
row
=
DBSession
.
query
(
ARInvoice
.
id
.
label
(
'id'
),
ARInvoice
.
jumlah
.
label
(
'jumlah'
),
...
...
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