From c68c5219222b67fc6a1bc40320eddb02be0fc963 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Thu, 23 Apr 2015 17:45:02 +0700 Subject: [PATCH] misc, lab is not correct --- netforce_clinic/models/hd_case.py | 1 + .../models/report_account_hd_case_summary.py | 28 ++++++------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index bd753cf..057ae8c 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -122,6 +122,7 @@ class HDCase(Model): else: mdc+=amt mdc_names.append(name or "") + continue #XXX if categ.code=='EPO': name=prod.name or "" name=name.split("-") diff --git a/netforce_clinic/models/report_account_hd_case_summary.py b/netforce_clinic/models/report_account_hd_case_summary.py index 5b9234f..bfab66b 100644 --- a/netforce_clinic/models/report_account_hd_case_summary.py +++ b/netforce_clinic/models/report_account_hd_case_summary.py @@ -199,28 +199,18 @@ class ReportAccountHDCaseSummary(Model): number=vals['number'] if number not in records.keys(): records[number]=vals - else: - for code, item in items.items(): - if vals.get(code): - if not records[number].get(code): - records[number][code]=0 - records[number][code]+=vals[code] - records[number]['lab']+=vals['lab'] - records[number]['misc']+=vals['misc'] - + #FIXME please check + #else: + #for code, item in items.items(): + #if vals.get(code): + #if not records[number].get(code): + #records[number][code]=0 + #records[number][code]+=vals[code] + #records[number]['lab']+=vals['lab'] + #records[number]['misc']+=vals['misc'] lines=[] for hdnumber, vals in records.items(): lines.append(vals) - #get data from rd shop - #if reimbursable=='no': - #ctx={ - #'date_from': date_from, - #'date_to': date_to, - #'branch_id': branch_id, - #'department_id': department_id, - #} - #shop_lines=get_model('clinic.shop').get_shop_data(context=ctx)['records'] - #lines+=shop_lines company_name=company.name or "" if department_id: company_name+=' (%s)'%get_model('clinic.department').browse(department_id).name or ""