Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
payment-report
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4845cdfe
authored
Mar 14, 2023
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed saat --update-from-date
1 parent
8c663c07
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
payment_report/pbb/tangkab.py
payment_report/pbb/tangkab.py
View file @
4845cdf
...
@@ -2,7 +2,10 @@ from datetime import timedelta
...
@@ -2,7 +2,10 @@ from datetime import timedelta
import
requests
import
requests
from
sqlalchemy
import
func
from
sqlalchemy
import
func
import
transaction
import
transaction
from
opensipkd.waktu
import
dmyhms
from
opensipkd.waktu
import
(
dmyhms
,
as_timezone
,
)
from
opensipkd.string
import
FixLength
from
opensipkd.string
import
FixLength
from
sismiop.services.base
import
INVOICE_ID
from
sismiop.services.base
import
INVOICE_ID
from
opensipkd.iso8583.bjb.pbb.structure
import
(
from
opensipkd.iso8583.bjb.pbb.structure
import
(
...
@@ -131,13 +134,18 @@ class Handler:
...
@@ -131,13 +134,18 @@ class Handler:
elif
pay
[
'MTI'
]
==
'0210'
:
elif
pay
[
'MTI'
]
==
'0210'
:
q
=
self
.
query_payment
(
source
)
q
=
self
.
query_payment
(
source
)
old_pay
=
q
.
first
()
old_pay
=
q
.
first
()
if
old_pay
and
old_pay
.
tgl_rekam_byr_sppt
<
pay
[
'HDATE'
]:
hdate
=
as_timezone
(
pay
[
'HDATE'
])
q_old_payment
=
q
msg
=
f
'INSERT {log_data}'
msg
=
f
'INSERT {log_data}'
rpt
=
self
.
parent
.
report_orm
(
**
source
)
rpt
=
self
.
parent
.
report_orm
(
**
source
)
if
old_pay
:
if
old_pay
.
tgl_rekam_byr_sppt
<
hdate
:
q_old_payment
=
q
else
:
msg
=
f
'sudah ada yang baru di {hdate}'
rpt
=
None
invoice_id
=
pay
[
'H61'
]
.
strip
()
invoice_id
=
pay
[
'H61'
]
.
strip
()
msg
=
f
'Invoice ID {invoice_id} {msg}'
msg
=
f
'Invoice ID {invoice_id} {msg}'
log_method
=
self
.
parent
.
log
.
info
e
=
self
.
parent
.
get_estimate
(
no
)
e
=
self
.
parent
.
get_estimate
(
no
)
log_method
(
f
'#{no}/{self.parent.count} {msg}, estimate {e}'
)
msg
=
f
'#{no}/{self.parent.count} {msg}, estimate {e}'
self
.
parent
.
log
.
info
(
msg
)
self
.
save
(
pay
,
rpt
,
q_old_payment
)
self
.
save
(
pay
,
rpt
,
q_old_payment
)
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