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 b7db890b
authored
Sep 04, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed saat --update-from-date
1 parent
e9bd1443
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
contrib/webr_checksum.py
payment_report/scripts/sync.py
contrib/webr_checksum.py
View file @
b7db890
...
...
@@ -50,7 +50,7 @@ db_session_rpt = factory_rpt()
awal
=
tgl_awal
while
True
:
q_rpt
=
db_session_rpt
.
query
(
func
.
sum
(
Webr
.
jml_bayar
))
.
filter
(
Webr
.
tgl
==
awal
)
Webr
.
tgl
==
awal
)
rpt_sum
=
q_rpt
.
scalar
()
or
0
rpt_sum
=
int
(
rpt_sum
)
q_prod
=
db_session_prod
.
query
(
func
.
sum
(
Payment
.
bayar
))
.
filter
(
...
...
payment_report/scripts/sync.py
View file @
b7db890
...
...
@@ -7,6 +7,7 @@ from datetime import (
date
,
timedelta
,
)
from
opensipkd.waktu
import
create_datetime
from
opensipkd.iso8583.bjb.scripts.common
import
get_module_object
from
.logger
import
setup_logging
...
...
@@ -72,7 +73,8 @@ def main(argv=sys.argv[1:]):
if
option
.
update_from_date
:
try
:
days_ago
=
int
(
option
.
update_from_date
)
cf
[
'tgl_awal'
]
=
date
.
today
()
+
timedelta
(
days_ago
)
t
=
date
.
today
()
+
timedelta
(
days_ago
)
cf
[
'tgl_awal'
]
=
create_datetime
(
t
.
year
,
t
.
month
,
t
.
day
)
except
ValueError
:
t
=
option
.
update_from_date
.
split
(
','
)
cf
[
'tgl_awal'
]
=
datetime
.
strptime
(
t
[
0
],
'
%
d-
%
m-
%
Y'
)
...
...
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