Commit 0fb037f0 by Owo Sugiana

Bug fixed discount denda di Kabupaten Subang

1 parent ff19c526
0.3.33 2025-07-04
-----------------
- Discount NOP tertentu di Kabupaten Subang
- Bug fixed discount denda di Kabupaten Subang
0.3.32 2025-06-17
-----------------
- Di Kota Bekasi rumus denda maksimal 48% berubah menjadi maksimal 24 bulan
......
......@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name = 'sismiop-models'
version = '0.3.32'
version = '0.3.33'
dependencies = [
'sqlalchemy',
'zope.sqlalchemy',
......
......@@ -11,6 +11,17 @@ from .default import (
AWAL_DISC = date(2025, 6, 2)
AKHIR_DISC = date(2025, 8, 30)
AKHIR_DISC_KHUSUS = date(2025, 7, 30)
NOP_DISC_KHUSUS = [
'3215130008027000102020',
'3215130008027000102021',
'3215130008027000102022',
'3215130008027000102023',
'3215130008029000102020',
'3215130008029000102021',
'3215130008029000102022',
'3215130008029000102023']
class Inquiry(BaseInquiry):
def get_payment_model(self): # Override
......@@ -36,8 +47,15 @@ class Inquiry(BaseInquiry):
else:
self.tagihan = round_up(tagihan)
def hitung_discount_pokok(self):
if self.invoice_id_raw in NOP_DISC_KHUSUS and \
self.tgl_bayar <= AKHIR_DISC_KHUSUS:
disc = self.tagihan * 0.25
return int(disc)
return 0
def hitung_discount_denda(self):
if self.invoice.thn_pajak_sppt <= '2024':
if self.invoice.thn_pajak_sppt <= '2025':
return self.denda
return 0
......@@ -49,6 +67,7 @@ class Inquiry(BaseInquiry):
return
if self.invoice.thn_pajak_sppt > '2025':
return
self.discount_pokok = self.hitung_discount_pokok()
self.discount_denda = 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!