Commit 4380304e by Owo Sugiana

Bug fixed bila row di pembayaran_sppt sudah tidak ada

1 parent b0dacb88
......@@ -24,6 +24,10 @@ from .common import (
)
ERR_NOT_FOUND = 'Tgl {tgl_bayar} SPPT ID {invoice_id} '\
'tidak ada di pembayaran_sppt'
def get_inv_id(iso):
inv_id = FixLength(INVOICE_ID)
inv_id.set_raw(iso.get_invoice_id())
......@@ -90,12 +94,17 @@ class App(BaseApp):
d = get_keys(iso)
tgl_bayar = get_tgl_bayar(iso, row_inq.tgl.year)
s_tgl = dmyhms(tgl_bayar)
p = get_profile(iso)
psppt = self.get_psppt(p)
if not psppt:
msg = ERR_NOT_FOUND.format(
tgl_bayar=s_tgl, invoice_id=d['nomor_bayar'])
self.log.error(msg)
continue
self.log.info(
f'Tgl bayar {s_tgl}, Nomor bayar {d["nomor_bayar"]}, '
f'STAN {d["stan"]}, NTB {d["ntb"]}, Channel {d["channel"]}')
inv_id = get_inv_id(iso)
p = get_profile(iso)
psppt = self.get_psppt(p)
rpt = Pbb(
stan=d['stan'], ntb=d['ntb'], kd_propinsi=p['Propinsi'],
kd_dati2=p['Kabupaten'], kd_kecamatan=p['Kecamatan'],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!