Replaced renamed total fields in code files
diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js
index 07d6841..113612a 100644
--- a/erpnext/public/js/controllers/taxes_and_totals.js
+++ b/erpnext/public/js/controllers/taxes_and_totals.js
@@ -227,8 +227,8 @@
 		if(tax.charge_type == "Actual") {
 			// distribute the tax amount proportionally to each item row
 			var actual = flt(tax.rate, precision("tax_amount", tax));
-			current_tax_amount = this.frm.doc.net_total ?
-			((item.base_amount / this.frm.doc.net_total) * actual) : 0.0;
+			current_tax_amount = this.frm.doc.base_net_total ?
+			((item.base_amount / this.frm.doc.base_net_total) * actual) : 0.0;
 
 		} else if(tax.charge_type == "On Net Total") {
 			current_tax_amount = (tax_rate / 100.0) * item.base_amount;
@@ -258,7 +258,7 @@
 	},
 
 	adjust_discount_amount_loss: function(tax) {
-		var discount_amount_loss = this.frm.doc.grand_total - flt(this.frm.doc.base_discount_amount) - tax.total;
+		var discount_amount_loss = this.frm.doc.base_grand_total - flt(this.frm.doc.base_discount_amount) - tax.total;
 		tax.tax_amount_after_discount_amount = flt(tax.tax_amount_after_discount_amount +
 			discount_amount_loss, precision("tax_amount", tax));
 		tax.total = flt(tax.total + discount_amount_loss, precision("total", tax));
@@ -266,7 +266,7 @@
 
 
 	_cleanup: function() {
-		this.frm.doc.in_words = this.frm.doc.in_words_import = this.frm.doc.in_words_export = "";
+		this.frm.doc.base_in_words = this.frm.doc.in_words = this.frm.doc.in_words = "";
 
 		if(this.frm.doc["items"] && this.frm.doc["items"].length) {
 			if(!frappe.meta.get_docfield(this.frm.doc["items"][0].doctype, "item_tax_amount", this.frm.doctype)) {
@@ -338,8 +338,8 @@
 				total_actual_tax += value;
 		});
 
-		grand_total_for_discount_amount = flt(this.frm.doc.grand_total - total_actual_tax,
-			precision("grand_total"));
+		grand_total_for_discount_amount = flt(this.frm.doc.base_grand_total - total_actual_tax,
+			precision("base_grand_total"));
 		return grand_total_for_discount_amount;
 	},
 
diff --git a/erpnext/public/js/feature_setup.js b/erpnext/public/js/feature_setup.js
index 536f956..f83c953 100644
--- a/erpnext/public/js/feature_setup.js
+++ b/erpnext/public/js/feature_setup.js
@@ -111,30 +111,30 @@
 		'Sales Order': {'items':['page_break']}
 	},
 	'fs_exports': {
-		'Delivery Note': {'fields':['conversion_rate','currency','grand_total','in_words','rounded_total'],'items':['base_price_list_rate','base_amount','base_rate']},
+		'Delivery Note': {'fields':['conversion_rate','currency','base_grand_total','base_in_words','base_rounded_total'],'items':['base_price_list_rate','base_amount','base_rate']},
 		'POS Setting': {'fields':['conversion_rate','currency']},
-		'Quotation': {'fields':['conversion_rate','currency','grand_total','in_words','rounded_total'],'items':['base_price_list_rate','base_amount','base_rate']},
-		'Sales Invoice': {'fields':['conversion_rate','currency','grand_total','in_words','rounded_total'],'items':['base_price_list_rate','base_amount','base_rate']},
+		'Quotation': {'fields':['conversion_rate','currency','base_grand_total','base_in_words','base_rounded_total'],'items':['base_price_list_rate','base_amount','base_rate']},
+		'Sales Invoice': {'fields':['conversion_rate','currency','base_grand_total','base_in_words','base_rounded_total'],'items':['base_price_list_rate','base_amount','base_rate']},
 		'Sales BOM': {'fields':['currency']},
-		'Sales Order': {'fields':['conversion_rate','currency','grand_total','in_words','rounded_total'],'items':['base_price_list_rate','base_amount','base_rate']}
+		'Sales Order': {'fields':['conversion_rate','currency','base_grand_total','base_in_words','base_rounded_total'],'items':['base_price_list_rate','base_amount','base_rate']}
 	},
 
 	'fs_imports': {
 		'Purchase Invoice': {
-			'fields': ['conversion_rate', 'currency', 'grand_total',
-		 		'in_words', 'net_total', 'other_charges_added',
-		 		'other_charges_deducted'],
+			'fields': ['conversion_rate', 'currency', 'base_grand_total',
+		 		'base_in_words', 'base_net_total', 'base_taxes_and_charges_added',
+		 		'base_taxes_and_charges_deducted'],
 			'items': ['base_price_list_rate', 'base_amount','base_rate']
 		},
 		'Purchase Order': {
-			'fields': ['conversion_rate','currency', 'grand_total',
-			'in_words', 'net_total', 'other_charges_added',
-			 'other_charges_deducted'],
+			'fields': ['conversion_rate','currency', 'base_grand_total',
+			'base_in_words', 'base_net_total', 'base_taxes_and_charges_added',
+			 'base_taxes_and_charges_deducted'],
 			'items': ['base_price_list_rate', 'base_amount','base_rate']
 		},
 		'Purchase Receipt': {
-			'fields': ['conversion_rate', 'currency','grand_total', 'in_words',
-			 	'net_total', 'other_charges_added', 'other_charges_deducted'],
+			'fields': ['conversion_rate', 'currency','base_grand_total', 'base_in_words',
+			 	'base_net_total', 'base_taxes_and_charges_added', 'base_taxes_and_charges_deducted'],
 			'items': ['base_price_list_rate','base_amount','base_rate']
 		},
 		'Supplier Quotation': {
diff --git a/erpnext/public/js/pos/pos.js b/erpnext/public/js/pos/pos.js
index e6394f6..5aaadb4 100644
--- a/erpnext/public/js/pos/pos.js
+++ b/erpnext/public/js/pos/pos.js
@@ -26,23 +26,19 @@
 
 		// Check whether the transaction is "Sales" or "Purchase"
 		if (frappe.meta.has_field(cur_frm.doc.doctype, "customer")) {
-			this.set_transaction_defaults("Customer", "export");
+			this.set_transaction_defaults("Customer");
 		}
 		else if (frappe.meta.has_field(cur_frm.doc.doctype, "supplier")) {
-			this.set_transaction_defaults("Supplier", "import");
+			this.set_transaction_defaults("Supplier");
 		}
 	},
-	set_transaction_defaults: function(party, export_or_import) {
+	set_transaction_defaults: function(party) {
 		var me = this;
 		this.party = party;
 		this.price_list = (party == "Customer" ?
 			this.frm.doc.selling_price_list : this.frm.doc.buying_price_list);
 		this.price_list_field = (party == "Customer" ? "selling_price_list" : "buying_price_list");
 		this.sales_or_purchase = (party == "Customer" ? "Sales" : "Purchase");
-		this.net_total = "net_total_" + export_or_import;
-		this.grand_total = "grand_total_" + export_or_import;
-		// this.amount = export_or_import + "_amount";
-		// this.rate = export_or_import + "_rate";
 	},
 	make: function() {
 		this.make_party();
@@ -282,10 +278,8 @@
 	},
 	set_totals: function() {
 		var me = this;
-		this.wrapper.find(".net-total").text(format_currency(this.frm.doc[this.net_total],
-			me.frm.doc.currency));
-		this.wrapper.find(".grand-total").text(format_currency(this.frm.doc[this.grand_total],
-			me.frm.doc.currency));
+		this.wrapper.find(".net-total").text(format_currency(me.frm.doc["net_total"], me.frm.doc.currency));
+		this.wrapper.find(".grand-total").text(format_currency(me.frm.doc.grand_total, me.frm.doc.currency));
 	},
 	call_when_local: function() {
 		var me = this;
@@ -414,12 +408,12 @@
 						title: 'Payment',
 						fields: [
 							{fieldtype:'Currency', fieldname:'total_amount', label: __('Total Amount'), read_only:1,
-								options:"currency", default:me.frm.doc.grand_total_export, read_only: 1},
+								options:"currency", default:me.frm.doc.grand_total, read_only: 1},
 							{fieldtype:'Select', fieldname:'mode_of_payment', label: __('Mode of Payment'),
 								options:modes_of_payment.join('\n'), reqd: 1, default: default_mode},
 							{fieldtype:'Currency', fieldname:'paid_amount', label:__('Amount Paid'), reqd:1,
 								options: "currency",
-								default:me.frm.doc.grand_total_export, hidden: 1},
+								default:me.frm.doc.grand_total, hidden: 1},
 							{fieldtype:'Currency', fieldname:'change', label: __('Change'), options: "currency",
 								default: 0.0, hidden: 1},
 							{fieldtype:'Currency', fieldname:'write_off_amount', label: __('Write Off'), options: "currency",
@@ -473,7 +467,7 @@
 						me.frm.set_value("paid_amount", paid_amount);
 
 						// specifying writeoff amount here itself, so as to avoid recursion issue
-						me.frm.set_value("write_off_amount", me.frm.doc.grand_total - paid_amount);
+						me.frm.set_value("write_off_amount", me.frm.doc.base_grand_total - paid_amount);
 						me.frm.set_value("outstanding_amount", 0);
 
 						me.frm.savesubmit(this);