Commit fe38fe53 by Owo Sugiana

Bug fixed belum tersimpan saat --payment-file

1 parent 5b62e50b
...@@ -233,10 +233,12 @@ def main(argv=sys.argv): ...@@ -233,10 +233,12 @@ def main(argv=sys.argv):
if option.payment_file: if option.payment_file:
with open(option.payment_file) as f: with open(option.payment_file) as f:
c = csv.DictReader(f) c = csv.DictReader(f)
with transaction.manager:
for r in c: for r in c:
invoice_id = r['NOP'] + r['TAHUN'] invoice_id = r['NOP'] + r['TAHUN']
tgl_bayar = datetime.strptime(r['TANGGAL'], '%Y%m%d') tgl_bayar = datetime.strptime(r['TANGGAL'], '%Y%m%d')
inq = Inquiry(invoice_id, persen_denda, tgl_bayar=tgl_bayar) inq = Inquiry(
invoice_id, persen_denda, tgl_bayar=tgl_bayar)
ket = None ket = None
if inq.invoice: if inq.invoice:
if inq.is_paid(): if inq.is_paid():
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!