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