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 b58a94fd
authored
Mar 16, 2023
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed filter tanggal pada BPHTB
1 parent
4d0d628c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
payment_report/scripts/bphtb.py
payment_report/scripts/bphtb.py
View file @
b58a94f
import
sys
import
pdb
from
datetime
import
datetime
,
timedelta
from
datetime
import
datetime
,
timedelta
,
date
from
sqlalchemy
import
(
Column
,
Integer
,
...
...
@@ -175,7 +175,6 @@ class App(BaseApp):
try
:
self
.
set_default_models
()
except
(
ProgrammingError
,
OperationalError
,
DatabaseError
)
as
e
:
print
(
'ERROR set_default_models'
,
e
)
self
.
prod_session
.
rollback
()
try
:
self
.
set_alternative_models
()
...
...
@@ -311,7 +310,7 @@ class App(BaseApp):
return
q
.
filter
(
or_
(
and_
(
self
.
Payment
.
tanggal
>
=
self
.
tgl_awal
.
date
(),
self
.
Payment
.
tanggal
=
=
self
.
tgl_awal
.
date
(),
self
.
Payment
.
jam
>=
self
.
tgl_awal
.
time
()),
and_
(
self
.
Payment
.
tanggal
>
self
.
tgl_awal
.
date
(),
...
...
@@ -517,6 +516,9 @@ class App(BaseApp):
stan
=
ntb
=
None
channel_id
=
'0000'
channel_nama
=
self
.
get_va_channel
(
pay
.
tanggal
)
or
'MANUAL'
if
pay
.
tanggal
>
date
.
today
():
print
(
f
'DEBUG self.tgl_akhir {self.tgl_akhir}'
)
raise
Exception
(
f
'{pay.tanggal} adalah masa depan. Perbaiki script.'
)
return
dict
(
id
=
pay
.
id
,
stan
=
stan
,
ntb
=
ntb
,
tgl
=
pay
.
tanggal
,
jam
=
pay
.
jam
,
invoice_id
=
self
.
invoice_id
,
nop
=
pay
.
nop
,
wp_nama
=
pay
.
wp_nama
,
...
...
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