diff --git a/netforce_clinic/models/payment_matching.py b/netforce_clinic/models/payment_matching.py index 52de61d..958900d 100644 --- a/netforce_clinic/models/payment_matching.py +++ b/netforce_clinic/models/payment_matching.py @@ -279,6 +279,9 @@ class PaymentMatching(Model): break lines.append(vals) no+=1 + pc=0 + if total_invoice: + pc=(total_match_invoice/total_invoice)*100 data={ 'lines': lines, 'date_from': date_from, @@ -289,7 +292,7 @@ class PaymentMatching(Model): 'total_srv': total_srv, 'total_invoice': total_invoice, 'total_match_invoice': total_match_invoice, - 'total_match_invoice_in_pc': (total_match_invoice/total_invoice)*100, + 'total_match_invoice_in_pc': pc, 'total_unmatch_invoice': total_invoice-total_match_invoice, 'total_amount': total_amount, 'view_type': view_type,