Show general/stock ledger button links to new query reports
diff --git a/public/js/account_tree_grid.js b/public/js/account_tree_grid.js
index 44bef57..1cd9aa6 100644
--- a/public/js/account_tree_grid.js
+++ b/public/js/account_tree_grid.js
@@ -26,9 +26,10 @@
 				show: true, 
 				parent_field: "parent_account", 
 				formatter: function(item) {
-					return repl('<a href="#general-ledger/account=%(enc_value)s">%(value)s</a>', {
+					return repl("<a \
+						onclick='wn.cur_grid_report.show_general_ledger(\"%(value)s\")'>\
+						%(value)s</a>", {
 							value: item.name,
-							enc_value: encodeURIComponent(item.name)
 						});
 				}
 			},
@@ -211,4 +212,14 @@
 			return;
 		}
 	},
+	
+	show_general_ledger: function(account) {
+		wn.route_options = {
+			account: account,
+			company: this.company,
+			from_date: this.from_date,
+			to_date: this.to_date
+		};
+		wn.set_route("query-report", "General Ledger");
+	}
 });
\ No newline at end of file