conv_bal
watcha.h 2014-10-22 09:25:14 +07:00
parent 9897ef9e35
commit abc4ad9b02
2 changed files with 16 additions and 2 deletions

View File

@ -1,7 +1,15 @@
<inherit inherit="account_menu">
<item string="Settings" position="before">
<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>
</inherit>

View File

@ -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"