Commit 99a4fb19 by Owo Sugiana

Bug fixed nilai yang disimpan di Kota Bogor

1 parent e36e5d5a
......@@ -119,6 +119,24 @@ def show_payment(module_name, inq, pay):
show_fields(row, fields)
def show_reversal(module_name, inq, pay):
print(
'Pembayaran ke-{} berhasil dibatalkan'.format(
pay.pembayaran_sppt_ke))
print('Tabel pembayaran_sppt')
show_fields(
pay, ['jml_sppt_yg_dibayar', 'denda_sppt', 'discount_pokok',
'discount_denda', 'discount'])
try:
row, fields = inq.get_other_payment_table(pay)
except AttributeError:
return
if not row:
return
print('Tabel {}'.format(row.__tablename__))
show_fields(row, fields)
ERR_PAYMENT_NOT_FOUND = 'Pembayaran tidak ditemukan, '\
'tidak ada yang perlu dibatalkan.'
......@@ -187,9 +205,7 @@ def main(argv=sys.argv):
print(ERR_PAYMENT_NOT_FOUND)
return
rev.do_reversal()
print(
'Pembayaran ke-{} berhasil dibatalkan'.format(
pay.pembayaran_sppt_ke))
show_reversal(module_name, inq, pay)
if option.update_status_bayar:
if inq.total == 0:
if inq.invoice.status_pembayaran_sppt == '0':
......
......@@ -68,7 +68,8 @@ class Inquiry(BaseInquiry, Common):
def before_save(self, bayar): # Override
if not self.discount:
return
inv = self.invoice
# Butuh bruto-nya, menyesuaikan aplikasi report
bayar.jml_sppt_yg_dibayar = self.total + self.discount
pc = PenguranganCovid(
kd_propinsi=bayar.kd_propinsi, kd_dati2=bayar.kd_dati2,
kd_kecamatan=bayar.kd_kecamatan,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!