misc, lab is not correct

conv_bal
watcha.h 2015-04-23 17:45:02 +07:00
parent 62c044f070
commit c68c521922
2 changed files with 10 additions and 19 deletions

View File

@ -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("-")

View File

@ -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 ""