Commit 8fd2940d by Owo Sugiana

Discount denda Kabupaten Subang

1 parent 71064fb1
0.6.15 2026-11-10
-----------------
- Discount denda Kabupaten Subang
0.6.14 2026-10-05
-----------------
- Bug fixed total tagihan saat kurang bayar.
......
......@@ -9,8 +9,9 @@ from .banjar import (
from opensipkd.hitung import hitung_denda
AWAL_DISC = date(2026, 2, 13)
AKHIR_DISC = date(2026, 4, 30)
PERIODE_DISC = [
(date(2026, 11, 10), date(2026, 12, 31), 2026),
(date(2026, 2, 13), date(2026, 4, 30), 2025)]
PREFIX = '3215'
INVOICE_ID = [('Prefix', 4, 'N')] + INVOICE_ID
......@@ -31,10 +32,10 @@ class Inquiry(BaseInquiry):
def get_discount_denda(self): # Override
tgl_bayar = self.tgl_bayar.date()
if AWAL_DISC <= tgl_bayar <= AKHIR_DISC:
tgl = self.invoice.masadari.date()
if tgl.year <= 2025:
return self.denda_pokok, self.opsen_denda
for awal, akhir, tahun in PERIODE_DISC:
if awal <= tgl_bayar <= akhir:
if self.invoice.masadari.year <= tahun:
return self.denda_pokok, self.opsen_denda
return 0, 0
def get_kohir_model(self):
......
......@@ -3,15 +3,15 @@ requires = ['setuptools >= 64']
[project]
name = 'opensipkd-pad-models'
version = '0.6.14'
version = '0.6.15'
dependencies = [
'sqlalchemy',
'zope.sqlalchemy',
'transaction',
'psycopg2-binary',
'psycopg',
'opensipkd-hitung @ git+https://git.opensipkd.com/sugiana/opensipkd-hitung.git',
]
requires-python = '>= 3.6'
requires-python = '>= 3.9'
authors = [
{name='Owo Sugiana', email='sugiana@gmail.com'},
]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!