From 4c996693a3ce56cac988e16b1a362f3bf12177c8 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Wed, 31 Aug 2016 20:15:46 +0700 Subject: [PATCH] mdc_name & mdc_desc --- netforce_clinic/models/hd_case.py | 7 ++++++- netforce_clinic/models/report_cycle_item.py | 1 + .../reports/report_cycle_item.xlsx | Bin 5852 -> 6041 bytes .../templates/report_cycle_item.hbs | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index e07ab4e..3c1c09e 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -104,6 +104,7 @@ class HDCase(Model): dlz_name=','.join([dlz for dlz in dlz_name]) epo_names=[] mdc_names=[] + mdc_descs=[] iron_names=[] fee=0 lab=0 @@ -124,6 +125,7 @@ class HDCase(Model): sign=-1 if categ.parent_id: if categ.parent_id.code=='MDC': + mdc_descs.append(prod.description or "") if reimbursable_ctx: if reimbursable_ctx==line.reimbursable: mdc+=amt @@ -134,6 +136,7 @@ class HDCase(Model): mdc_items.setdefault(prod_name,0) mdc_items[prod_name]=line.qty if categ.code=='EPO': + mdc_descs.append((prod.description or "").title()) epo_names.append(prod_name.title()) mdc_items.setdefault(prod_name,0) mdc_items[prod_name]=line.qty @@ -160,6 +163,7 @@ class HDCase(Model): res[obj.id]={ 'epo': ','.join([n for n in epo_names]), 'mdc_name': ','.join([n for n in mdc_names]), + 'mdc_desc': ','.join([n for n in mdc_descs]), 'mdc_items': str(mdc_items), 'iron_name': ','.join([n for n in iron_names]), 'fee': fee, @@ -228,7 +232,8 @@ class HDCase(Model): "dlz_id": fields.Integer("DZ ID",function="_get_expense",function_multi=True), "mdc": fields.Float("MDC",function="_get_expense",function_multi=True), "srv": fields.Float("Service",function="_get_expense",function_multi=True), - "mdc_name": fields.Float("MDC Name",function="_get_expense",function_multi=True), + "mdc_name": fields.Char("MDC Name",function="_get_expense",function_multi=True), + "mdc_desc": fields.Char("MDC Desc",function="_get_expense",function_multi=True), "mdc_items": fields.Float("MDC Items",function="_get_expense",function_multi=True), "iron_name": fields.Float("Iron Name",function="_get_expense",function_multi=True), 'sickbed_id': fields.Many2One("clinic.sickbed",'Sickbed'), diff --git a/netforce_clinic/models/report_cycle_item.py b/netforce_clinic/models/report_cycle_item.py index 5d7024e..c7fd5e5 100644 --- a/netforce_clinic/models/report_cycle_item.py +++ b/netforce_clinic/models/report_cycle_item.py @@ -176,6 +176,7 @@ class ReportCycleItem(Model): 'hdcase_number': reformat_number(hdcase.number), 'hdcase_id': hdcase.id, 'mdc_name': hdcase.mdc_name or hdcase.epo, + 'mdc_desc': hdcase.mdc_desc, 'mdc_items': hdcase.mdc_items, 'iron_name': hdcase.iron_name or '', 'fee': abs(hdcase.fee), diff --git a/netforce_clinic/reports/report_cycle_item.xlsx b/netforce_clinic/reports/report_cycle_item.xlsx index fc1e5b1291c1caea404f26a440b1f93becfef71f..6a5f737d8a1410f83dec7638647c828dad88e8d3 100644 GIT binary patch delta 5066 zcmZ8lbySpF*CzyFqy}c_OAIB9G)SX_fYi_+CEbh&0z-^L2uR1!Al=d}-Q6WAAtfCO z62d3$1T-5a zBPt4JkHrh>I{XDvI%-JKDt>Rl#F@*MDUs8xsQkrF@g}+{?#F^qZAO}x*D3B>eu8D? zFM@1+-92OI-iT;izlfed8JOgTK_f&(3LNIl`xG{!)+Z-^6iG{FQLUD&h?mPI-&LJg zz0HKsZmj22(B8xj?=%r?l9TYnLn&;9ak4Apwfopkf)#Gw?~>h6*k!eRhrT>X z<$yWiONs0W@eFJ-VThN^kJ!ZRmEe?-bt8o38xi z;$Cwrw5^0WYQ>%HnrGzXIlA`!aq>@0HKqG_pdfhdCI$wE2POu_zaGK)+a+juEJhSk z!wBZj145qbMzzSW4>~<=BNg;=4i2Uae^s+s!4aFcA9!_6PU*0-wjgnynszm9aiOjI zg{~SHt_;MNUiV#BVYEof+VbAuj7toL^~t>}wZx2m z;NtYENfAy^D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