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 411e5ad7
authored
Sep 20, 2024
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed WEBR saat Payment ID hilang
1 parent
b7db890b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
payment_report/common.py
payment_report/webr/default.py
payment_report/common.py
View file @
411e5ad
...
@@ -394,8 +394,6 @@ class BaseApp:
...
@@ -394,8 +394,6 @@ class BaseApp:
self
.
tgl_akhir
=
create_now
()
self
.
tgl_akhir
=
create_now
()
self
.
tgl_awal
=
as_timezone
(
self
.
tgl_awal
)
self
.
tgl_awal
=
as_timezone
(
self
.
tgl_awal
)
self
.
tgl_akhir
=
as_timezone
(
self
.
tgl_akhir
)
self
.
tgl_akhir
=
as_timezone
(
self
.
tgl_akhir
)
print
(
self
.
tgl_awal
)
print
(
self
.
tgl_akhir
)
def
run
(
self
):
def
run
(
self
):
self
.
last_pay
=
self
.
last
=
None
self
.
last_pay
=
self
.
last
=
None
...
...
payment_report/webr/default.py
View file @
411e5ad
...
@@ -77,7 +77,8 @@ class App(BaseApp):
...
@@ -77,7 +77,8 @@ class App(BaseApp):
pay
=
q
.
first
()
pay
=
q
.
first
()
if
pay
:
if
pay
:
return
self
.
create_data_from_prod
(
pay
)
return
self
.
create_data_from_prod
(
pay
)
return
dict
(
id
=
pay
.
id
,
pokok
=
0
,
denda
=
0
,
jml_bayar
=
0
)
self
.
invoice_id
=
f
'Payment ID {sync.payment_id} hilang'
return
dict
(
id
=
sync
.
payment_id
,
pokok
=
0
,
denda
=
0
,
jml_bayar
=
0
)
def
create_data_from_prod
(
self
,
pay
):
def
create_data_from_prod
(
self
,
pay
):
q
=
self
.
base_q_inv
.
filter_by
(
id
=
pay
.
ar_invoice_id
)
q
=
self
.
base_q_inv
.
filter_by
(
id
=
pay
.
ar_invoice_id
)
...
@@ -111,7 +112,7 @@ class App(BaseApp):
...
@@ -111,7 +112,7 @@ class App(BaseApp):
return
dict
(
return
dict
(
id
=
pay
.
id
,
stan
=
stan
,
ntb
=
ntb
,
tgl
=
pay
.
tgl_bayar
.
date
(),
id
=
pay
.
id
,
stan
=
stan
,
ntb
=
ntb
,
tgl
=
pay
.
tgl_bayar
.
date
(),
jam
=
pay
.
tgl_bayar
.
time
(),
nomor_bayar
=
self
.
invoice_id
,
jam
=
pay
.
tgl_bayar
.
time
(),
nomor_bayar
=
self
.
invoice_id
,
nama_wp
=
inv
.
subjek_nama
,
pokok
=
inv
.
jumlah
-
inv
.
bunga
,
nama_wp
=
inv
.
subjek_nama
,
pokok
=
pay
.
bayar
-
pay
.
bunga
,
denda
=
pay
.
bunga
,
jml_bayar
=
pay
.
bayar
,
channel_id
=
channel_id
,
denda
=
pay
.
bunga
,
jml_bayar
=
pay
.
bayar
,
channel_id
=
channel_id
,
channel_name
=
channel_name
,
status
=
pay
.
status
,
channel_name
=
channel_name
,
status
=
pay
.
status
,
produk
=
inv
.
produk_nama
,
departemen_kode
=
inv
.
departemen_kode
,
produk
=
inv
.
produk_nama
,
departemen_kode
=
inv
.
departemen_kode
,
...
@@ -135,13 +136,11 @@ class App(BaseApp):
...
@@ -135,13 +136,11 @@ class App(BaseApp):
def
get_filter_query
(
self
,
q
):
def
get_filter_query
(
self
,
q
):
if
self
.
base_q_sync
:
if
self
.
base_q_sync
:
orm
=
SyncWebr
orm
=
SyncWebr
f
=
orm
.
tgl_bayar
else
:
else
:
orm
=
self
.
IsoLog
orm
=
self
.
IsoLog
f
=
orm
.
created
return
q
.
filter
(
return
q
.
filter
(
f
>=
self
.
tgl_awal
,
orm
.
created
>=
self
.
tgl_awal
,
f
<
self
.
tgl_akhir
+
one_day
)
orm
.
created
<
self
.
tgl_akhir
+
one_day
)
def
get_count
(
self
):
# Override
def
get_count
(
self
):
# Override
q
=
self
.
prod_session
.
query
(
func
.
count
())
q
=
self
.
prod_session
.
query
(
func
.
count
())
...
...
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