diff --git a/netforce_clinic/models/report_cycle_item.py b/netforce_clinic/models/report_cycle_item.py index bf0218f..cba6277 100644 --- a/netforce_clinic/models/report_cycle_item.py +++ b/netforce_clinic/models/report_cycle_item.py @@ -225,12 +225,15 @@ class ReportCycleItem(Model): }) ptype_lines=[] total_pt=0 - for pname,qty in ptypes.items(): + pkeys=list(ptypes.keys()) + for pname in sorted(pkeys): + qty=ptypes[pname] ptype_lines.append({ 'name': pname, 'qty': qty, }) total_pt+=qty + ptype_txt=' '.join(['%s: %s'%(x['name'],x['qty']) for x in ptype_lines]) vscl_lines2=[{}] index=1 for vscl_line in vscl_lines: @@ -239,14 +242,13 @@ class ReportCycleItem(Model): 'v%s_1'%index: vscl_line['qty'], }) index+=1 - #for nline in nlines: - #print(nline.get('date'), nline.get('nfirst_name')) data={ 'company_name': company_name or "", 'lines': nlines, 'vscl_lines': vscl_lines, 'vscl_lines2': vscl_lines2, 'ptype_lines': ptype_lines, + 'ptype_txt': ptype_txt, 'month': month_str, 'date_from': date_from, 'date_to': date_to, diff --git a/netforce_clinic/reports/report_cycle_item.xlsx b/netforce_clinic/reports/report_cycle_item.xlsx index 8002e43..4cf0f50 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 fd6eb88..f0b4310 100644 --- a/netforce_clinic/templates/report_cycle_item.hbs +++ b/netforce_clinic/templates/report_cycle_item.hbs @@ -71,19 +71,14 @@