Commit 7072e0a0 by Owo Sugiana

Discount Kabupaten Tangerang

1 parent 10b263c4
0.4.11 2023-08-14
-----------------
- Discount Kabupaten Tangerang
0.4.10 2023-07-10 0.4.10 2023-07-10
----------------- -----------------
- Tambah Kabupaten Lebak - Tambah Kabupaten Lebak
......
...@@ -23,10 +23,11 @@ def dmy(tgl): ...@@ -23,10 +23,11 @@ def dmy(tgl):
return tgl.strftime('%d-%m-%Y') return tgl.strftime('%d-%m-%Y')
MASA_AWAL_DISC = date(2021, 9, 1) PERIODE_BAYAR = [
MASA_AKHIR_DISC = date(2022, 12, 31) (date(2023, 8, 15), date(2023, 8, 31)),
AKHIR_TGL_BAYAR = date(2022, 12, 30) (date(2023, 10, 1), date(2023, 10, 31)),
NOTE_TGL_BAYAR = 'Tanggal bayar {tgl} <= ' + dmy(AKHIR_TGL_BAYAR) (date(2023, 12, 1), date(2023, 12, 29))]
NOTE_TGL_BAYAR = 'Tanggal bayar {awal} <= {tgl_bayar} <= {akhir}'
class Inquiry(BaseInquiry): class Inquiry(BaseInquiry):
...@@ -43,11 +44,13 @@ class Inquiry(BaseInquiry): ...@@ -43,11 +44,13 @@ class Inquiry(BaseInquiry):
def get_discount_denda(self): # Override def get_discount_denda(self): # Override
tgl_bayar = self.tgl_bayar.date() tgl_bayar = self.tgl_bayar.date()
masa_pajak = self.invoice.masadari.date() for awal, akhir in PERIODE_BAYAR:
if tgl_bayar > AKHIR_TGL_BAYAR or masa_pajak > MASA_AKHIR_DISC: if awal <= tgl_bayar <= akhir:
return 0 notes = [NOTE_TGL_BAYAR.format(
notes = [NOTE_TGL_BAYAR.format(tgl=dmy(tgl_bayar))] awal=dmy(awal), akhir=dmy(akhir),
tgl_bayar=dmy(tgl_bayar))]
return self.denda return self.denda
return 0
def get_kecamatan_model(self): # Override def get_kecamatan_model(self): # Override
return Kecamatan return Kecamatan
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!