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 b5002e12
authored
Nov 16, 2021
by
Candra
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add jenis_pajak
1 parent
d7048d52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
payment_report/models.py
payment_report/scripts/pad.py
payment_report/models.py
View file @
b5002e1
...
...
@@ -37,6 +37,8 @@ class Pad(Base, Common):
sspd_id
=
Column
(
Integer
,
nullable
=
False
)
# Bit 61
nomor_bayar
=
Column
(
String
(
16
),
nullable
=
False
)
# pad.pad_usaha.usahanm
jenis_pajak
=
Column
(
String
(
32
),
nullable
=
False
)
# pad.pad_pajak.masapajak
masa_pajak
=
Column
(
Integer
,
nullable
=
False
)
# pad.pad_customer
...
...
payment_report/scripts/pad.py
View file @
b5002e1
...
...
@@ -10,6 +10,7 @@ from opensipkd.pad.models.default import (
Pajak
,
CustomerUsaha
,
Customer
,
Usaha
,
)
from
opensipkd.pad.services.base
import
get_db_session
from
iso8583_web.models.meta
import
Base
as
BaseConf
...
...
@@ -39,11 +40,12 @@ class App(BaseApp):
if
not
self
.
pid
:
return
self
.
base_q_pay
=
self
.
prod_session
.
query
(
Payment
)
self
.
base_q_inv
=
self
.
prod_session
.
query
(
Invoice
,
Pajak
,
Customer
)
self
.
base_q_inv
=
self
.
prod_session
.
query
(
Invoice
,
Pajak
,
Customer
,
Usaha
)
self
.
base_q_inv
=
self
.
base_q_inv
.
filter
(
Invoice
.
pajak_id
==
Pajak
.
id
,
Invoice
.
customer_usaha_id
==
CustomerUsaha
.
id
,
CustomerUsaha
.
customer_id
==
Customer
.
id
)
CustomerUsaha
.
customer_id
==
Customer
.
id
,
Usaha
.
id
==
Pajak
.
usaha_id
,)
def
get_db_session
(
self
):
# Override
return
get_db_session
()
...
...
@@ -72,16 +74,18 @@ class App(BaseApp):
self
.
log
.
error
(
msg
)
continue
q_inv
=
self
.
base_q_inv
.
filter
(
Invoice
.
id
==
pay
.
spt_id
)
inv
,
pajak
,
cust
=
q_inv
.
first
()
inv
,
pajak
,
cust
,
usaha
=
q_inv
.
first
()
d
=
get_keys
(
iso
)
s_tgl
=
dmyhms
(
row
.
tgl
)
self
.
log
.
info
(
f
'Tgl bayar {s_tgl}, Nomor bayar {d["nomor_bayar"]}, '
f
'Jenis Pajak {usaha.usahanm.strip()},'
f
'STAN {d["stan"]}, NTB {d["ntb"]}, Channel {d["channel"]}'
)
rpt
=
Pad
(
stan
=
d
[
'stan'
],
ntb
=
d
[
'ntb'
],
tgl
=
tgl_bayar
,
jam
=
row
.
tgl
.
time
(),
sspd_id
=
pay
.
id
,
nomor_bayar
=
iso
.
get_invoice_id
()
.
strip
(),
jenis_pajak
=
usaha
.
usahanm
.
strip
(),
masa_pajak
=
pajak
.
masapajak
,
npwpd
=
cust
.
npwpd
,
nama_wp
=
cust
.
customernm
,
pokok
=
pay
.
jml_bayar
-
pay
.
denda
,
denda
=
pay
.
denda
,
jml_bayar
=
pay
.
jml_bayar
,
...
...
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