Commit 8669eb9b by Owo Sugiana

Discount denda Kabupaten Subang

1 parent ae8a4e72
0.4.12 2026-11-09
-----------------
- Discount denda Kabupaten Subang
0.4.11 2026-10-27 0.4.11 2026-10-27
----------------- -----------------
- Discount denda Kota Bekasi - Discount denda Kota Bekasi
......
...@@ -3,9 +3,8 @@ requires = ['setuptools >= 64'] ...@@ -3,9 +3,8 @@ requires = ['setuptools >= 64']
[project] [project]
name = 'sismiop-models' name = 'sismiop-models'
version = '0.4.11' version = '0.4.12'
dependencies = [ dependencies = [
'sqlalchemy',
'zope.sqlalchemy', 'zope.sqlalchemy',
'transaction', 'transaction',
'psycopg-binary', 'psycopg-binary',
......
...@@ -8,9 +8,6 @@ from .default import ( ...@@ -8,9 +8,6 @@ from .default import (
) )
AWAL_DISC = date(2026, 2, 13)
AKHIR_DISC = date(2026, 4, 30)
AKHIR_DISC_KHUSUS = date(2025, 12, 15) AKHIR_DISC_KHUSUS = date(2025, 12, 15)
NOP_DISC_KHUSUS = [ NOP_DISC_KHUSUS = [
'3215130008027000102020', '3215130008027000102020',
...@@ -20,6 +17,10 @@ NOP_DISC_KHUSUS = [ ...@@ -20,6 +17,10 @@ NOP_DISC_KHUSUS = [
'3215130008028000102021', '3215130008028000102021',
'3215130008028000102022'] '3215130008028000102022']
PERIODE_DISC = [
(date(2026, 11, 10), date(2026, 12, 31), '2026'),
(date(2026, 2, 13), date(2026, 4, 30), '2025')]
class Inquiry(BaseInquiry): class Inquiry(BaseInquiry):
def get_payment_model(self): # Override def get_payment_model(self): # Override
...@@ -53,19 +54,14 @@ class Inquiry(BaseInquiry): ...@@ -53,19 +54,14 @@ class Inquiry(BaseInquiry):
return 0 return 0
def hitung_discount_denda(self): def hitung_discount_denda(self):
if self.invoice.thn_pajak_sppt <= '2025': for awal, akhir, tahun in PERIODE_DISC:
return self.denda if awal <= self.tgl_bayar <= akhir and \
self.invoice.thn_pajak_sppt <= tahun:
return self.denda
return 0 return 0
def hitung_discount(self): # Override def hitung_discount(self): # Override
self.discount = self.discount_denda = self.discount_pokok = 0 self.discount_pokok = self.hitung_discount_pokok()
if self.tgl_bayar < AWAL_DISC:
return
if self.tgl_bayar > AKHIR_DISC:
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_denda = self.hitung_discount_denda()
self.discount = self.discount_denda + self.discount_pokok 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!