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 fc1e5b1..6a5f737 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 5cab149..011b848 100644 --- a/netforce_clinic/templates/report_cycle_item.hbs +++ b/netforce_clinic/templates/report_cycle_item.hbs @@ -38,7 +38,7 @@ {{pname}} {{dname}} {{tname}} - {{mdc_name}} + {{mdc_desc}} {{iron_name}} {{hct}} {{dlz_name}} @@ -62,7 +62,7 @@ {{pname}} {{dname}} {{tname}} - {{mdc_name}} + {{mdc_desc}} {{iron_name}} {{hct}} {{dlz_name}}