diff --git a/netforce_clinic/models/report_hdcase_expense_summary.py b/netforce_clinic/models/report_hdcase_expense_summary.py index 85b3e46..d1a3325 100644 --- a/netforce_clinic/models/report_hdcase_expense_summary.py +++ b/netforce_clinic/models/report_hdcase_expense_summary.py @@ -292,6 +292,15 @@ class ReportHDCaseExpenseSummary(Model): total_dlz+=line.get('dlz_price',0) 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'] if not cid in old: old.append(cid) @@ -324,14 +333,14 @@ class ReportHDCaseExpenseSummary(Model): 'date_from': date_from, 'date_to': date_to, 'lines': slines, - 'total_fee': total_fee, - 'total_srv': total_srv, - 'total_epo': total_epo, - 'total_mdc': total_mdc, - 'total_lab': total_lab, - 'total_misc': total_misc, - 'total_dlz': total_dlz, - 'total_qty': total_qty, + 'total_fee': total_fee and '{:,}'.format(total_fee) or "", + 'total_srv': total_srv and '{:,}'.format(total_srv) or "", + 'total_epo': total_epo and '{:,}'.format(total_epo) or "", + 'total_mdc': total_mdc and '{:,}'.format(total_mdc) or "", + 'total_lab': total_lab and '{:,}'.format(total_lab) or "", + 'total_misc': total_misc and '{:,}'.format(total_misc) or "", + 'total_dlz': total_dlz and '{:,}'.format(total_dlz) or "", + 'total_qty': total_qty and '{:,}'.format(total_qty) or "", 'types': types, 'reimbursable': reimbursable, 'is_reim': reimbursable=='yes' and True or False, diff --git a/netforce_clinic/reports/report_hdcase_expense_summary_pdf.odt b/netforce_clinic/reports/report_hdcase_expense_summary_pdf.odt index 4bf0a2d..240a5da 100644 Binary files a/netforce_clinic/reports/report_hdcase_expense_summary_pdf.odt and b/netforce_clinic/reports/report_hdcase_expense_summary_pdf.odt differ