From 50d293046171019fd5ea4c802cba325d61984642 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Fri, 7 Aug 2015 11:16:57 +0700 Subject: [PATCH] print total epo --- netforce_clinic/models/report_cycle_item.py | 6 ++++++ .../reports/report_cycle_item.xlsx | Bin 5738 -> 5777 bytes .../templates/report_cycle_item.hbs | 6 +++--- 3 files changed, 9 insertions(+), 3 deletions(-) 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 9b6dd227e990c19e25d317bbb533148b7d4c917d..d867e670a277223a2813cc46222fa7992d1fc979 100644 GIT binary patch delta 4042 zcmZWs2{@E%8y0xxVkZp6|Qf=X#&_zTW$Jp8MnJRCzWFV_G^mh=G9tbXOR9 zsez4)hVG|>m8KB`v~Tq)aX`q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IHaVR2VDjqP?>VH@?(*sfg#>513Y^w*BBgfjHU9dbu;a(w3ffCr6mYFCClec>kub z+e#O!fBH@!LEr^y;qk}PnQtOnGR}2r&TGPmo4xHXAuqS)whz;>bEsDbXO}ifBYCer ziV#?rH3uRN*}>sv*oSME{w*uI6M{684-x3Qv2JVbHLBsq;`YRyIb$v^qfI%G=Lz*i zK=`|oiw%7dv&3dC-!~J$G~xL|mBvm!>Z6T|N=yuO zCZX9tg1<3;%0S@%U@Fj#AfDftKU>AGZt=$uLYIU1e`Ef981)|r06-nR17iK#3sZxc Z35L)DVD`U5tzTgw+7Zl03i^HZzX1E@B;Ei3 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 @@ {{nfirst_name}} {{else}} {{#ifeq sub "show"}} - ผู้ป่วย | ยาฉีด + รวม {{no}} {{#each epo_items}} - {{name}} : {{qty}}     + {{name}} = {{qty}}     {{/each}} {{else}} @@ -87,7 +87,7 @@ - ยาฉีดทั้งหมด + ยาทั้งหมด {{total_epo}}