Commit 7a8a9c1c by Owo Sugiana

Penyesuaian nama variabel di Kota Cimahi

1 parent 0e9399af
0.6.12 2026-06-24
-----------------
- Penyesuaian nama variabel di Kota Cimahi
0.6.11 2026-05-25
-----------------
- Pembaruan ketentuan discount di Kota Sukabumi
......
......@@ -19,20 +19,9 @@ def list2str(d):
return ','.join(r)
class Inquiry:
def __init__(self, invoice_id, conf, tgl_bayar=None):
self.invoice_id = invoice_id
class Common:
def __init__(self, conf):
self.conf = conf
self.invoice = self.transaction(invoice_id)
if self.invoice.get('hasil') == '0':
self.invoice = None
else:
self.tagihan = int(self.invoice['Pokok'])
self.denda = self.invoice['Denda']
self.total = int(self.invoice['Tagihan'])
self.total_bayar = self.discount_denda = 0
self.bln_tunggakan = None
self.notes = None
def transaction(self, number, method='1', need_commit=False):
log = getLogger('MS-SQL')
......@@ -55,6 +44,23 @@ class Inquiry:
log.info(f'result {d}')
return d
class Inquiry(Common):
def __init__(self, invoice_id, conf, tgl_bayar=None):
super().__init__(conf)
self.invoice_id = invoice_id
self.invoice = self.transaction(invoice_id)
if self.invoice.get('hasil') == '0':
self.invoice = None
else:
self.opsen_pokok = self.total_opsen_denda = 0
self.pokok = self.total_pokok = int(self.invoice['Pokok'])
self.denda = self.invoice['Denda']
self.total = int(self.invoice['Tagihan'])
self.total_bayar = self.discount_denda = 0
self.bln_tunggakan = None
self.notes = None
def get_tahun(self):
return self.invoice['MasaAwal'].strftime('%Y')
......@@ -119,8 +125,9 @@ class Inquiry:
pass
class Reversal:
def __init__(self, ntp):
class Reversal(Common):
def __init__(self, conf, ntp):
super().__init__(conf)
self.ntp = ntp
def do_reversal(self):
......
......@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project]
name = 'opensipkd-pad-models'
version = '0.6.11'
version = '0.6.12'
dependencies = [
'sqlalchemy',
'zope.sqlalchemy',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!