Commit 7fe4f9dc by Owo Sugiana

Bug fixed saat inquiry yang sudah lunas

1 parent 7b521ba0
0.2.2 2022-08-03
----------------
- Bug fixed saat inquiry yang sudah lunas
0.2.1 2021-04-08 0.2.1 2021-04-08
---------------- ----------------
- Variabel total bertipe int ketimbang Decimal - Variabel total bertipe int ketimbang Decimal
......
...@@ -46,8 +46,10 @@ class Inquiry: ...@@ -46,8 +46,10 @@ class Inquiry:
self.invoice = q.first() self.invoice = q.first()
if not self.invoice: if not self.invoice:
return return
if self.is_available(): if not self.is_available():
self.hitung() self.invoice = None
return
self.hitung()
def get_payment(self): def get_payment(self):
DBSession = get_db_session() DBSession = get_db_session()
...@@ -83,7 +85,7 @@ class Inquiry: ...@@ -83,7 +85,7 @@ class Inquiry:
self.total = 0 self.total = 0
def is_available(self): def is_available(self):
return self.invoice.status == 0 return self.invoice.status in (0, 1)
def get_nama(self): def get_nama(self):
return self.invoice.subjek_nama.upper() return self.invoice.subjek_nama.upper()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!