[fixed] issue no. 6 from email

dev
SPP 2018-01-09 15:34:18 +07:00
parent 15b91116cd
commit 8afa122743
2 changed files with 17 additions and 8 deletions

View File

@ -292,6 +292,15 @@ class ReportHDCaseExpenseSummary(Model):
total_dlz+=line.get('dlz_price',0) total_dlz+=line.get('dlz_price',0)
line['no']=no line['no']=no
######XXX revise for accountant: convert from int to thounsand without decimal zero
line['fee']=line.get('fee') and '{:,}'.format(line.get('fee',0)) or ""
line['srv']=line.get('srv') and '{:,}'.format(line.get('srv',0)) or ""
line['epo']=line.get('epo') and '{:,}'.format(line.get('epo',0)) or ""
line['mdc']=line.get('mdc') and '{:,}'.format(line.get('mdc',0)) or ""
line['lab']=line.get('lab') and '{:,}'.format(line.get('lab',0)) or ""
line['misc']=line.get('misc') and '{:,}'.format(line.get('misc',0)) or ""
######
cid=line['cid'] cid=line['cid']
if not cid in old: if not cid in old:
old.append(cid) old.append(cid)
@ -324,14 +333,14 @@ class ReportHDCaseExpenseSummary(Model):
'date_from': date_from, 'date_from': date_from,
'date_to': date_to, 'date_to': date_to,
'lines': slines, 'lines': slines,
'total_fee': total_fee, 'total_fee': total_fee and '{:,}'.format(total_fee) or "",
'total_srv': total_srv, 'total_srv': total_srv and '{:,}'.format(total_srv) or "",
'total_epo': total_epo, 'total_epo': total_epo and '{:,}'.format(total_epo) or "",
'total_mdc': total_mdc, 'total_mdc': total_mdc and '{:,}'.format(total_mdc) or "",
'total_lab': total_lab, 'total_lab': total_lab and '{:,}'.format(total_lab) or "",
'total_misc': total_misc, 'total_misc': total_misc and '{:,}'.format(total_misc) or "",
'total_dlz': total_dlz, 'total_dlz': total_dlz and '{:,}'.format(total_dlz) or "",
'total_qty': total_qty, 'total_qty': total_qty and '{:,}'.format(total_qty) or "",
'types': types, 'types': types,
'reimbursable': reimbursable, 'reimbursable': reimbursable,
'is_reim': reimbursable=='yes' and True or False, 'is_reim': reimbursable=='yes' and True or False,