Commit 32f73b84 by iwan

Di Kabupaten Kuningan jenis kurang bayar 2024 ke atas didenda 1,8%

1 parent be903c17
0.4.8 2024-01-21
----------------
- Di Kabupaten Kuningan jenis kurang bayar 2024 ke atas didenda 1,8%
0.4.7 2024-01-15 0.4.7 2024-01-15
---------------- ----------------
- Di Lebak jenis kurang bayar tahun 2024 ke atas didenda 1% - Di Lebak jenis kurang bayar tahun 2024 ke atas didenda 1%
......
from datetime import datetime
from opensipkd.hitung import (
hitung_denda,
round_up,
)
from .default.structure import KODE_KURANG_BAYAR
from .default import (
Inquiry as BaseInquiry,
Reversal,
AvailableInvoice as BaseAvailableInvoice)
PERSEN_DENDA = 1.8
class Inquiry(BaseInquiry):
def hitung_denda(self):
if self.kode not in KODE_KURANG_BAYAR:
return
if self.tahun < 2024:
return
if isinstance(self.tgl_bayar, datetime):
tgl_bayar = self.tgl_bayar.date()
else:
tgl_bayar = self.tgl_bayar
self.bln_tunggakan, denda = hitung_denda(
self.tagihan, self.invoice.tgl_jatuh_tempo, PERSEN_DENDA,
tgl_bayar)
self.denda = round_up(denda)
class AvailableInvoice(BaseAvailableInvoice):
inquiry_cls = Inquiry
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!