From e395de340ee34443c8f088eda39ca7941da2e58c Mon Sep 17 00:00:00 2001 From: RicardoJohann Date: Thu, 6 Apr 2017 08:55:46 -0300 Subject: [PATCH] Export indentation as per tree report (#2882) * Export indentation as per tree report * Export indentation as per tree report fixed tabs and hardcoded --- frappe/public/js/frappe/misc/tools.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frappe/public/js/frappe/misc/tools.js b/frappe/public/js/frappe/misc/tools.js index 622d0da507..1414a5eee6 100644 --- a/frappe/public/js/frappe/misc/tools.js +++ b/frappe/public/js/frappe/misc/tools.js @@ -77,6 +77,14 @@ frappe.slickgrid_tools = { get_filtered_items: function(dataView) { var data = []; for (var i=0, len=dataView.getLength(); i 0 && (isNaN((new Date(val)).valueOf()))) { + val = " ".repeat(d['indent'] * 8) + val; + } + // remove single quotes at start and end of total labels when export to csv + if(val.charAt(0) == "'" && val.charAt(val.length -1) == "'") { + val = val.substr(1, val.length-2); + } + } row.push(val); });