Commit f451355c by Owo Sugiana

Discount Kota Tangerang

1 parent 26a92aea
0.1.41 2022-8-16
----------------
- Rumus discount Kota Tangerang
0.1.40 2022-8-6
---------------
- Di Tangerang Selatan discount pokok tidak perlu memperhatikan nilai
......
......@@ -8,16 +8,8 @@ from .tangsel import (
from ..models.tangsel import PembayaranSppt
AWAL_DISC = date(2021, 3, 22)
AKHIR_DISC = date(2021, 6, 30)
TAHUN_PAJAK_DISC_POKOK = '2021'
BUKU_DISC_POKOK = [
(100000, 0),
(500000, 0.2),
(2000000, 0.15),
(5000000, 0.1),
(None, 0.05)]
AWAL_DISC = date(2022, 8, 17)
AKHIR_DISC = date(2022, 8, 31)
class Inquiry(BaseInquiry):
......@@ -27,21 +19,23 @@ class Inquiry(BaseInquiry):
def hitung_discount(self): # Override
self.denda_sblm_diskon = self.denda
self.discount_denda = self.discount_pokok = 0
self.discount = self.discount_pokok = self.hitung_discount_pokok()
def hitung_discount_pokok(self):
if self.tgl_bayar > AKHIR_DISC:
return 0
return
if self.tgl_bayar < AWAL_DISC:
return
self.discount_pokok = self.hitung_discount_pokok()
self.discount_denda = self.hitung_discount_denda()
self.discount = self.discount_pokok + self.discount_denda
def hitung_discount_pokok(self):
if self.invoice.thn_pajak_sppt > '2014':
return 0
if self.invoice.thn_pajak_sppt != TAHUN_PAJAK_DISC_POKOK:
return int(0.77 * self.tagihan)
def hitung_discount_denda(self):
if self.invoice.thn_pajak_sppt > '2021':
return 0
for max_tagihan, disc in BUKU_DISC_POKOK:
if max_tagihan is None:
break
if self.invoice.pbb_yg_harus_dibayar_sppt <= max_tagihan:
break
return int(disc * self.tagihan)
return self.denda
class AvailableInvoice(BaseAvailableInvoice):
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!