Commit c54fd3d4 by Owo Sugiana

Struktur tabel Subang

1 parent 36891ff1
from datetime import date from datetime import date
from ..models.cirebon_kab import Kohir
from ..models.kuningan import Payment
from .default import ( from .default import (
Inquiry as BaseInquiry, Inquiry as BaseInquiry,
Reversal, Reversal as BaseReversal,
AvailableInvoice as BaseAvailableInvoice, AvailableInvoice as BaseAvailableInvoice,
) )
...@@ -15,6 +17,10 @@ AKHIR_TGL_BAYAR = date(2021, 12, 31) ...@@ -15,6 +17,10 @@ AKHIR_TGL_BAYAR = date(2021, 12, 31)
class Inquiry(BaseInquiry): class Inquiry(BaseInquiry):
# Cekal 2024, Pak Yasir, 2-1-2024
def is_available(self): # Override
return super().is_available() and self.tahun_terbit < 2024
def get_discount_denda(self): # Override def get_discount_denda(self): # Override
tgl_bayar = self.tgl_bayar.date() tgl_bayar = self.tgl_bayar.date()
if self.invoice.tahun == 2020 and self.invoice.sptno == 6307: if self.invoice.tahun == 2020 and self.invoice.sptno == 6307:
...@@ -25,6 +31,20 @@ class Inquiry(BaseInquiry): ...@@ -25,6 +31,20 @@ class Inquiry(BaseInquiry):
return self.denda return self.denda
return 0 return 0
def get_kohir_model(self):
return Kohir
def get_payment_model(self):
return Payment
class Reversal(BaseReversal):
def get_kohir_model(self):
return Kohir
def get_payment_model(self):
return Payment
class AvailableInvoice(BaseAvailableInvoice): class AvailableInvoice(BaseAvailableInvoice):
def get_inquiry_class(self): # Override 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!