fix
parent
9897ef9e35
commit
abc4ad9b02
|
@ -1,7 +1,15 @@
|
||||||
<inherit inherit="account_menu">
|
<inherit inherit="account_menu">
|
||||||
<item string="Settings" position="before">
|
<item string="Settings" position="before">
|
||||||
<item string="Ratchawat">
|
<item string="Ratchawat">
|
||||||
<item string="Import Payments" action="clinic_import_payment"/>
|
<header string="IMPORT PAYMENT"/>
|
||||||
|
<item string="Medical Government" action="clinic_import_payment"/>
|
||||||
|
<item string="Social Security" action="clinic_import_payment"/>
|
||||||
|
<item string="NHSO 30฿" action="clinic_import_payment"/>
|
||||||
|
<divider/>
|
||||||
|
<header string="REPORTS"/>
|
||||||
|
<item string="Medical Government" action="clinic_import_payment"/>
|
||||||
|
<item string="Social Security" action="clinic_import_payment"/>
|
||||||
|
<item string="NHSO 30฿" action="clinic_import_payment"/>
|
||||||
</item>
|
</item>
|
||||||
</item>
|
</item>
|
||||||
</inherit>
|
</inherit>
|
||||||
|
|
|
@ -205,6 +205,8 @@ class HDcase(Model):
|
||||||
|
|
||||||
def make_payment(self,ids,context={}):
|
def make_payment(self,ids,context={}):
|
||||||
obj=self.browse(ids)[0]
|
obj=self.browse(ids)[0]
|
||||||
|
if not obj.total:
|
||||||
|
return
|
||||||
remaining_amt=0.0
|
remaining_amt=0.0
|
||||||
for line in obj.lines:
|
for line in obj.lines:
|
||||||
remaining_amt+=line.amount or 0.0
|
remaining_amt+=line.amount or 0.0
|
||||||
|
@ -215,6 +217,8 @@ class HDcase(Model):
|
||||||
raise Exception("No contact on this patient")
|
raise Exception("No contact on this patient")
|
||||||
company_id=get_active_company()
|
company_id=get_active_company()
|
||||||
account_id=obj.pay_account_id.id
|
account_id=obj.pay_account_id.id
|
||||||
|
if not account_id:
|
||||||
|
raise Exception("No Account for payment")
|
||||||
vals={
|
vals={
|
||||||
"partner_id": partner_id,
|
"partner_id": partner_id,
|
||||||
"company_id": company_id,
|
"company_id": company_id,
|
||||||
|
@ -534,7 +538,9 @@ class HDcase(Model):
|
||||||
|
|
||||||
def onchange_hct(self,context={}):
|
def onchange_hct(self,context={}):
|
||||||
data=context['data']
|
data=context['data']
|
||||||
hct=data.get("hct",0)
|
if not data.get("hct"):
|
||||||
|
data['hct']=0
|
||||||
|
hct=data["hct"]
|
||||||
msg=""
|
msg=""
|
||||||
if(hct<=36):
|
if(hct<=36):
|
||||||
msg="Reimbursement of medicines : 1,125/Week"
|
msg="Reimbursement of medicines : 1,125/Week"
|
||||||
|
|
Loading…
Reference in New Issue