Commit f7c6a518 by Owo Sugiana

Bug fixed total tagihan = 0 bila status = 1

1 parent 75cb9708
0.6.3 2025-03-11
----------------
- Nilai pembayaran yang sesuai dengan pokok + denda (selain opsen) maka akan
mengurangi total pokok dan total denda.
0.6.2 2025-02-14
----------------
- Denda 1% sejak masa pajak 2024 di Kabupaten Lebak
......
......@@ -114,6 +114,9 @@ class BaseInquiry:
def is_available(self):
return self.invoice.status_pembayaran in (0, 1)
def is_paid(self):
return self.invoice.status_pembayaran == 1
def get_jatuh_tempo(self):
return self.invoice.jatuhtempotgl and self.invoice.jatuhtempotgl.date()
......@@ -355,7 +358,12 @@ class Inquiry(BaseInquiry):
self.hitung_denda()
self.hitung_bayar()
self.total = self.total_pokok + self.denda - self.total_bayar
if self.total < 0:
if self.total_bayar:
if self.total_bayar == self.pokok + self.denda_pokok:
self.total_pokok -= self.pokok
self.denda -= self.denda_pokok
self.pokok = self.denda_pokok = 0
if self.total < 0 or self.is_paid():
self.total = 0
def get_pay_seq(self):
......
......@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name = 'opensipkd-pad-models'
version = '0.6.2'
version = '0.6.3'
dependencies = [
'sqlalchemy',
'zope.sqlalchemy',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!