diff --git a/netforce_clinic/layouts/clinic_menu_inherit.xml b/netforce_clinic/layouts/clinic_menu_inherit.xml index 87aa347..e69a5e6 100644 --- a/netforce_clinic/layouts/clinic_menu_inherit.xml +++ b/netforce_clinic/layouts/clinic_menu_inherit.xml @@ -1,7 +1,15 @@ - +
+ + + + +
+ + + diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 4e489b6..334b67b 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -205,6 +205,8 @@ class HDcase(Model): def make_payment(self,ids,context={}): obj=self.browse(ids)[0] + if not obj.total: + return remaining_amt=0.0 for line in obj.lines: remaining_amt+=line.amount or 0.0 @@ -215,6 +217,8 @@ class HDcase(Model): raise Exception("No contact on this patient") company_id=get_active_company() account_id=obj.pay_account_id.id + if not account_id: + raise Exception("No Account for payment") vals={ "partner_id": partner_id, "company_id": company_id, @@ -534,7 +538,9 @@ class HDcase(Model): def onchange_hct(self,context={}): data=context['data'] - hct=data.get("hct",0) + if not data.get("hct"): + data['hct']=0 + hct=data["hct"] msg="" if(hct<=36): msg="Reimbursement of medicines : 1,125/Week"