diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py
index 635bdc1..705a26e 100644
--- a/erpnext/accounts/doctype/tax_rule/tax_rule.py
+++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py
@@ -85,13 +85,22 @@
 				frappe.throw(_("Tax Rule Conflicts with {0}".format(tax_rule[0].name)), ConflictingTaxRule)
 
 @frappe.whitelist()
-def get_party_details(party, party_type):
+def get_party_details(party, party_type, args=None):
 	out = {}
-	billing_address = frappe.get_list("Address", fields=["city", "country"], filters={party_type: party, "is_primary_address": 1})
-	shipping_address = frappe.get_list("Address", fields=["city", "country"], filters={party_type:party, "is_shipping_address": 1})
+	if args:
+		billing_filters=	{"name": args.get("billing_address")}
+		shipping_filters=	{"name": args.get("shipping_address")}
+	else:
+		billing_filters=	{party_type: party, "is_primary_address": 1}
+		shipping_filters=	{party_type:party, "is_shipping_address": 1}
+		
+	billing_address=	frappe.get_all("Address", fields=["city", "country"], filters= billing_filters)
+	shipping_address=	frappe.get_all("Address", fields=["city", "country"], filters= shipping_filters)
+	
 	if billing_address:
 		out["billing_city"]= billing_address[0].city
 		out["billing_country"]= billing_address[0].country
+
 	if shipping_address:
 		out["shipping_city"]= shipping_address[0].city
 		out["shipping_country"]= shipping_address[0].country
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index 313544f..a6b5c78 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -43,7 +43,7 @@
 	set_contact_details(out, party, party_type)
 	set_other_values(out, party, party_type)
 	set_price_list(out, party, party_type, price_list)
-	out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company, out)
+	out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company, out.customer_group, out.supplier_type)
 
 	if not out.get("currency"):
 		out["currency"] = currency
@@ -277,19 +277,23 @@
 			else:
 				frappe.throw(_("Due / Reference Date cannot be after {0}").format(formatdate(default_due_date)))
 				
-def set_taxes(party, party_type, posting_date, company, out):
-	print "posting_date", posting_date
+@frappe.whitelist()
+def set_taxes(party, party_type, posting_date, company, customer_group=None, supplier_type=None, billing_address=None, shipping_address=None):
 	from erpnext.accounts.doctype.tax_rule.tax_rule import get_tax_template, get_party_details
 	args = {
 		party_type: 		party,
-		"customer_group":	out.customer_group,
-		"supplier_type":	out.supplier_type,
+		"customer_group":	customer_group,
+		"supplier_type":	supplier_type,
 		"company":			company
 	}
-	args.update(get_party_details(party, party_type))
+	
+	if billing_address or shipping_address:
+		args.update(get_party_details(party, party_type, {"billing_address": billing_address, "shipping_address": shipping_address }))
+	else:
+		args.update(get_party_details(party, party_type))
+	
 	if party_type=="Customer":
 		args.update({"tax_type": "Sales"})
 	else:
 		args.update({"tax_type": "Purchase"})
-		
 	return get_tax_template(posting_date, args)
\ No newline at end of file
diff --git a/erpnext/public/js/utils/party.js b/erpnext/public/js/utils/party.js
index 59992eb..1a86b2b 100644
--- a/erpnext/public/js/utils/party.js
+++ b/erpnext/public/js/utils/party.js
@@ -43,6 +43,7 @@
 
 erpnext.utils.get_address_display = function(frm, address_field, display_field) {
 	if(frm.updating_party_details) return;
+	
 	if(!address_field) {
 		if(frm.doc.customer) {
 			address_field = "customer_address";
@@ -50,14 +51,32 @@
 			address_field = "supplier_address";
 		} else return;
 	}
+ 
 	if(!display_field) display_field = "address_display";
 	if(frm.doc[address_field]) {
 		frappe.call({
 			method: "erpnext.utilities.doctype.address.address.get_address_display",
 			args: {"address_dict": frm.doc[address_field] },
 			callback: function(r) {
-				if(r.message)
+				if(r.message){
 					frm.set_value(display_field, r.message)
+				}
+				frappe.call({
+					method: "erpnext.accounts.party.set_taxes",
+					args: {
+						"party": frm.doc.customer || frm.doc.supplier,
+						"party_type": (frm.doc.customer ? "Customer" : "Supplier"),
+						"posting_date": frm.doc.posting_date || frm.doc.transaction_date,
+						"company": frm.doc.company,
+						"billing_address": ((frm.doc.customer) ? (frm.doc.customer_address) : (frm.doc.supplier_address)),
+						"shipping_address": frm.doc.shipping_address_name
+					},
+					callback: function(r) {
+						if(r.message){
+							frm.set_value("taxes_and_charges", r.message)
+						}
+					}
+				});
 			}
 		})
 	}
