Commit d5466441 by Owo Sugiana

Discount pokok Kota Bogor

1 parent 8460a8b9
0.3.51 2026-02-24
-----------------
- Discount pokok Kota Bogor
0.3.50 2026-02-15
-----------------
- Discount denda Kabupaten Kuningan
......
......@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name = 'sismiop-models'
version = '0.3.50'
version = '0.3.51'
dependencies = [
'sqlalchemy',
'zope.sqlalchemy',
......
......@@ -30,7 +30,6 @@ MAX_BULAN_DENDA = 24
AWAL_DISC = date(2026, 2, 20)
AKHIR_DISC = date(2026, 4, 30)
TAHUN_PAJAK_DISC_POKOK = '2026'
BUKU_DISC_POKOK = [
(100000, 0.29),
(500000, 0.1),
......
......@@ -16,13 +16,19 @@ from .default import (
)
DISC_POKOK = [
DISC_POKOK_2025 = [
(date(2025, 4, 28), date(2025, 5, 27), 0.1),
(date(2025, 5, 28), date(2025, 6, 28), 0.05),
]
DISC_DENDA_AWAL_2025 = date(2025, 9, 22)
DISC_DENDA_AKHIR_2025 = date(2025, 12, 31)
DISC_DENDA_AWAL = date(2025, 9, 22)
DISC_DENDA_AKHIR = date(2025, 12, 31)
DISC_POKOK_AWAL = date(2026, 2, 24)
DISC_POKOK_AKHIR = date(2026, 3, 23)
BUKU_DISC_POKOK = [
(100000, 0.2),
(2000000, 0.1),
(None, 0.05)]
class Common(Query):
......@@ -88,22 +94,33 @@ class Inquiry(BaseInquiry, Common):
def hitung_discount_pokok(self):
if not self.is_e_sppt():
print('Belum terdaftar di ESPPT')
return
if self.is_pst():
print('Sudah dapat pengurangan pokok')
return
if self.invoice.thn_pajak_sppt != '2025':
return
for awal, akhir, potongan in DISC_POKOK:
if awal <= self.tgl_bayar <= akhir:
self.discount_pokok = int(self.tagihan * potongan)
return
disc = 0
if self.invoice.thn_pajak_sppt == '2026' and \
DISC_POKOK_AWAL <= self.tgl_bayar <= DISC_POKOK_AKHIR:
for max_tagihan, disc in BUKU_DISC_POKOK:
if max_tagihan is None:
break
if self.invoice.pbb_yg_harus_dibayar_sppt <= max_tagihan:
break
elif self.invoice.thn_pajak_sppt == '2025':
for awal, akhir, disc in DISC_POKOK_2025:
if awal <= self.tgl_bayar <= akhir:
break
if disc:
self.discount_pokok = disc * self.tagihan
self.discount_pokok = int(self.discount_pokok)
def hitung_discount_denda(self):
if not self.is_e_sppt():
return
if self.invoice.thn_pajak_sppt > '2025':
return
if DISC_DENDA_AWAL <= self.tgl_bayar <= DISC_DENDA_AKHIR:
if DISC_DENDA_AWAL_2025 <= self.tgl_bayar <= DISC_DENDA_AKHIR_2025:
self.discount_denda = self.denda
def hitung_discount(self): # Override
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!