From 9716398d93ca9ce52581506bbee40a64215de1f2 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Wed, 6 May 2015 16:53:47 +0700 Subject: [PATCH] improve report cycle item --- netforce_clinic/models/report_cycle_item.py | 8 +++++--- .../reports/report_cycle_item.xlsx | Bin 5563 -> 5576 bytes .../templates/report_cycle_item.hbs | 17 ++++++----------- 3 files changed, 11 insertions(+), 14 deletions(-) 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 8002e43210b39a039c10db4cc86db90414c7a792..4cf0f5001b6936c9447229a903fa3644081a1dde 100644 GIT binary patch delta 2348 zcmZuzc{CJkA01{4*=3L=y%_5x$|%M*w&4wP$xg(els9AfaL)Ig-gCa^oO|y%&vWkYujky~ZGur?>{pC{AP9hkg#|!BSF#H* zFcQ$!k_>{!iez*?)*|4kBTXTJWbtt$ijX$Ctd4q9)^dXQPyiRfz?9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