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 10275c71
authored
Oct 25, 2022
by
taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
penambahan create va dan create qris epap
1 parent
38bbc273
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
esipkd/views/pap.py
esipkd/views/pap.py
View file @
10275c7
...
...
@@ -15,6 +15,10 @@ from ..models import (DBSession)
from
..models.isipkd
import
(
Pap
)
from
..models.informix
import
EngInformix
from
.bjb_va
import
rpc_params
,
BJBVA
from
.bjb_qris
import
BJBQRIS
from
..tools
import
ymd
,
dmy
,
ymdhms
,
dmyhms
,
dmy_to_date
SESS_ADD_FAILED
=
'user add failed'
SESS_EDIT_FAILED
=
'user edit failed'
...
...
@@ -349,6 +353,47 @@ def view_edit(request):
return
HTTPFound
(
location
=
request
.
route_url
(
'pap-edit'
,
nr
=
row
.
npwpd
,
nk
=
row
.
m_pjk_bln
,
em
=
row
.
m_pjk_thn
))
elif
'createva'
in
request
.
POST
:
val
=
dict
(
request
.
POST
.
items
())
val
.
update
(
dict
(
client_type
=
3
,
invoice_no
=
val
[
'kd_bayar'
],
product_code
=
98
,
description
=
val
[
'keterangan'
],
customer_name
=
val
[
'nm_perus'
],
customer_email
=
"-"
,
customer_phone
=
"-"
,
expired_date
=
ymdhms
(
datetime
.
now
()),
))
val
[
'amount'
]
=
(
val
[
'bea_pok_pjk'
]
+
val
[
'bea_den_pjk'
])
row
=
BJBVA
.
create_va
(
val
,
rpc_params
())
if
row
:
request
.
session
.
flash
(
'BJBVA No.
%
s sudah ditambahkan.'
%
row
.
va_number
)
else
:
request
.
session
.
flash
(
'BJBVA gagal ditambahkan.'
)
elif
'createqris'
in
request
.
POST
:
val
=
dict
(
request
.
POST
.
items
())
val
.
update
(
dict
(
client_type
=
3
,
invoice_no
=
val
[
'kd_bayar'
],
product_code
=
98
,
description
=
val
[
'keterangan'
],
customer_name
=
val
[
'nm_perus'
],
customer_email
=
"-"
,
customer_phone
=
"-"
,
expired_date
=
ymdhms
(
datetime
.
now
()),
))
val
[
'amount'
]
=
(
val
[
'bea_pok_pjk'
]
+
val
[
'bea_den_pjk'
])
row
=
BJBQRIS
.
create_va
(
val
,
rpc_params
())
if
row
:
request
.
session
.
flash
(
'BJBQRIS No.
%
s sudah ditambahkan.'
%
row
.
va_number
)
else
:
request
.
session
.
flash
(
'BJBQRIS gagal ditambahkan.'
)
return
route_list
(
request
)
elif
SESS_EDIT_FAILED
in
request
.
session
:
return
session_failed
(
request
,
SESS_EDIT_FAILED
)
...
...
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