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 0.6.11 2026-05-25
----------------- -----------------
- Pembaruan ketentuan discount di Kota Sukabumi - Pembaruan ketentuan discount di Kota Sukabumi
......
...@@ -19,20 +19,9 @@ def list2str(d): ...@@ -19,20 +19,9 @@ def list2str(d):
return ','.join(r) return ','.join(r)
class Inquiry: class Common:
def __init__(self, invoice_id, conf, tgl_bayar=None): def __init__(self, conf):
self.invoice_id = invoice_id
self.conf = 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): def transaction(self, number, method='1', need_commit=False):
log = getLogger('MS-SQL') log = getLogger('MS-SQL')
...@@ -55,6 +44,23 @@ class Inquiry: ...@@ -55,6 +44,23 @@ class Inquiry:
log.info(f'result {d}') log.info(f'result {d}')
return 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): def get_tahun(self):
return self.invoice['MasaAwal'].strftime('%Y') return self.invoice['MasaAwal'].strftime('%Y')
...@@ -119,8 +125,9 @@ class Inquiry: ...@@ -119,8 +125,9 @@ class Inquiry:
pass pass
class Reversal: class Reversal(Common):
def __init__(self, ntp): def __init__(self, conf, ntp):
super().__init__(conf)
self.ntp = ntp self.ntp = ntp
def do_reversal(self): def do_reversal(self):
......
...@@ -3,7 +3,7 @@ requires = ['setuptools >= 64'] ...@@ -3,7 +3,7 @@ requires = ['setuptools >= 64']
[project] [project]
name = 'opensipkd-pad-models' name = 'opensipkd-pad-models'
version = '0.6.11' version = '0.6.12'
dependencies = [ dependencies = [
'sqlalchemy', 'sqlalchemy',
'zope.sqlalchemy', 'zope.sqlalchemy',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!