Commit 52b5b310 by Owo Sugiana

Discount denda Kabupaten Pangandaran

1 parent 53b2fa77
0.6.1 2025-02-11
----------------
- Discount denda Kabupaten Pangandaran
0.6 2025-02-06
--------------
- Tambah Opsen untuk laporan ke Pemerintah Provinsi
......
from datetime import date
from opensipkd.hitung import hitung_denda
from .banjar import (
Inquiry as BaseInquiry,
......@@ -7,6 +8,11 @@ from .banjar import (
from ..models.ciamis import Kohir
AWAL_DISC = date(2025, 2, 12)
AKHIR_DISC = date(2025, 10, 31)
MASA_MAX = date(2024, 12, 31)
class Inquiry(BaseInquiry):
def get_kohir_model(self): # Override
return Kohir
......@@ -17,6 +23,12 @@ class Inquiry(BaseInquiry):
return 1
return 2
def get_discount_denda(self): # Override
if AWAL_DISC <= self.tgl_bayar.date() <= AKHIR_DISC:
if self.invoice.masadari.date() <= MASA_MAX:
return self.denda_pokok, self.opsen_denda
return 0, 0
class Reversal(BaseReversal):
def get_kohir_model(self): # Override
......
......@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name = 'opensipkd-pad-models'
version = '0.6'
version = '0.6.1'
dependencies = [
'sqlalchemy',
'zope.sqlalchemy',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!