Commit 6d921220 by Owo Sugiana

Bug fixed Kota Bekasi

1 parent 0a978197
......@@ -7,6 +7,7 @@ from ..models.bekasi_kota import (
Kecamatan,
Propinsi,
)
from .base import Query
from .binjai import (
AvailableInvoice as BaseAvailableInvoice,
Inquiry as BaseInquiry,
......@@ -25,19 +26,24 @@ class Inquiry(BaseInquiry):
self.tagihan = self.denda = self.discount = self.total = 0
def hitung_discount(self): # Override
discount_denda = discount_pokok = 0
if self.tgl_bayar.year != 2023:
return
self.discount_denda = self.discount_pokok = 0
if AWAL_DISC_DENDA <= self.tgl_bayar <= AKHIR_DISC_DENDA:
discount_denda = self.denda
if self.tgl_bayar.year == 2023:
self.discount_denda = self.denda
if self.invoice.thn_pajak_sppt == '2023':
if self.tgl_bayar.month == 8 and self.tgl_bayar.day >= 7:
discount_pokok = 0.17 * self.tagihan
self.discount_pokok = 0.17 * self.tagihan
elif self.tgl_bayar.month == 9:
discount_pokok = 0.1 * self.tagihan
discount_pokok = int(discount_pokok)
self.discount = discount_denda + discount_pokok
self.discount_pokok = 0.1 * self.tagihan
self.discount_pokok = int(self.discount_pokok)
self.discount = self.discount_denda + self.discount_pokok
def before_save(self, payment): # Override
payment.denda_sppt = self.denda - self.discount
if self.discount_denda:
payment.denda_sppt = self.denda - self.discount_denda
if self.discount_pokok:
Query.set_faktor_pengurang_sppt(self, self.discount_pokok)
def get_op_model(self): # Override
return ObjekPajak
......@@ -65,6 +71,10 @@ class Reversal(BaseReversal):
def get_payment_model(self): # Override
return PembayaranSppt
def before_save(self): # Override
Query.set_faktor_pengurang_sppt(
self, - self.invoice.faktor_pengurang_sppt)
class AvailableInvoice(BaseAvailableInvoice):
def get_inquiry_class(self): # Override
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!