Commit 75bb38b5 by Owo Sugiana

Rumus discount Kota Tasik

1 parent f451355c
0.1.42 2022-8-18
----------------
- Rumus discount Kota Tasik
0.1.41 2022-8-16 0.1.41 2022-8-16
---------------- ----------------
- Rumus discount Kota Tangerang - Rumus discount Kota Tangerang
......
...@@ -10,6 +10,10 @@ from .tasik_kab import ( ...@@ -10,6 +10,10 @@ from .tasik_kab import (
) )
AWAL_DISC = date(2022, 8, 19)
AKHIR_DISC = date(2022, 12, 31)
class Inquiry(BaseInquiry): class Inquiry(BaseInquiry):
def get_invoice_model(self): # Override def get_invoice_model(self): # Override
return Sppt return Sppt
...@@ -20,6 +24,9 @@ class Inquiry(BaseInquiry): ...@@ -20,6 +24,9 @@ class Inquiry(BaseInquiry):
def hitung_discount(self): # Override def hitung_discount(self): # Override
if self.invoice.denda_status == '1': if self.invoice.denda_status == '1':
self.discount = int(self.invoice.denda_pbb or 0) self.discount = int(self.invoice.denda_pbb or 0)
elif self.tgl_bayar >= AWAL_DISC and self.tgl_bayar <= AKHIR_DISC:
if self.invoice.thn_pajak_sppt < '2022':
self.discount = self.denda
def before_save(self, payment): # Override def before_save(self, payment): # Override
payment.denda_sppt = self.denda - self.discount payment.denda_sppt = self.denda - self.discount
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!