Commit 039e7ce7 by Owo Sugiana

Bug fixed AvailableInvoice

1 parent 843efdcf
...@@ -374,15 +374,7 @@ class AvailableInvoice(Query): ...@@ -374,15 +374,7 @@ class AvailableInvoice(Query):
def show(self): def show(self):
Invoice = self.get_invoice_model() Invoice = self.get_invoice_model()
Payment = self.get_payment_model() Payment = self.get_payment_model()
base_inq_cls = self.get_inquiry_class() inq_cls = self.get_inquiry_class()
class Inq(base_inq_cls):
def get_invoice_model(self):
return Invoice
def get_payment_model(self):
return Payment
offset = -1 offset = -1
no = 0 no = 0
awal = time() awal = time()
...@@ -397,7 +389,7 @@ class AvailableInvoice(Query): ...@@ -397,7 +389,7 @@ class AvailableInvoice(Query):
inv = q.first() inv = q.first()
if not inv: if not inv:
continue continue
inq = Inq(invoice=inv) inq = inq_cls(invoice=inv)
if inq.is_paid(): if inq.is_paid():
continue continue
no += 1 no += 1
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!