Commit d9651e51 by Owo Sugiana

Discount Kabupaten Serang

1 parent ccdfb330
0.2.4 2023-05-19
----------------
- Discount Kabupaten Serang
0.2.3 2023-05-17
----------------
- Tambah Kabupaten Ciamis, hanya struktur tabel saja
......
from logging import getLogger
from datetime import datetime
from datetime import (
datetime,
date,
)
from sqlalchemy import func
from opensipkd.hitung import round_up
from ..models.serang_kab import (
......@@ -20,11 +23,12 @@ from .base import (
)
class Inquiry(BaseInquiry):
def is_available(self): # Override
if self.invoice.thn_pajak_sppt < '2023':
return super().is_available()
# Keputusan Bupati No. 973/KEP.214-HUK.BAPENDA/2023
AWAL_DISC = date(2023, 5, 1)
AKHIR_DISC = date(2023, 11, 30)
class Inquiry(BaseInquiry):
def hitung_pokok(self): # Override
DBSession = get_db_session()
Payment = self.get_payment_model()
......@@ -47,6 +51,11 @@ class Inquiry(BaseInquiry):
self.tagihan = round_up(tagihan)
def hitung_denda(self): # Override
self.bln_tunggakan = 0
if AWAL_DISC <= self.tgl_bayar <= AKHIR_DISC:
return
if self.invoice.thn_pajak_sppt > '2022':
return
super().hitung_denda()
if self.denda < 1:
return
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!