diff --git a/netforce_clinic/models/report_staff_fee.py b/netforce_clinic/models/report_staff_fee.py index 46d3c1e..28ef142 100644 --- a/netforce_clinic/models/report_staff_fee.py +++ b/netforce_clinic/models/report_staff_fee.py @@ -73,10 +73,10 @@ class ReportStaffFeeDetail(Model): if staff_type: dom.append(['staff_id.type','=',staff_type]) staff_name='' + show_qty=False if staff_id: - staff=get_model("clinic.staff").browse(staff_id) - staff_name=staff.name - dom.append(['staff_id','=',staff.id]) + dom.append(['staff_id','=',staff_id]) + show_qty=True dlines=get_model('clinic.labor.cost.line').search_browse(dom) # group by date all_vals={} @@ -123,6 +123,11 @@ class ReportStaffFeeDetail(Model): start=int(time_start[8:10]) stop=int(time_stop[8:10]) diff=stop-start + branch_name='' + if branch: + branch_name='(%s)'%branch.name or '' + if department: + branch_name='(%s)'%department.name or '' data={ 'company_name': company.name or "", 'parent_company_name': company.parent_id.name or "", @@ -135,6 +140,8 @@ class ReportStaffFeeDetail(Model): 'to': time_stop, 'is_duration': diff+1 < total_day, 'year': year, + 'branch_name': branch_name, + 'show_qty': show_qty, } return data diff --git a/netforce_clinic/templates/report_staff_fee.hbs b/netforce_clinic/templates/report_staff_fee.hbs index 6d7da69..4f8970c 100644 --- a/netforce_clinic/templates/report_staff_fee.hbs +++ b/netforce_clinic/templates/report_staff_fee.hbs @@ -1,7 +1,7 @@

ผลตอบแทนดูแลผู้ป่วย

- {{parent_company_name}} {{company_name}}
+ {{parent_company_name}} {{company_name}}{{branch_name}}

{{staff_name}} @@ -51,9 +51,15 @@ {{/unless}} - - รวม - {{currency total_amount}} + {{#if show_qty}} + รวม + {{total_qty}} + {{currency total_amount}} + {{else}} + + รวม + {{currency total_amount}} + {{/if}} {{else}} diff --git a/netforce_clinic/templates/report_staff_fee_detail.hbs b/netforce_clinic/templates/report_staff_fee_detail.hbs index d5bfdfb..197d175 100644 --- a/netforce_clinic/templates/report_staff_fee_detail.hbs +++ b/netforce_clinic/templates/report_staff_fee_detail.hbs @@ -1,5 +1,5 @@
-

ผลตอบแทนดูแลผู้ป่วย

+

รายละเอียดผลตอบแทนดูแลผู้ป่วย

{{parent_company_name}} {{company_name}}