Commit 63cc13fe by Owo Sugiana

Discount denda Kota Bekasi

1 parent 148e5a5e
0.2.12 2023-12-01
-----------------
- Discount denda Kota Bekasi
0.2.11 2023-08-29
-----------------
- Total tagihan nol jika status lunas
......
......@@ -15,8 +15,8 @@ from .binjai import (
)
AWAL_DISC_DENDA = date(2023, 8, 7)
AKHIR_DISC_DENDA = date(2023, 9, 30)
AWAL_DISC_DENDA = date(2023, 12, 4)
AKHIR_DISC_DENDA = date(2023, 12, 26)
class Inquiry(BaseInquiry):
......@@ -26,17 +26,9 @@ class Inquiry(BaseInquiry):
self.tagihan = self.denda = self.discount = self.total = 0
def hitung_discount(self): # Override
if self.tgl_bayar.year != 2023:
return
self.discount_denda = self.discount_pokok = 0
if AWAL_DISC_DENDA <= self.tgl_bayar <= AKHIR_DISC_DENDA:
self.discount_denda = self.denda
if self.invoice.thn_pajak_sppt == '2023':
if self.tgl_bayar.month == 8 and self.tgl_bayar.day >= 7:
self.discount_pokok = 0.17 * self.tagihan
elif self.tgl_bayar.month == 9:
self.discount_pokok = 0.1 * self.tagihan
self.discount_pokok = int(self.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!