diff --git a/netforce_clinic/layouts/clinic_report_account_hd_case_summary.xml b/netforce_clinic/layouts/clinic_report_account_hd_case_summary.xml index b81e50e..aa048fd 100644 --- a/netforce_clinic/layouts/clinic_report_account_hd_case_summary.xml +++ b/netforce_clinic/layouts/clinic_report_account_hd_case_summary.xml @@ -1,6 +1,6 @@
- + diff --git a/netforce_clinic/models/matching_hdcase.py b/netforce_clinic/models/matching_hdcase.py index 94770e8..f36c847 100644 --- a/netforce_clinic/models/matching_hdcase.py +++ b/netforce_clinic/models/matching_hdcase.py @@ -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']) diff --git a/netforce_clinic/models/report_account_hd_case_summary.py b/netforce_clinic/models/report_account_hd_case_summary.py index c613528..53fec3a 100644 --- a/netforce_clinic/models/report_account_hd_case_summary.py +++ b/netforce_clinic/models/report_account_hd_case_summary.py @@ -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']='' @@ -240,5 +243,10 @@ class ReportAccountHDCaseSummary(Model): data=context['data'] data['department_id']=None return data + + def onchange_datefrom(self,context={}): + data=context['data'] + data['date_to']=data['date_from'] + return data ReportAccountHDCaseSummary.register() diff --git a/netforce_clinic/reports/report_account_hd_case_summary.xlsx b/netforce_clinic/reports/report_account_hd_case_summary.xlsx index 4080997..11e745e 100644 Binary files a/netforce_clinic/reports/report_account_hd_case_summary.xlsx and b/netforce_clinic/reports/report_account_hd_case_summary.xlsx differ diff --git a/netforce_clinic/templates/report_account_hd_case_summary.hbs b/netforce_clinic/templates/report_account_hd_case_summary.hbs index f3f8b21..872faa2 100644 --- a/netforce_clinic/templates/report_account_hd_case_summary.hbs +++ b/netforce_clinic/templates/report_account_hd_case_summary.hbs @@ -17,10 +17,14 @@ {{else}} {{/ifeq}} - {{#each types}} - {{name}}: {{qty}} - {{/each}} - Total: {{total_qty}} + {{#if ptype_id}} + Total: {{total_qty}} + {{else}} + {{#each types}} + {{name}}: {{qty}} + {{/each}} + Total: {{total_qty}} + {{/if}} diff --git a/netforce_clinic/todo.txt b/netforce_clinic/todo.txt index 7a920c0..159be6f 100644 --- a/netforce_clinic/todo.txt +++ b/netforce_clinic/todo.txt @@ -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 **