Commit 70f63f3a by Owo Sugiana

Discount pokok Kabupaten Cirebon 7,9% 1 Agustus - 31 Oktober

1 parent 83f7f41f
0.3.11 2024-07-28
-----------------
- Kabupaten Cirebon discount pokok 7,9% periode 1 Agustus - 31 Oktober 2024.
0.3.10 2024-07-07 0.3.10 2024-07-07
----------------- -----------------
- Rumus Kota Bekasi - Rumus Kota Bekasi
......
...@@ -416,7 +416,7 @@ class AvailableInvoice(Query): ...@@ -416,7 +416,7 @@ class AvailableInvoice(Query):
if not inv: if not inv:
continue continue
inq = inq_cls(invoice=inv) inq = inq_cls(invoice=inv)
if inq.total < 1: if not inq.invoice or inq.total < 1:
continue continue
no += 1 no += 1
msg = self.get_msg(inq) msg = self.get_msg(inq)
......
...@@ -10,20 +10,8 @@ from .default import ( ...@@ -10,20 +10,8 @@ from .default import (
) )
AKHIR_DISC_DENDA = date(2022, 12, 31) AWAL_DISC_POKOK = date(2024, 8, 1)
AKHIR_DISC_POKOK = date(2024, 10, 31)
# Discount pokok berdasarkan bulan
NILAI_DISC_POKOK = {
1: 0.12,
2: 0.12,
3: 0.12,
4: 0.12,
5: 0.1,
6: 0.1,
7: 0.1,
8: 0.07,
9: 0.07,
10: 0.07}
class Inquiry(BaseInquiry): class Inquiry(BaseInquiry):
...@@ -53,14 +41,11 @@ class Inquiry(BaseInquiry): ...@@ -53,14 +41,11 @@ class Inquiry(BaseInquiry):
def hitung_discount(self): # Override def hitung_discount(self): # Override
self.discount_pokok = self.discount_denda = 0 self.discount_pokok = self.discount_denda = 0
if self.invoice.thn_pajak_sppt >= '2009' \ if self.invoice.thn_pajak_sppt == '2024':
and self.invoice.thn_pajak_sppt <= '2021': if AWAL_DISC_POKOK <= self.tgl_bayar <= AKHIR_DISC_POKOK:
if self.tgl_bayar <= AKHIR_DISC_DENDA: potongan = 0.079
self.discount = self.discount_denda = self.denda else:
elif self.invoice.thn_pajak_sppt == '2022' \ return
and self.tgl_bayar.year == 2022 \
and self.tgl_bayar.month in NILAI_DISC_POKOK:
potongan = NILAI_DISC_POKOK[self.tgl_bayar.month]
self.discount = self.discount_pokok = int(potongan * self.tagihan) self.discount = self.discount_pokok = int(potongan * self.tagihan)
def before_save(self, payment): # Override 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!