Commit 01d7b025 by Owo Sugiana

Kabupaten Subang discount denda 100% periode Agustus - September

1 parent 022d498e
0.3.12 2024-07-30
-----------------
- Kabupaten Subang discount denda 100% periode Agustus - September.
- Kota Tangerang discount pokok 25% untuk 1994 - 2014, discount denda 100%
untuk 1994 - 2023, periode 1 - 31 Agustus 2024.
......
......@@ -8,8 +8,8 @@ from .default import (
)
AWAL_DISC = date(2024, 3, 25)
AKHIR_DISC = date(2024, 5, 31)
AWAL_DISC = date(2024, 8, 1)
AKHIR_DISC = date(2024, 9, 30)
class Inquiry(BaseInquiry):
......@@ -37,21 +37,10 @@ class Inquiry(BaseInquiry):
self.tagihan = round_up(tagihan)
def hitung_discount_denda(self):
if self.invoice.thn_pajak_sppt <= '2023':
if self.invoice.thn_pajak_sppt <= '2024':
return self.denda
return 0
def hitung_discount_pokok(self):
if self.invoice.thn_pajak_sppt != '2024':
return 0
if self.tagihan <= 2000000:
potongan = 0.1
elif self.tagihan <= 5000000:
potongan = 0.075
else:
potongan = 0.05
return int(potongan * self.tagihan)
def hitung_discount(self): # Override
self.discount = self.discount_denda = self.discount_pokok = 0
if self.tgl_bayar < AWAL_DISC:
......@@ -59,7 +48,6 @@ class Inquiry(BaseInquiry):
if self.tgl_bayar > AKHIR_DISC:
return
self.discount_denda = self.hitung_discount_denda()
self.discount_pokok = self.hitung_discount_pokok()
self.discount = self.discount_denda + self.discount_pokok
def before_save(self, payment): # Override
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!