Commit ce6dc266 by Owo Sugiana

Discount Kota Sukabumi

1 parent ec4e119e
0.3.40 2025-09-30 0.3.40 2025-09-30
----------------- -----------------
- Discount Kota Tangerang Selatan - Discount Kota Tangerang Selatan
- Discount Kota Sukabumi
0.3.39 2025-09-21 0.3.39 2025-09-21
----------------- -----------------
......
...@@ -86,6 +86,7 @@ def show_inquiry(inq): ...@@ -86,6 +86,7 @@ def show_inquiry(inq):
show_field(inq.invoice, 'pbb_yg_harus_dibayar_sppt') show_field(inq.invoice, 'pbb_yg_harus_dibayar_sppt')
show_field(inq.invoice, 'pbb_terhutang_sppt') show_field(inq.invoice, 'pbb_terhutang_sppt')
show_field(inq.invoice, 'faktor_pengurang_sppt') show_field(inq.invoice, 'faktor_pengurang_sppt')
show_field(inq.invoice, 'STATUS_PEMBAYARAN_SPPT')
for pay in inq.query_payments(): for pay in inq.query_payments():
if registry['module_name'] == 'sukabumi_kota': if registry['module_name'] == 'sukabumi_kota':
show_fields( show_fields(
...@@ -289,11 +290,18 @@ def main(argv=sys.argv): ...@@ -289,11 +290,18 @@ def main(argv=sys.argv):
show_reversal(inq, pay) show_reversal(inq, pay)
if option.update_status_bayar: if option.update_status_bayar:
if inq.total == 0: if inq.total == 0:
if inq.invoice.status_pembayaran_sppt == '0': if registry['module_name'] == 'sukabumi_kota':
status = inq.invoice.STATUS_PEMBAYARAN_SPPT
else:
status = inq.invoice.status_pembayaran_sppt
if status == '0':
if registry['module_name'] == 'sukabumi_kota':
inq.invoice.STATUS_PEMBAYARAN_SPPT = '1'
else:
inq.invoice.status_pembayaran_sppt = '1' inq.invoice.status_pembayaran_sppt = '1'
DBSession.add(inq.invoice) DBSession.add(inq.invoice)
print('Sudah diperbarui, silakan inquiry lagi.') print('Sudah diperbarui, silakan inquiry lagi.')
if inq.invoice.status_pembayaran_sppt == '1': elif status == '1':
print( print(
'Field status_pembayaran_sppt sudah 1, ' 'Field status_pembayaran_sppt sudah 1, '
'tidak perlu diperbarui lagi') 'tidak perlu diperbarui lagi')
......
...@@ -23,8 +23,10 @@ from .base import ( ...@@ -23,8 +23,10 @@ from .base import (
AWAL_SATU_PERSEN = date(2024, 10, 3) AWAL_SATU_PERSEN = date(2024, 10, 3)
AWAL_DISC = date(2025, 6, 1) AWAL_DISC_1 = date(2025, 6, 1)
AKHIR_DISC = date(2025, 9, 30) AKHIR_DISC_1 = date(2025, 9, 30)
AWAL_DISC_2 = date(2025, 10, 1)
AKHIR_DISC_2 = date(2025, 12, 31)
def get_nop(row): def get_nop(row):
...@@ -68,10 +70,14 @@ class Inquiry(BaseInquiry): ...@@ -68,10 +70,14 @@ class Inquiry(BaseInquiry):
return 1 return 1
def hitung_denda(self): # Override def hitung_denda(self): # Override
if AWAL_DISC <= self.tgl_bayar <= AKHIR_DISC and \ if AWAL_DISC_1 <= self.tgl_bayar <= AKHIR_DISC_1 and \
'2009' <= self.invoice.THN_PAJAK_SPPT <= '2024': '2009' <= self.invoice.THN_PAJAK_SPPT <= '2024':
self.bln_tunggakan = 0 self.bln_tunggakan = 0
self.denda = 0 self.denda = 0
elif AWAL_DISC_2 <= self.tgl_bayar <= AKHIR_DISC_2 and \
self.invoice.THN_PAJAK_SPPT <= '2025':
self.bln_tunggakan = 0
self.denda = 0
else: else:
super().hitung_denda() super().hitung_denda()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!