report claim / no claim

conv_bal
watcha.h 2015-03-19 07:56:47 +07:00
parent d35fa2e11d
commit f63090ae62
6 changed files with 21 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<form model="clinic.report.account.hd.case.summary">
<field name="date" span="2" mode="month" onchange="onchange_date"/>
<field name="date_from" span="2"/>
<field name="date_from" onchange="onchange_datefrom" span="2"/>
<field name="date_to" span="2"/>
<field name="branch_id" onchange="onchange_branch" span="3"/>
<field name="department_id" domain='[["branch_id","=",branch_id]]' span="3"/>

View File

@ -113,6 +113,7 @@ class MatchingHDCase(Model):
name=name.upper()
products[name]=prod['id']
dom=[]
dom.append(['patient_id.walkin',"=","no"]) #XXX
dom.append(['date',">=",date_from])
dom.append(['date',"<=",date_to])
dom.append(['state','!=','cancelled'])

View File

@ -71,6 +71,7 @@ class ReportAccountHDCaseSummary(Model):
dom=[
['date','>=', date_from],
['date','<=', date_to],
['patient_id.walkin','=','no'],
]
if ptype_id:
dom.append(['patient_type_id','=',ptype_id])
@ -217,6 +218,8 @@ class ReportAccountHDCaseSummary(Model):
'total_qty': total_qty,
'types': types,
'reimbursable': reimbursable,
'is_reim': reimbursable=='yes' and True or False,
'ptype_id': ptype_id,
}
if not reimbursable:
data['title']=''
@ -241,4 +244,9 @@ class ReportAccountHDCaseSummary(Model):
data['department_id']=None
return data
def onchange_datefrom(self,context={}):
data=context['data']
data['date_to']=data['date_from']
return data
ReportAccountHDCaseSummary.register()

View File

@ -17,10 +17,14 @@
{{else}}
<th colspan="14" style="text-align:center">
{{/ifeq}}
{{#if ptype_id}}
<span class="label label-default">Total: {{total_qty}}</span>
{{else}}
{{#each types}}
<span class="label label-{{color}}">{{name}}: {{qty}}</span>
{{/each}}
<span class="label label-default">Total: {{total_qty}}</span>
{{/if}}
</th>
</tr>
<tr>

View File

@ -1,3 +1,6 @@
=====
- if department of staff or patient not related to department profile of user , it will show error's permission denied.
=====
- report
- walkin
- receipt **