Commit 63f08310 by Owo Sugiana

Discount Kabupaten Cirebon

1 parent c9ec8726
......@@ -16,7 +16,8 @@ INVOICE_ID = [
]
AKHIR_DISC = date(2022, 3, 31)
AWAL_DISC = date(2024, 1, 15)
AKHIR_DISC = date(2024, 12, 31)
class Inquiry(BaseInquiry):
......@@ -24,8 +25,12 @@ class Inquiry(BaseInquiry):
def get_discount_denda(self): # Override
tgl_bayar = self.tgl_bayar.date()
if tgl_bayar <= AKHIR_DISC:
return self.denda
if AWAL_DISC <= tgl_bayar <= AKHIR_DISC:
tgl = self.get_tgl_kohir()
if not tgl:
tgl = self.invoice.masadari.date()
if tgl.year < 2024:
return self.denda
return 0
def get_kohir_model(self): # Override
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!