Commit a7dcbdd9 by Owo Sugiana

Discount denda 100% Kabupaten Cirebon

1 parent 7e4b60e7
0.3.25 2025-01-02
-----------------
- Discount denda 100% di Kabupaten Cirebon
0.3.24 2024-12-20
-----------------
- Tambah Kabupaten Lebak
......
......@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name = 'sismiop-models'
version = '0.3.24'
version = '0.3.25'
dependencies = [
'sqlalchemy',
'zope.sqlalchemy',
......
......@@ -10,17 +10,8 @@ from .default import (
)
AWAL_DISC_DENDA = date(2024, 1, 14)
AKHIR_DISC_DENDA = date(2024, 12, 31)
AWAL_DISC_POKOK_1 = date(2024, 1, 14)
AKHIR_DISC_POKOK_1 = date(2024, 3, 31)
AWAL_DISC_POKOK_2 = date(2024, 4, 1)
AKHIR_DISC_POKOK_2 = date(2024, 7, 31)
AWAL_DISC_POKOK_3 = date(2024, 8, 1)
AKHIR_DISC_POKOK_3 = date(2024, 10, 31)
AWAL_DISC_DENDA = date(2025, 1, 1)
AKHIR_DISC_DENDA = date(2025, 12, 31)
class Inquiry(BaseInquiry):
......@@ -50,25 +41,9 @@ class Inquiry(BaseInquiry):
def hitung_discount(self): # Override
self.discount_pokok = self.discount_denda = 0
if self.invoice.thn_pajak_sppt < '2024':
if '2009' <= self.invoice.thn_pajak_sppt <= '2024':
if AWAL_DISC_DENDA <= self.tgl_bayar <= AKHIR_DISC_DENDA:
self.discount = self.discount_denda = self.denda
elif self.invoice.thn_pajak_sppt == '2024':
if AWAL_DISC_POKOK_1 <= self.tgl_bayar <= AKHIR_DISC_POKOK_1:
if self.invoice.pbb_yg_harus_dibayar_sppt <= 5000000:
potongan = 0.1
else:
potongan = 0.075
elif AWAL_DISC_POKOK_2 <= self.tgl_bayar <= AKHIR_DISC_POKOK_2:
if self.invoice.pbb_yg_harus_dibayar_sppt <= 5000000:
potongan = 0.05
else:
potongan = 0.025
elif AWAL_DISC_POKOK_3 <= self.tgl_bayar <= AKHIR_DISC_POKOK_3:
potongan = 0.079
else:
return
self.discount = self.discount_pokok = int(potongan * self.tagihan)
def before_save(self, payment): # Override
# Catat sebagai bruto, ujar Gilang
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!