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 bf413cdb
authored
Aug 30, 2024
by
Taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaiki menu qris, va
1 parent
469ed17b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
esipkd/views/bjb_qris.py
esipkd/views/bjb_va.py
esipkd/views/bjb_qris.py
View file @
bf413cd
...
...
@@ -249,7 +249,9 @@ def id_expired(request):
def
cekqris
(
values
,
request
,
response
=
False
):
cekqris
=
DBSession
.
query
(
BJBQRIS
)
.
\
filter
(
BJBQRIS
.
invoice_no
==
values
[
'invoice_no'
],
BJBQRIS
.
expired_date
>
datetime
.
now
())
.
first
()
filter
(
BJBQRIS
.
invoice_no
==
values
[
'invoice_no'
],
BJBQRIS
.
expired_date
>
datetime
.
now
(),
BJBQRIS
.
status
.
in_
([
'0'
,
'1'
]))
.
first
()
if
cekqris
:
msg
=
'BJBQRIS No. Billing
%
s sudah ada.'
%
cekqris
.
va_number
if
not
response
:
...
...
@@ -306,7 +308,8 @@ class view(object):
self
.
tahun
=
'tahun'
in
self
.
params
and
self
.
params
[
'tahun'
]
or
self
.
tahun
self
.
ses
[
'tahun'
]
=
self
.
tahun
@view_config
(
route_name
=
'bjbqris'
,
renderer
=
'templates/bjbqris/list.pt'
)
@view_config
(
route_name
=
'bjbqris'
,
renderer
=
'templates/bjbqris/list.pt'
,
permission
=
'read'
)
def
view_list
(
self
):
return
dict
()
...
...
esipkd/views/bjb_va.py
View file @
bf413cd
...
...
@@ -247,7 +247,9 @@ def id_expired(request):
def
cekva
(
values
,
request
,
response
=
False
):
cekva
=
DBSession
.
query
(
BJBVA
)
.
\
filter
(
BJBVA
.
invoice_no
==
values
[
'invoice_no'
],
BJBVA
.
expired_date
>
datetime
.
now
())
.
first
()
filter
(
BJBVA
.
invoice_no
==
values
[
'invoice_no'
],
BJBVA
.
expired_date
>
datetime
.
now
(),
BJBVA
.
status
.
in_
([
'0'
,
'1'
]))
.
first
()
if
cekva
:
msg
=
'BJBVA No. VA
%
s sudah ada.'
%
cekva
.
va_number
if
not
response
:
...
...
@@ -304,7 +306,8 @@ class view(object):
self
.
tahun
=
'tahun'
in
self
.
params
and
self
.
params
[
'tahun'
]
or
self
.
tahun
self
.
ses
[
'tahun'
]
=
self
.
tahun
@view_config
(
route_name
=
'bjbva'
,
renderer
=
'templates/bjbva/list.pt'
)
@view_config
(
route_name
=
'bjbva'
,
renderer
=
'templates/bjbva/list.pt'
,
permission
=
'read'
)
def
view_list
(
self
):
return
dict
()
...
...
@@ -338,8 +341,6 @@ class view(object):
inv
=
q_inv
(
val
[
'invoice_no'
])
.
first
()
pokok
,
denda
=
calculate_tagihan
(
dict
(
pokok
=
inv
.
jumlah
,
jatuh_tempo
=
inv
.
jatuh_tempo
))
val
[
'amount'
]
=
(
pokok
+
denda
)
print
(
"======================="
)
print
(
val
)
row
=
BJBVA
.
create_va
(
val
,
rpc_params
())
if
row
:
request
.
session
.
flash
(
'BJBVA No.
%
s sudah ditambahkan.'
%
row
.
va_number
)
...
...
@@ -353,7 +354,6 @@ class view(object):
if
row_invoice
!=
0
:
form
=
get_form
(
request
,
AddParamsSchema
)
pokok
,
denda
=
calculate_tagihan
(
dict
(
pokok
=
row_invoice
.
jumlah
,
jatuh_tempo
=
row_invoice
.
jatuh_tempo
))
print
(
"++++++++++++++++++++++++++"
,
str
(
row_invoice
.
description
))
values
=
{}
values
[
'invoice_no'
]
=
str
(
row_invoice
.
kode
)
values
[
'description'
]
=
str
(
row_invoice
.
description
)
...
...
@@ -362,8 +362,7 @@ class view(object):
values
[
'customer_phone'
]
=
row_invoice
.
subjek_phone
and
row_invoice
.
subjek_phone
or
'-'
values
[
'expired_date'
]
=
ymdhms
(
datetime
.
combine
(
date
.
today
(),
time
(
20
,
59
,
59
)))
values
[
'amount'
]
=
(
pokok
+
denda
)
print
(
'---------------------------------'
,
values
)
form
.
set_appstruct
(
values
)
return
dict
(
form
=
form
,
invoice_no
=
params
[
'no_invoice'
])
else
:
...
...
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