Commit 1bb6296e by Owo Sugiana

Bug fixed discount denda Kota Sukabumi

1 parent 663057b3
......@@ -16,6 +16,7 @@ INVOICE_ID = [
]
AWAL_DISC = date(2026, 3, 1)
AKHIR_DISC = date(2026, 9, 30)
DESEMBER_2025 = date(2025, 12, 31)
class Inquiry(BaseInquiry):
......@@ -24,11 +25,20 @@ class Inquiry(BaseInquiry):
def get_kohir_model(self): # Override
return Kohir
def get_tgl_pajak(self):
tgl = self.get_tgl_kohir()
if tgl:
return tgl
return self.invoice.masadari.date()
def get_discount_denda(self): # Override
self.notes = []
tgl_bayar = self.tgl_bayar.date()
if not (AWAL_DISC <= tgl_bayar <= AKHIR_DISC):
return 0, 0
tgl = self.get_tgl_pajak()
if tgl > DESEMBER_2025:
return 0, 0
self.notes.append(
f'{AWAL_DISC} <= tgl bayar {tgl_bayar} <= {AKHIR_DISC}')
return self.denda_pokok, self.opsen_denda
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!