Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js
index 21be3a0..a462b70 100644
--- a/accounts/page/general_ledger/general_ledger.js
+++ b/accounts/page/general_ledger/general_ledger.js
@@ -186,7 +186,6 @@
 		var totals = this.make_summary_row("Totals", this.account);
 
 		var grouped_ledgers = {};
-
 		$.each(data, function(i, item) {
 			if((me.is_default("company") ? true : me.apply_filter(item, "company")) &&
 				(me.account ? me.is_child_account(me.account, item.account) 
@@ -217,8 +216,7 @@
 					grouped_ledgers[item.account].totals.debit += item.debit;
 					grouped_ledgers[item.account].totals.credit += item.credit;
 				}
-
-				if(me.account) {
+				if(item.account) {
 					item.against_account = me.voucher_accounts[item.voucher_type + ":"
 						+ item.voucher_no][(item.debit > 0 ? "credits" : "debits")].join(", ");
 				}
diff --git a/stock/page/stock_ageing/stock_ageing.js b/stock/page/stock_ageing/stock_ageing.js
index edad9a7..456f5f1 100644
--- a/stock/page/stock_ageing/stock_ageing.js
+++ b/stock/page/stock_ageing/stock_ageing.js
@@ -95,6 +95,8 @@
 		
 		this.data = [].concat(this._data);
 		
+		this.serialized_buying_rates = this.get_serialized_buying_rates();
+		
 		$.each(this.data, function(i, d) {
 			me.reset_item_values(d);
 		});