diff --git a/netforce_clinic/models/report_cycle_item.py b/netforce_clinic/models/report_cycle_item.py index 98dc708..d66dfc2 100644 --- a/netforce_clinic/models/report_cycle_item.py +++ b/netforce_clinic/models/report_cycle_item.py @@ -247,12 +247,14 @@ class ReportCycleItem(Model): epo_items=[{'name': k, 'qty': v} for k,v in epos.items() if k ] nlines.append({ 'sub': 'show', + 'is_sub': True, 'sub_txt': 'รวม', 'row_color': '#dfdfdf', 'no': count, 'fee': sub_fee, 'mdc': sub_mdc, 'epo_items': epo_items, + 'epo_txt': ', '.join(['%s = %s'%(k,v) for k,v in epos.items() if k]) }) for epo_item in epo_items: if not total_epos.get(epo_item['name']): @@ -285,6 +287,9 @@ class ReportCycleItem(Model): }) index+=1 vscl_txt=' '.join(['%s = %s'%(x['description'],x['qty']) for x in vscl_lines]) + total_epo_txt='' + for t_epo in total_epo_items: + total_epo_txt+='%s = %s '%(t_epo['name'], t_epo['qty']) data={ 'company_name': company_name or "", 'lines': nlines, @@ -301,6 +306,7 @@ class ReportCycleItem(Model): 'total_pt': total_pt, 'total_epo': sum([x['qty'] for x in total_epo_items]), 'total_epo_items': total_epo_items, + 'total_epo_txt': total_epo_txt, } return data diff --git a/netforce_clinic/reports/report_cycle_item.xlsx b/netforce_clinic/reports/report_cycle_item.xlsx index 9b6dd22..d867e67 100644 Binary files a/netforce_clinic/reports/report_cycle_item.xlsx and b/netforce_clinic/reports/report_cycle_item.xlsx differ diff --git a/netforce_clinic/templates/report_cycle_item.hbs b/netforce_clinic/templates/report_cycle_item.hbs index 26d0de7..eba30cd 100644 --- a/netforce_clinic/templates/report_cycle_item.hbs +++ b/netforce_clinic/templates/report_cycle_item.hbs @@ -44,12 +44,12 @@