diff --git a/netforce_clinic/models/report_cycle_item.py b/netforce_clinic/models/report_cycle_item.py index c7fd5e5..58752fe 100644 --- a/netforce_clinic/models/report_cycle_item.py +++ b/netforce_clinic/models/report_cycle_item.py @@ -277,7 +277,7 @@ class ReportCycleItem(Model): # if nurse more that cres, should show name of nurses nlines+=more_lines if no==count: - epo_items=[{'name': k, 'qty': v} for k,v in epos.items() if k ] + epo_items=sorted([{'name': k, 'qty': v} for k,v in epos.items() if k ], key=lambda a: a['name']) #sort item #clines=sorted(clines,key=lambda cl: cl[sort_by]) no=1 @@ -322,13 +322,13 @@ class ReportCycleItem(Model): '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]) + 'epo_txt': ', '.join(['%s = %s'%(v['name'], v['qty']) for v in epo_items if v]) }) for epo_item in epo_items: if not total_epos.get(epo_item['name']): total_epos[epo_item['name']]=0 total_epos[epo_item['name']]+=epo_item['qty'] or 0 - total_epo_items=[{'name': k, 'qty': v} for k,v in total_epos.items() if k ] + total_epo_items=sorted([{'name': k, 'qty': v} for k,v in total_epos.items() if k ], key=lambda a: a['name']) vscl_lines=[] for k,v in vasculars.items(): vscl_lines.append({ diff --git a/netforce_clinic/reports/report_receipt_summary.xlsx b/netforce_clinic/reports/report_receipt_summary.xlsx index 459685f..baf98b0 100644 Binary files a/netforce_clinic/reports/report_receipt_summary.xlsx and b/netforce_clinic/reports/report_receipt_summary.xlsx differ