Commit 32615dc0 by Owo Sugiana

Tambah field discount_denda

1 parent 3544af11
......@@ -369,6 +369,7 @@ class Payment(Base):
is_valid = Column(Integer)
is_inject = Column(Integer)
posted = Column(Integer)
discount_denda = Column(Float)
__table_args__ = (
UniqueConstraint('tahun', 'sspdno'),)
......
......@@ -327,12 +327,16 @@ class Inquiry(BaseInquiry):
enabled=1,
is_valid=1)
self.invoice.status_pembayaran = 1
self.before_save(pay)
DBSession = get_db_session()
DBSession.add(pay)
DBSession.add(self.invoice)
DBSession.flush()
return pay
def before_save(self, pay):
pass
class Reversal(BaseInquiry):
def __init__(self, invoice_id):
......
......@@ -89,6 +89,9 @@ class Inquiry(BaseInquiry):
def get_payment_model(self): # Override
return Payment
def before_save(self, pay):
pay.discount_denda = self.discount_denda
class Reversal(BaseReversal):
def get_invoice_model(self): # Override
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!