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 cd456be6
authored
Feb 26, 2024
by
taufikyu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perbaiki bjb qris, bjb va
1 parent
3571b142
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
13 additions
and
28 deletions
esipkd/views/arinvoice.py
esipkd/views/arinvoice.py.old
esipkd/views/arinvoice_b.py
esipkd/views/arinvoice_b.py.old
esipkd/views/arinvoice_ws.py
esipkd/views/arsspd.py
esipkd/views/arsspd.py.20180628
esipkd/views/artbp.py
esipkd/views/artbp.py.old
esipkd/views/bjb_qris.py
esipkd/views/bjb_va.py
esipkd/views/fast_pay.py
esipkd/views/public.py
esipkd/views/sptpd_wapu.py
esipkd/views/arinvoice.py
View file @
cd456be
...
...
@@ -277,7 +277,6 @@ def save(request, values, row=None):
ARInvoice
.
wilayah_id
==
row
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
tgl_tetap_new
,
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'20'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
if
not
invoice_no
:
row
.
no_id
=
1
else
:
...
...
esipkd/views/arinvoice.py.old
View file @
cd456be
...
...
@@ -275,7 +275,6 @@ def save(request, values, row=None):
#ARInvoice.tgl_tetap==datetime.now().strftime('%Y-%m-%d'),
ARInvoice.tgl_tetap==tgl_tetap_new,
func.substr(ARInvoice.kode,1,2)=='20').scalar()
print "--------- Invoice No ---------- ",invoice_no
if not invoice_no:
row.no_id = 1
else:
...
...
esipkd/views/arinvoice_b.py
View file @
cd456be
...
...
@@ -323,7 +323,6 @@ def save(request, values, row=None):
ARInvoice
.
wilayah_id
==
row
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
tgl_tetap_new
,
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'21'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
print
"--tahun--"
,
row
.
tahun_id
print
"--wilayah--"
,
row
.
wilayah_id
print
"--tanggal--"
,
tgl_tetap_new
...
...
esipkd/views/arinvoice_b.py.old
View file @
cd456be
...
...
@@ -276,7 +276,6 @@ def save(request, values, row=None):
#ARInvoice.tgl_tetap==datetime.now().strftime('%Y-%m-%d'),
ARInvoice.tgl_tetap==tgl_tetap_new,
func.substr(ARInvoice.kode,1,2)=='21').scalar()
print "--------- Invoice No ---------- ",invoice_no
if not invoice_no:
row.no_id = 1
else:
...
...
esipkd/views/arinvoice_ws.py
View file @
cd456be
...
...
@@ -297,7 +297,6 @@ def save(request, values, row=None):
ARInvoice
.
wilayah_id
==
row
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
tgl_tetap_new
,
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'21'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
print
"--tahun--"
,
row
.
tahun_id
print
"--wilayah--"
,
row
.
wilayah_id
print
"--tanggal--"
,
tgl_tetap_new
...
...
esipkd/views/arsspd.py
View file @
cd456be
...
...
@@ -277,7 +277,6 @@ def save(request, values, row=None):
filter
(
ARSspd
.
tahun_id
==
ref
.
tahun_id
,
ARSspd
.
arinvoice_id
==
ref
.
id
)
.
\
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
if
not
invoice_no
:
row
.
pembayaran_ke
=
1
else
:
...
...
esipkd/views/arsspd.py.20180628
View file @
cd456be
...
...
@@ -269,7 +269,6 @@ def save(request, values, row=None):
filter(ARSspd.tahun_id==row.tahun_id,
ARSspd.arinvoice_id==row.arinvoice_id).\
scalar()
print "--------- Invoice No ---------- ",invoice_no
if not invoice_no:
row.pembayaran_ke = 1
else:
...
...
esipkd/views/artbp.py
View file @
cd456be
...
...
@@ -641,14 +641,12 @@ def view_posting(request):
ARInvoice
.
wilayah_id
==
i
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
tgl_tetap_new
,
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'20'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
elif
prefix
==
'21'
:
invoice_no
=
DBSession
.
query
(
func
.
max
(
ARInvoice
.
no_id
))
.
\
filter
(
ARInvoice
.
tahun_id
==
i
.
tahun_id
,
ARInvoice
.
wilayah_id
==
i
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
tgl_tetap_new
,
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'21'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
if
not
invoice_no
:
i
.
no_id
=
1
...
...
esipkd/views/artbp.py.old
View file @
cd456be
...
...
@@ -622,14 +622,12 @@ def view_posting(request):
ARInvoice.wilayah_id==i.wilayah_id,
ARInvoice.tgl_tetap==datetime.now().strftime('%Y-%m-%d'),
func.substr(ARInvoice.kode,1,2)=='20').scalar()
print "--------- Invoice No ---------- ",invoice_no
elif prefix == '21':
invoice_no = DBSession.query(func.max(ARInvoice.no_id)).\
filter(ARInvoice.tahun_id==i.tahun_id,
ARInvoice.wilayah_id==i.wilayah_id,
ARInvoice.tgl_tetap==datetime.now().strftime('%Y-%m-%d'),
func.substr(ARInvoice.kode,1,2)=='21').scalar()
print "--------- Invoice No ---------- ",invoice_no
if not invoice_no:
i.no_id = 1
...
...
esipkd/views/bjb_qris.py
View file @
cd456be
...
...
@@ -521,13 +521,13 @@ def callback(request, data):
if
int
(
get_va
.
status
)
==
2
and
not
pay
.
status
:
get_va
.
status
=
'1'
if
DBSession
.
add
(
get_va
):
try
:
DBSession
.
add
(
get_va
):
DBSession
.
flush
()
if
not
sendrpc
(
request
,
get_va
.
invoice_no
):
log
.
error
(
'Error send BJBQRIS to pemda'
)
sendrpc
(
request
,
get_va
.
invoice_no
)
return
render_to_response
(
'json'
,
dict
(
response_code
=
'0000'
,
response_message
=
'Success'
))
e
lse
:
e
xcept
:
return
render_to_response
(
'json'
,
dict
(
response_code
=
'-1'
,
response_message
=
'Failed to update'
))
...
...
@@ -573,6 +573,7 @@ def calculate_tagihan(values):
return
pokok
,
denda
def
sendrpc
(
request
,
kd_bayar
):
log
.
info
(
'STARTING RPC QRIS CALLBACK PEMDA'
)
settings
=
get_settings
()
request
=
self
.
req
headers
=
{
'Content-Type'
:
'application/json'
}
...
...
@@ -593,5 +594,5 @@ def sendrpc(request, kd_bayar):
log
.
info
(
'Response RPC CALLBACK PEMDA : {}'
.
format
(
resp
.
content
))
return
True
except
requests
.
exceptions
.
RequestException
as
err
:
log
.
error
(
'
Gagal membuat koneksi, silakan coba lagi beberapa saat'
)
log
.
error
(
'
Error send BJBQRIS to pemda : {}'
.
format
(
err
)
)
return
esipkd/views/bjb_va.py
View file @
cd456be
...
...
@@ -603,13 +603,14 @@ def callback(request, data):
if
int
(
get_va
.
status
)
==
2
and
not
pay
.
status
:
get_va
.
status
=
'1'
if
DBSession
.
add
(
get_va
):
try
:
DBSession
.
add
(
get_va
):
DBSession
.
flush
()
if
not
sendrpc
(
request
,
get_va
.
invoice_no
):
log
.
error
(
'Error send BJBVA to pemda'
)
sendrpc
(
request
,
get_va
.
invoice_no
)
return
render_to_response
(
'json'
,
dict
(
response_code
=
'0000'
,
response_message
=
'Success'
))
e
lse
:
e
xcept
:
return
render_to_response
(
'json'
,
dict
(
response_code
=
'-1'
,
response_message
=
'Failed to update'
))
...
...
@@ -668,6 +669,7 @@ def calculate_tagihan(values):
return
pokok
,
denda
def
sendrpc
(
request
,
kd_bayar
):
log
.
info
(
'STARTING RPC VA CALLBACK PEMDA'
)
settings
=
get_settings
()
request
=
self
.
req
headers
=
{
'Content-Type'
:
'application/json'
}
...
...
@@ -688,5 +690,5 @@ def sendrpc(request, kd_bayar):
log
.
info
(
'Response RPC CALLBACK PEMDA : {}'
.
format
(
resp
.
content
))
return
True
except
requests
.
exceptions
.
RequestException
as
err
:
log
.
error
(
'
Gagal membuat koneksi, silakan coba lagi beberapa saat'
)
log
.
error
(
'
Error send BJBVA to pemda : {}'
.
format
(
err
)
)
return
\ No newline at end of file
esipkd/views/fast_pay.py
View file @
cd456be
...
...
@@ -267,14 +267,12 @@ def save(request, values, row=None):
ARInvoice
.
wilayah_id
==
row
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
),
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'20'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
elif
prefix
==
'21'
:
invoice_no
=
DBSession
.
query
(
func
.
max
(
ARInvoice
.
no_id
))
.
\
filter
(
ARInvoice
.
tahun_id
==
row
.
tahun_id
,
ARInvoice
.
wilayah_id
==
row
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
),
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'21'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
if
not
invoice_no
:
row
.
no_id
=
1
...
...
esipkd/views/public.py
View file @
cd456be
...
...
@@ -288,7 +288,6 @@ def save(request, values, row=None):
ARInvoice
.
wilayah_id
==
row
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
tgl_tetap_new
,
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'21'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
print
"--tahun--"
,
row
.
tahun_id
print
"--wilayah--"
,
row
.
wilayah_id
print
"--tanggal--"
,
tgl_tetap_new
...
...
esipkd/views/sptpd_wapu.py
View file @
cd456be
...
...
@@ -84,7 +84,6 @@ def view_act(request):
if
url_dict
[
'act'
]
==
'grid'
:
u
=
request
.
user
.
id
print
'--------user--------'
,
u
columns
=
[]
columns
.
append
(
ColumnDT
(
'id'
))
columns
.
append
(
ColumnDT
(
'kode'
))
...
...
@@ -819,21 +818,18 @@ def view_posting(request):
ARInvoice
.
wilayah_id
==
i
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
),
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'20'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
elif
prefix
==
'21'
:
invoice_no
=
DBSession
.
query
(
func
.
max
(
ARInvoice
.
no_id
))
.
\
filter
(
ARInvoice
.
tahun_id
==
i
.
tahun_id
,
ARInvoice
.
wilayah_id
==
i
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
),
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'21'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
elif
prefix
==
'22'
:
invoice_no
=
DBSession
.
query
(
func
.
max
(
ARInvoice
.
no_id
))
.
\
filter
(
ARInvoice
.
tahun_id
==
i
.
tahun_id
,
ARInvoice
.
wilayah_id
==
i
.
wilayah_id
,
ARInvoice
.
tgl_tetap
==
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d'
),
func
.
substr
(
ARInvoice
.
kode
,
1
,
2
)
==
'22'
)
.
scalar
()
print
"--------- Invoice No ---------- "
,
invoice_no
if
not
invoice_no
:
i
.
no_id
=
1
...
...
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