Commit 4c5ea6f2 by Owo Sugiana

Discount Kota Tangerang menggunakan round()

1 parent 0c8a3d1b
0.3.28 2025-02-20
-----------------
- Discount Kota Tangerang menggunakan round() ketimbang int() sesuai rumus
SISMIOP.
0.3.27 2025-01-30
-----------------
- Discount pokok dan denda Kota Bekasi
......
......@@ -15,10 +15,8 @@ from .tangsel import (
MAX_BULAN_DENDA = 24
AWAL_DISC = date(2024, 8, 1)
AKHIR_DISC = date(2024, 8, 31)
TAHUN_PAJAK_DISC_POKOK = [str(x) for x in range(1994, 2014+1)]
TAHUN_PAJAK_DISC_DENDA = [str(x) for x in range(1994, 2023+1)]
AWAL_DISC = date(2025, 1, 17)
AKHIR_DISC = date(2025, 3, 31)
def hitung_denda(tagihan, jatuh_tempo, tgl_hitung):
......@@ -77,14 +75,26 @@ class Inquiry(BaseInquiry):
self.discount = self.discount_pokok + self.discount_denda
def hitung_discount_pokok(self):
if self.invoice.thn_pajak_sppt in TAHUN_PAJAK_DISC_POKOK:
return int(0.25 * self.tagihan)
return 0
thn = self.invoice.thn_pajak_sppt
if '1994' <= thn <= '2014':
disc = 0.25
elif thn == '2025':
if self.tagihan <= 100000:
disc = 0.2
elif self.tagihan <= 500000:
disc = 0.1
elif self.tagihan <= 2000000:
disc = 0.06
elif self.tagihan <= 5000000:
disc = 0.04
else:
disc = 0.03
else:
disc = 0
return round(disc * self.tagihan)
def hitung_discount_denda(self):
if self.invoice.thn_pajak_sppt in TAHUN_PAJAK_DISC_DENDA:
return self.denda
return 0
return self.denda
class AvailableInvoice(BaseAvailableInvoice):
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!