Commit 41c09004 by Owo Sugiana

Discount Kota Bekasi

1 parent ce6dc266
......@@ -2,6 +2,7 @@
-----------------
- Discount Kota Tangerang Selatan
- Discount Kota Sukabumi
- Discount Kota Bekasi
0.3.39 2025-09-21
-----------------
......
......@@ -23,8 +23,8 @@ from .binjai import (
MAX_BULAN_DENDA = 24
AWAL_DISC_DENDA = date(2025, 2, 1)
AKHIR_DISC_DENDA = date(2025, 5, 31)
AWAL_DISC = date(2025, 10, 1)
AKHIR_DISC = date(2025, 11, 30)
def hitung_denda(tagihan, jatuh_tempo, tgl_hitung):
......@@ -72,38 +72,29 @@ class Inquiry(BaseInquiry):
self.denda = round_up(denda)
def hitung_discount_pokok(self):
if self.tgl_bayar.year != 2025:
return
if self.invoice.faktor_pengurang_sppt:
return
thn = self.invoice.thn_pajak_sppt
disc = 0
if thn == '2025':
if 2 <= self.tgl_bayar.month <= 3:
disc = 0.15
elif 4 <= self.tgl_bayar.month <= 5:
if thn == '2024':
disc = 0.1
elif '2019' <= thn <= '2024':
if 2 <= self.tgl_bayar.month <= 5:
disc = 0.1
elif '2013' <= thn <= '2018':
if 2 <= self.tgl_bayar.month <= 5:
disc = 0.2
elif thn < '2013':
if 2 <= self.tgl_bayar.month <= 3:
elif '2020' <= thn <= '2023':
disc = 0.25
elif '2013' <= thn <= '2019':
disc = 0.5
elif 4 <= self.tgl_bayar.month <= 5:
disc = 0.4
elif thn < '2013':
disc = 0.75
else:
disc = 0
if disc:
self.discount_pokok = disc * self.tagihan
self.discount_pokok = int(self.discount_pokok)
def hitung_discount_denda(self):
if AWAL_DISC_DENDA <= self.tgl_bayar <= AKHIR_DISC_DENDA:
self.discount_denda = self.denda
def hitung_discount(self): # Override
self.discount_denda = self.discount_pokok = 0
if AWAL_DISC <= self.tgl_bayar <= AKHIR_DISC:
self.hitung_discount_pokok()
self.hitung_discount_denda()
self.discount = self.discount_denda + self.discount_pokok
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!