Commit 6b559e8d by Owo Sugiana

Bug fixed total bayar di Kota Bogor

1 parent b5654a30
0.3.43 2025-12-17
-----------------
- Bug fixed total bayar di Kota Bogor
- Discount pokok Kota Bekasi (2025-12-7)
0.3.42 2025-11-12
-----------------
- Discount denda di Kabupaten Subang
......
......@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name = 'sismiop-models'
version = '0.3.42'
version = '0.3.43'
dependencies = [
'sqlalchemy',
'zope.sqlalchemy',
......
......@@ -23,8 +23,8 @@ from .binjai import (
MAX_BULAN_DENDA = 24
AWAL_DISC = date(2025, 10, 1)
AKHIR_DISC = date(2025, 11, 30)
AWAL_DISC = date(2025, 12, 8)
AKHIR_DISC = date(2025, 12, 30)
def hitung_denda(tagihan, jatuh_tempo, tgl_hitung):
......@@ -75,7 +75,7 @@ class Inquiry(BaseInquiry):
if self.invoice.faktor_pengurang_sppt:
return
thn = self.invoice.thn_pajak_sppt
if thn == '2024':
if '2024' <= thn <= '2025':
disc = 0.1
elif '2020' <= thn <= '2023':
disc = 0.25
......
from datetime import date
from opensipkd.hitung import round_up
from ..models.bogor_kota import (
PenguranganCovid,
PenguranganPst,
......@@ -68,6 +69,23 @@ class Inquiry(BaseInquiry, Common):
pst = q.first()
return pst and pst.no_sk and pst.status_sk_peng_pst != '2'
def hitung_pokok(self): # Override
q = self.get_payment_sum()
q = self.get_filter(q)
bayar = q.first()
discount_lalu = float(bayar.discount or 0)
self.total_bayar = float(bayar.jml_sppt_yg_dibayar or 0)
self.total_bayar -= discount_lalu
if self.total_bayar < 0:
self.total_bayar = 0
denda_lalu = float(bayar.denda_sppt or 0)
sisa = self.total_bayar - denda_lalu
tagihan = self.get_tagihan_pokok() - sisa - discount_lalu
if tagihan < 0:
self.tagihan = 0
else:
self.tagihan = round_up(tagihan)
def hitung_discount_pokok(self):
if not self.is_e_sppt():
return
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!