Commit a344b4a3 by Owo Sugiana

Bug fixed saat kurang bayar

1 parent f7c6a518
...@@ -359,10 +359,12 @@ class Inquiry(BaseInquiry): ...@@ -359,10 +359,12 @@ class Inquiry(BaseInquiry):
self.hitung_bayar() self.hitung_bayar()
self.total = self.total_pokok + self.denda - self.total_bayar self.total = self.total_pokok + self.denda - self.total_bayar
if self.total_bayar: if self.total_bayar:
if self.total_bayar == self.pokok + self.denda_pokok: if (total_bayar := self.total_bayar) >= self.pokok:
self.total_pokok -= self.pokok self.total_pokok -= self.pokok
self.pokok = 0
if total_bayar >= self.denda_pokok:
self.denda -= self.denda_pokok self.denda -= self.denda_pokok
self.pokok = self.denda_pokok = 0 self.denda_pokok = 0
if self.total < 0 or self.is_paid(): if self.total < 0 or self.is_paid():
self.total = 0 self.total = 0
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!