Commit 30f810bf by Owo Sugiana

Discount Kota Tangerang

1 parent daa70c55
0.3.62 2026-08-02
-----------------
- Discount Kota Tangerang
0.3.61 2026-07-31
-----------------
- Discount Kota Cimahi
......
......@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name = 'sismiop-models'
version = '0.3.61'
version = '0.3.62'
dependencies = [
'sqlalchemy',
'zope.sqlalchemy',
......
......@@ -15,8 +15,8 @@ from .tangsel import (
MAX_BULAN_DENDA = 24
AWAL_DISC = date(2025, 8, 1)
AKHIR_DISC = date(2025, 8, 29)
AWAL_DISC = date(2026, 8, 3)
AKHIR_DISC = date(2026, 8, 31)
def hitung_denda(tagihan, jatuh_tempo, tgl_hitung):
......@@ -55,6 +55,9 @@ class Inquiry(BaseInquiry):
self.tagihan = self.denda = self.discount = self.total = 0
def hitung_denda(self): # Override
"""
Denda dibulatkan ke atas
"""
if isinstance(self.tgl_bayar, datetime):
tgl_bayar = self.tgl_bayar.date()
else:
......@@ -75,12 +78,17 @@ class Inquiry(BaseInquiry):
self.discount = self.discount_pokok + self.discount_denda
def hitung_discount_pokok(self):
if '1990' <= self.invoice.thn_pajak_sppt <= '2014':
return round(0.2 * self.tagihan)
"""
Discount dibulatkan ke bawah
"""
if self.invoice.thn_pajak_sppt <= '2014':
return int(0.17 * self.tagihan)
if self.invoice.thn_pajak_sppt <= '2020':
return int(0.08 * self.tagihan)
return 0
def hitung_discount_denda(self):
if '1990' <= self.invoice.thn_pajak_sppt <= '2024':
if self.invoice.thn_pajak_sppt <= '2025':
return self.denda
return 0
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!