Merge pull request #18155 from scmmishra/accounts-rec-report

fix: format values for charts
This commit is contained in:
rohitwaghchaure 2019-07-03 19:26:08 +05:30 committed by GitHub
commit 465196b0c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -599,9 +599,12 @@ class ReceivablePayableReport(object):
rows = []
for d in data:
values = d[self.ageing_col_idx_start : self.ageing_col_idx_start+5]
precision = cint(frappe.db.get_default("float_precision")) or 2
formatted_values = [frappe.utils.rounded(val, precision) for val in values]
rows.append(
{
'values': d[self.ageing_col_idx_start : self.ageing_col_idx_start+5]
'values': formatted_values
}
)