Commit b73b5194 by Owo Sugiana

Tambah modul bekasi_kab

1 parent 12faf087
0.1.10 2020-09-24
-----------------
- Tambah modul bekasi_kab
0.1.9 2020-08-30
----------------
- Perubahan rumus discount pokok dan discount denda pada modul tangsel sesuai
......
......@@ -20,7 +20,7 @@ requires = [
'zope.sqlalchemy',
'psycopg2-binary',
'opensipkd-hitung @ '
'git+https://git.opensipkd.com/sugiana/opensipkd-hitung',
'git+https://git.opensipkd.com/sugiana/opensipkd-hitung.git',
]
......
......@@ -136,7 +136,7 @@ def main(argv=sys.argv):
Reversal = sub_module.Reversal
db_url = conf.get('main', 'db_url')
engine = create_engine(db_url)
engine.echo = option.sql_debug
engine.echo = option.sql_debug
session_factory = sessionmaker(bind=engine)
sismiop.services.base.DBSession = DBSession = session_factory()
register(sismiop.services.base.DBSession)
......@@ -148,7 +148,7 @@ def main(argv=sys.argv):
print('Invoice ID {} tidak ada.'.format(invoice_id))
if inq.debug_invoice:
print('Ada tapi field status_pembayaran_sppt = '
f'{inq.debug_invoice.status_pembayaran_sppt}')
f'{inq.debug_invoice.status_pembayaran_sppt}')
return
show(inq)
if option.payment:
......
from datetime import date
from sismiop.services.cilegon import (
Inquiry as BaseInquiry,
Reversal,
AvailableInvoice,
)
AWAL_DISC = date(2020, 9, 1)
AKHIR_DISC = date(2020, 10, 30)
class Inquiry(BaseInquiry):
def hitung_discount_denda(self): # Override
tgl_bayar = self.tgl_bayar.date()
if self.denda < 1 or tgl_bayar < AWAL_DISC or \
tgl_bayar > AKHIR_DISC or self.invoice.thn_pajak_sppt > '2020':
return 0
return self.denda
# File ini berdasarkan Surat Keputusan Walikota Cilegon Nomor 973/kep. -BPKAD/2020
# File ini berdasarkan Surat Keputusan Walikota Cilegon
# Nomor 973/kep. -BPKAD/2020
from datetime import date
from ..default import (
Inquiry as BaseInquiry,
......@@ -16,8 +17,8 @@ class Inquiry(BaseInquiry):
def hitung_discount_denda(self):
tgl_bayar = self.tgl_bayar.date()
if tgl_bayar < AWAL_DISC or tgl_bayar > AKHIR_DISC or \
self.invoice.thn_pajak_sppt < '1990' or \
self.invoice.thn_pajak_sppt > '2020':
self.invoice.thn_pajak_sppt < '1990' or \
self.invoice.thn_pajak_sppt > '2020':
return 0
return self.denda
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!