Commit b891575c by Owo Sugiana

Bug fixed saat inquiry belum ada pembayaran

1 parent 0cffb59e
...@@ -61,7 +61,7 @@ class Inquiry: ...@@ -61,7 +61,7 @@ class Inquiry:
func.sum(self.payment_model.bayar).label('jml')) func.sum(self.payment_model.bayar).label('jml'))
q = q.filter_by(ar_invoice_id=self.invoice.id) q = q.filter_by(ar_invoice_id=self.invoice.id)
pay = q.first() pay = q.first()
return pay and int(pay.jml) or 0 return pay and int(pay.jml or 0)
def hitung(self): def hitung(self):
bunga = self.invoice.bunga or 0 bunga = self.invoice.bunga or 0
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!