Commit b5fab433 by Owo Sugiana

Discount pokok Kabupaten Cirebon untuk tahun pajak 2026

1 parent 007797c4
0.3.47 2026-01-15
-----------------
- Discount pokok Kabupaten Cirebon untuk tahun pajak 2026
0.3.46 2026-01-02 0.3.46 2026-01-02
----------------- -----------------
- Discount denda Kabupaten Cirebon untuk tahun pajak 2009 - 2025 periode 1 - Discount denda Kabupaten Cirebon untuk tahun pajak 2009 - 2025 periode 1
......
...@@ -3,7 +3,7 @@ requires = ['setuptools >= 64'] ...@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project] [project]
name = 'sismiop-models' name = 'sismiop-models'
version = '0.3.46' version = '0.3.47'
dependencies = [ dependencies = [
'sqlalchemy', 'sqlalchemy',
'zope.sqlalchemy', 'zope.sqlalchemy',
......
...@@ -10,11 +10,40 @@ from .default import ( ...@@ -10,11 +10,40 @@ from .default import (
) )
AWAL_DISC = date(2026, 1, 1) AWAL_DISC_DENDA = date(2026, 1, 1)
AKHIR_DISC = date(2026, 12, 31) AKHIR_DISC_DENDA = date(2026, 12, 31)
AWAL_DISC_POKOK = date(2026, 1, 1)
AKHIR_DISC_POKOK = date(2026, 5, 31)
DISC_POKOK = [
(5000000, 0.1),
(1000000000, 0.075),
(None, 0.05),
]
NOP_CONTOH = [
'3211120007008011002026',
'3211120025001005602026',
'3211260011003000102026',
]
def get_persen_disc_pokok(nominal):
for nominal_max, disc in DISC_POKOK[:-1]:
if nominal <= nominal_max:
return disc
return DISC_POKOK[-1][1]
class Inquiry(BaseInquiry): class Inquiry(BaseInquiry):
def is_available(self):
if self.invoice.thn_pajak_sppt > '2025':
if self.invoice_id_raw not in NOP_CONTOH:
return
return super().is_available()
def get_payment_model(self): # Override def get_payment_model(self): # Override
return PembayaranSppt return PembayaranSppt
...@@ -41,9 +70,15 @@ class Inquiry(BaseInquiry): ...@@ -41,9 +70,15 @@ 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 AWAL_DISC <= self.tgl_bayar <= AKHIR_DISC and \ if AWAL_DISC_DENDA <= self.tgl_bayar <= AKHIR_DISC_DENDA and \
'2009' <= self.invoice.thn_pajak_sppt <= '2025': '2009' <= self.invoice.thn_pajak_sppt <= '2025':
self.discount = self.discount_denda = self.denda self.discount_denda = self.denda
if AWAL_DISC_POKOK <= self.tgl_bayar <= AKHIR_DISC_POKOK and \
self.invoice.thn_pajak_sppt == '2026':
persen = get_persen_disc_pokok(
self.invoice.pbb_yg_harus_dibayar_sppt)
self.discount_pokok = int(persen * self.tagihan)
self.discount = self.discount_denda + self.discount_pokok
def before_save(self, payment): # Override def before_save(self, payment): # Override
# Catat sebagai bruto, ujar Gilang # Catat sebagai bruto, ujar Gilang
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!