From 7076ff22601f4a6b469e2d31ef4733c2eb9a84a0 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 26 Jun 2013 12:05:37 +0530 Subject: [PATCH] [grid report] round currency values --- public/js/wn/views/grid_report.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/public/js/wn/views/grid_report.js b/public/js/wn/views/grid_report.js index 23263603c7..87339da707 100644 --- a/public/js/wn/views/grid_report.js +++ b/public/js/wn/views/grid_report.js @@ -307,7 +307,16 @@ wn.views.GridReport = Class.extend({ var me = this; $.each(this.columns, function(i, col) { if (col.formatter==me.currency_formatter) { - item[col.id] = 0; + item[col.id] = 0.0; + } + }); + }, + + round_item_values: function(item) { + var me = this; + $.each(this.columns, function(i, col) { + if (col.formatter==me.currency_formatter) { + item[col.id] = flt(item[col.id], wn.defaults.get_default("float_precision") || 6); } }); },