Commit 01a03057 by Owo Sugiana

Bug fixed hitung denda di Kota Bekasi

1 parent e860b936
...@@ -33,11 +33,15 @@ AKHIR_DISC_DENDA = date(2024, 9, 30) ...@@ -33,11 +33,15 @@ AKHIR_DISC_DENDA = date(2024, 9, 30)
def hitung_denda(tagihan, jatuh_tempo, tgl_hitung): def hitung_denda(tagihan, jatuh_tempo, tgl_hitung):
if jatuh_tempo >= tgl_hitung: if jatuh_tempo >= tgl_hitung:
return 0, 0 return 0, 0
jatuh_tempo_januari = date(2024, 1, jatuh_tempo.day) jatuh_tempo_batas = date(2024, 1, jatuh_tempo.day)
bulan2persen = bulan_tunggakan_berdasarkan_tgl( bulan2persen = bulan_tunggakan_berdasarkan_tgl(
jatuh_tempo, jatuh_tempo_januari) jatuh_tempo, jatuh_tempo_batas)
bulan1persen = bulan_tunggakan_berdasarkan_tgl( if bulan2persen:
jatuh_tempo_januari, tgl_hitung) bulan1persen = bulan_tunggakan_berdasarkan_tgl(
jatuh_tempo_batas, tgl_hitung)
else:
bulan1persen = bulan_tunggakan_berdasarkan_tgl(
jatuh_tempo, tgl_hitung)
persen = bulan2persen * 2 + bulan1persen persen = bulan2persen * 2 + bulan1persen
if persen > 48: if persen > 48:
persen = 48 persen = 48
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!