From 5b2d9cdf82c58192c0008456b298f1d203e5f00a Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Thu, 13 Apr 2017 11:54:44 +0700 Subject: [PATCH] excel report account hd case summary --- .../models/report_account_hd_case_summary.py | 2 ++ .../report_account_hd_case_summary.xlsx | Bin 7474 -> 8323 bytes .../report_account_hd_case_summary.hbs | 14 +++++++------- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/netforce_clinic/models/report_account_hd_case_summary.py b/netforce_clinic/models/report_account_hd_case_summary.py index 10a103c..83348cf 100644 --- a/netforce_clinic/models/report_account_hd_case_summary.py +++ b/netforce_clinic/models/report_account_hd_case_summary.py @@ -340,6 +340,8 @@ class ReportAccountHDCaseSummary(Model): 'name': categ, 'qty': qty, }) + data['categ_lines_txt']=', '.join(['%s: %s'%(l['name'], l['qty']) for l in data['categ_lines']]) + data['types_txt']=', '.join(['%s: %s'%(l['name'], l['qty']) for l in data['types'] +[{"name": "Total", "qty": total_qty}]]) return data def onchange_date(self,context={}): diff --git a/netforce_clinic/reports/report_account_hd_case_summary.xlsx b/netforce_clinic/reports/report_account_hd_case_summary.xlsx index be763ec7268c0eb46ffc400dba41e8dfc8e55163..8b0c9b7b9f1ee9345e3bb5a48cceda6025fe7372 100644 GIT binary patch literal 8323 zcmeHsWmH_-vMw6j2~L3E8eAFz3GN!)U4py2ySq!H!D$?V1$Tne5ZpBc2zFubcVBXI z&)MUR_xscuqr2xCUDc~=)>k#FK6xo<7;Ff5czB3a4{0z7o%K4=_{Bf zm*JUW;i5KW8uXFTcX%EJIjC0$gzXnfp4Q!LaqW+s!I<phS5l*H!al8LwzW z->|h|$c+mtDd!T%wpzY%x$%&NrC4jXPSoz?<(*!RX z^UxMAvo~z^_46dPnE-^m6db%snSbNj)8FQWf_Pg0JIA0ueZ$DcP~P6g*5Qr5tu2$Q zm1S1!s6`JmdfaJYwT!N9;5_R8@5SDS%& zT!|)5P}B}emb#fN6x1~Xj)nR}QT{2pRB*4%hv&n)BiA@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W%y@;#R6`iV|)TO`W98x*Q?84UsxYf)u;5XQ9fBmUmYRtGe=pi-O0v2CVxw- zm8WK!%o5mD8jSL`R{Qx7oyJge?z)b$^0~nHv@qQl;M!)MYg34ThpynOHm3UT$sdrV z(S>PdlE=CP(RO!dty%Sj+?W{Xf%IePN6h*+j|ae)bUZzNi9y66hW6CQC56-$uU1=n z`P~$bi?HhPGpi1oc)H|JB`Jg*F7Z-B*iQp!OnlKoIT_JY_$z1)YrLvzC7+SDULnR` zQomIEbi10t5C4$u(B{QBo_o|S?n_ujSy(t+n4cr1UuP;0Bc*?}Uj|ISJN`Ojco@0- zG@|>z`p*NH-{bt+OnsP0{4~*fg1V3Mr}K&5qx@Q-|7(=D_ly3MC_mb;zeoAc_Y!}P z&7Va1QQQ9>z|IV8N6gcB5H5$^>(3=Hc1tN;F4QTp*1{vX+r=e7U< diff --git a/netforce_clinic/templates/report_account_hd_case_summary.hbs b/netforce_clinic/templates/report_account_hd_case_summary.hbs index c1071bf..e64af47 100644 --- a/netforce_clinic/templates/report_account_hd_case_summary.hbs +++ b/netforce_clinic/templates/report_account_hd_case_summary.hbs @@ -25,14 +25,14 @@ {{else}} {{/ifeq}} - {{#if ptype_id}} + {{#if ptype_id}} + Total: {{total_qty}} + {{else}} + {{#each types}} + {{name}}: {{qty}} + {{/each}} Total: {{total_qty}} - {{else}} - {{#each types}} - {{name}}: {{qty}} - {{/each}} - Total: {{total_qty}} - {{/if}} + {{/if}}