Commit b05d4b85 by Owo Sugiana

Di Kota Bekasi status 8 berarti lunas

1 parent 62824e1a
0.3.54 2026-03-11
-----------------
- Di Kota Bekasi status 8 berarti lunas
0.3.53 2026-03-07
-----------------
- Perbaikan discount pokok Kota Bekasi terkait faktor pengurang
......
......@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name = 'sismiop-models'
version = '0.3.53'
version = '0.3.54'
dependencies = [
'sqlalchemy',
'zope.sqlalchemy',
......
......@@ -77,8 +77,13 @@ def hitung_denda(
class Inquiry(BaseInquiry):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if self.invoice and self.invoice.status_pembayaran_sppt == '1':
self.tagihan = self.denda = self.discount = self.total = 0
if self.invoice and self.invoice.status_pembayaran_sppt in ['1', '8']:
self.tagihan = self.denda = self.discount = self.total = \
self.discount_denda = 0
def is_available(self) -> bool: # Override
return self.invoice.status_pembayaran_sppt == '8' or \
super().is_available()
def tahun_lunas(self, tahun):
db_session = get_db_session()
......@@ -87,7 +92,7 @@ class Inquiry(BaseInquiry):
q = self.get_filter_op(q)
q = q.filter_by(thn_pajak_sppt=tahun)
row = q.first()
return row and row.status_pembayaran_sppt == '1'
return row and row.status_pembayaran_sppt in ['1', '8']
def get_tagihan_pokok(self): # Override
pengurang = self.invoice.faktor_pengurang_sppt or 0
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!