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 0.6.14 2026-10-05
----------------- -----------------
- Bug fixed total tagihan saat kurang bayar. - Bug fixed total tagihan saat kurang bayar.
......
...@@ -9,8 +9,9 @@ from .banjar import ( ...@@ -9,8 +9,9 @@ from .banjar import (
from opensipkd.hitung import hitung_denda from opensipkd.hitung import hitung_denda
AWAL_DISC = date(2026, 2, 13) PERIODE_DISC = [
AKHIR_DISC = date(2026, 4, 30) (date(2026, 11, 10), date(2026, 12, 31), 2026),
(date(2026, 2, 13), date(2026, 4, 30), 2025)]
PREFIX = '3215' PREFIX = '3215'
INVOICE_ID = [('Prefix', 4, 'N')] + INVOICE_ID INVOICE_ID = [('Prefix', 4, 'N')] + INVOICE_ID
...@@ -31,10 +32,10 @@ class Inquiry(BaseInquiry): ...@@ -31,10 +32,10 @@ class Inquiry(BaseInquiry):
def get_discount_denda(self): # Override def get_discount_denda(self): # Override
tgl_bayar = self.tgl_bayar.date() tgl_bayar = self.tgl_bayar.date()
if AWAL_DISC <= tgl_bayar <= AKHIR_DISC: for awal, akhir, tahun in PERIODE_DISC:
tgl = self.invoice.masadari.date() if awal <= tgl_bayar <= akhir:
if tgl.year <= 2025: if self.invoice.masadari.year <= tahun:
return self.denda_pokok, self.opsen_denda return self.denda_pokok, self.opsen_denda
return 0, 0 return 0, 0
def get_kohir_model(self): def get_kohir_model(self):
......
...@@ -3,15 +3,15 @@ requires = ['setuptools >= 64'] ...@@ -3,15 +3,15 @@ requires = ['setuptools >= 64']
[project] [project]
name = 'opensipkd-pad-models' name = 'opensipkd-pad-models'
version = '0.6.14' version = '0.6.15'
dependencies = [ dependencies = [
'sqlalchemy', 'sqlalchemy',
'zope.sqlalchemy', 'zope.sqlalchemy',
'transaction', 'transaction',
'psycopg2-binary', 'psycopg',
'opensipkd-hitung @ git+https://git.opensipkd.com/sugiana/opensipkd-hitung.git', 'opensipkd-hitung @ git+https://git.opensipkd.com/sugiana/opensipkd-hitung.git',
] ]
requires-python = '>= 3.6' requires-python = '>= 3.9'
authors = [ authors = [
{name='Owo Sugiana', email='sugiana@gmail.com'}, {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!