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"> <form model="clinic.report.account.hd.case.summary">
<field name="date" span="2" mode="month" onchange="onchange_date"/> <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="date_to" span="2"/>
<field name="branch_id" onchange="onchange_branch" span="3"/> <field name="branch_id" onchange="onchange_branch" span="3"/>
<field name="department_id" domain='[["branch_id","=",branch_id]]' 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() name=name.upper()
products[name]=prod['id'] products[name]=prod['id']
dom=[] dom=[]
dom.append(['patient_id.walkin',"=","no"]) #XXX
dom.append(['date',">=",date_from]) dom.append(['date',">=",date_from])
dom.append(['date',"<=",date_to]) dom.append(['date',"<=",date_to])
dom.append(['state','!=','cancelled']) dom.append(['state','!=','cancelled'])

View File

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

View File

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