diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
index 6d7f2db..a2c3321 100644
--- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
+++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js
@@ -8,19 +8,20 @@
 // 
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 // GNU General Public License for more details.
 // 
 // You should have received a copy of the GNU General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 //--------- ONLOAD -------------
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
-  // 
+	if(doc.doctype === "Sales Taxes and Charges Master")
+		erpnext.add_for_territory();
 }
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
-   cur_frm.set_footnote(wn.markdown(cur_frm.meta.description));
+	 cur_frm.set_footnote(wn.markdown(cur_frm.meta.description));
 }
 
 // For customizing print
@@ -41,7 +42,7 @@
 }
 
 cur_frm.pformat.other_charges= function(doc){
-  //function to make row of table
+	//function to make row of table
 	var make_row = function(title,val,bold){
 		var bstart = '<b>'; var bend = '</b>';
 		return '<tr><td style="width:50%;">'+(bold?bstart:'')+title+(bold?bend:'')+'</td>'
@@ -63,7 +64,7 @@
 	if (!doc.print_without_amount) {
 		var cl = getchildren('Sales Taxes and Charges',doc.name,'other_charges');
 
-		// outer table  
+		// outer table	
 		var out='<div><table class="noborder" style="width:100%"><tr><td style="width: 60%"></td><td>';
 
 		// main table
@@ -77,7 +78,7 @@
 		if(cl.length){
 			for(var i=0;i<cl.length;i++){
 				if(convert_rate(cl[i].tax_amount)!=0 && !cl[i].included_in_print_rate)
-				  out += make_row(cl[i].description,convert_rate(cl[i].tax_amount),0);
+					out += make_row(cl[i].description,convert_rate(cl[i].tax_amount),0);
 			}
 		}
 
@@ -96,98 +97,98 @@
 			out += '<table><tr><td style="width:25%;"><b>In Words</b></td>'
 			out+= '<td style="width:50%;">'+doc.in_words_export+'</td></tr>'
 		}
-		out +='</table></td></tr></table></div>';   
+		out +='</table></td></tr></table></div>';	 
 	}
 	return out;
 }
 
 cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
-  var d = locals[cdt][cdn];
-  if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){
-    alert("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row");
-    d.charge_type = '';
-  }
-  validated = false;
-  refresh_field('charge_type',d.name,'other_charges');
-  cur_frm.cscript.row_id(doc, cdt, cdn);
-  cur_frm.cscript.rate(doc, cdt, cdn);
-  cur_frm.cscript.tax_amount(doc, cdt, cdn);
+	var d = locals[cdt][cdn];
+	if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){
+		alert("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row");
+		d.charge_type = '';
+	}
+	validated = false;
+	refresh_field('charge_type',d.name,'other_charges');
+	cur_frm.cscript.row_id(doc, cdt, cdn);
+	cur_frm.cscript.rate(doc, cdt, cdn);
+	cur_frm.cscript.tax_amount(doc, cdt, cdn);
 }
 
 cur_frm.cscript.row_id = function(doc, cdt, cdn) {
-  var d = locals[cdt][cdn];
-  if(!d.charge_type && d.row_id){
-    alert("Please select Charge Type first");
-    d.row_id = '';
-  }
-  else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
-    alert("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'");
-    d.row_id = '';
-  }
-  else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id){
-    if(d.row_id >= d.idx){
-      alert("You cannot Enter Row no. greater than or equal to current row no. for this Charge type");
-      d.row_id = '';
-    }
-  }
-  validated = false;
-  refresh_field('row_id',d.name,'other_charges');
+	var d = locals[cdt][cdn];
+	if(!d.charge_type && d.row_id){
+		alert("Please select Charge Type first");
+		d.row_id = '';
+	}
+	else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
+		alert("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'");
+		d.row_id = '';
+	}
+	else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id){
+		if(d.row_id >= d.idx){
+			alert("You cannot Enter Row no. greater than or equal to current row no. for this Charge type");
+			d.row_id = '';
+		}
+	}
+	validated = false;
+	refresh_field('row_id',d.name,'other_charges');
 }
 
 /*---------------------- Get rate if account_head has account_type as TAX or CHARGEABLE-------------------------------------*/
 
 cur_frm.fields_dict['other_charges'].grid.get_field("account_head").get_query = function(doc,cdt,cdn) {
-  return{
-    filters:[
-      ['Account', 'group_or_ledger', '=', 'Ledger'],
-      ['Account', 'account_type', 'in', 'Tax, Chargeable, Income Account'],
-      ['Account', 'company', '=', doc.company]
-    ]
-  }  
+	return{
+		filters:[
+			['Account', 'group_or_ledger', '=', 'Ledger'],
+			['Account', 'account_type', 'in', 'Tax, Chargeable, Income Account'],
+			['Account', 'company', '=', doc.company]
+		]
+	}	
 }
 
 cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = function(doc) {
-  return{
-    'company': doc.company,
-    'group_or_ledger': "Ledger"
-  }	
+	return{
+		'company': doc.company,
+		'group_or_ledger': "Ledger"
+	}	
 }
 
 
 cur_frm.cscript.account_head = function(doc, cdt, cdn) {
-  var d = locals[cdt][cdn];
-  if(!d.charge_type && d.account_head){
-    alert("Please select Charge Type first");
-    validated = false;
-    d.account_head = '';
-  }
-  else if(d.account_head && d.charge_type) {
-    arg = "{'charge_type' : '" + d.charge_type +"', 'account_head' : '" + d.account_head + "'}";
-    get_server_fields('get_rate', arg, 'other_charges', doc, cdt, cdn, 1);
-  }
-  refresh_field('account_head',d.name,'other_charges');
+	var d = locals[cdt][cdn];
+	if(!d.charge_type && d.account_head){
+		alert("Please select Charge Type first");
+		validated = false;
+		d.account_head = '';
+	}
+	else if(d.account_head && d.charge_type) {
+		arg = "{'charge_type' : '" + d.charge_type +"', 'account_head' : '" + d.account_head + "'}";
+		get_server_fields('get_rate', arg, 'other_charges', doc, cdt, cdn, 1);
+	}
+	refresh_field('account_head',d.name,'other_charges');
 }
 
 cur_frm.cscript.rate = function(doc, cdt, cdn) {
-  var d = locals[cdt][cdn];
-  if(!d.charge_type && d.rate) {
-    alert("Please select Charge Type first");
-    d.rate = '';
-  }
-  validated = false;
-  refresh_field('rate',d.name,'other_charges');
+	var d = locals[cdt][cdn];
+	if(!d.charge_type && d.rate) {
+		alert("Please select Charge Type first");
+		d.rate = '';
+	}
+	validated = false;
+	refresh_field('rate',d.name,'other_charges');
 }
 
 cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
-  var d = locals[cdt][cdn];
-  if(!d.charge_type && d.tax_amount){
-    alert("Please select Charge Type first");
-    d.tax_amount = '';
-  }
-  else if(d.charge_type && d.tax_amount) {
-    alert("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate");
-    d.tax_amount = '';
-  }
-  validated = false;
-  refresh_field('tax_amount',d.name,'other_charges');
+	var d = locals[cdt][cdn];
+	if(!d.charge_type && d.tax_amount){
+		alert("Please select Charge Type first");
+		d.tax_amount = '';
+	}
+	else if(d.charge_type && d.tax_amount) {
+		alert("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate");
+		d.tax_amount = '';
+	}
+	validated = false;
+	refresh_field('tax_amount',d.name,'other_charges');
 };
\ No newline at end of file
diff --git a/accounts/doctype/shipping_rule/shipping_rule.js b/accounts/doctype/shipping_rule/shipping_rule.js
new file mode 100644
index 0000000..8e8580b
--- /dev/null
+++ b/accounts/doctype/shipping_rule/shipping_rule.js
@@ -0,0 +1,5 @@
+$.extend(cur_frm.cscript, {
+	onload: function() {
+		erpnext.add_for_territory();
+	}
+});
\ No newline at end of file
diff --git a/public/js/utils.js b/public/js/utils.js
index b44a875..743c02b 100644
--- a/public/js/utils.js
+++ b/public/js/utils.js
@@ -39,5 +39,14 @@
 				cur_frm.toggle_display("company", false);
 			}
 		}
-	}
+	},
+	
+	add_for_territory: function() {
+		if(cur_frm.doc.__islocal && 
+			wn.model.get_doclist(cur_frm.doc.doctype, cur_frm.doc.name).length === 1) {
+				var territory = wn.model.add_child(cur_frm.doc, "For Territory", 
+					"valid_for_territories");
+				territory.territory = wn.defaults.get_default("territory");
+		}
+	},
 });
\ No newline at end of file
diff --git a/setup/doctype/price_list/price_list.js b/setup/doctype/price_list/price_list.js
index 3bfa63a..26c9854 100644
--- a/setup/doctype/price_list/price_list.js
+++ b/setup/doctype/price_list/price_list.js
@@ -14,43 +14,46 @@
 // You should have received a copy of the GNU General Public License
 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-cur_frm.cscript.onload = function() {
-	cur_frm.cscript.show_item_prices();
-}
-
-cur_frm.cscript.refresh = function(doc, cdt, cdn) {
-	cur_frm.set_intro("");
-	if(doc.__islocal) {
-		cur_frm.toggle_display("item_prices_section", false);
-		cur_frm.set_intro("Save this list to begin.");
-		return;
-	} else {
+$.extend(cur_frm.cscript, {
+	onload: function() {
 		cur_frm.cscript.show_item_prices();
+		erpnext.add_for_territory();
+	},
+	
+	refresh: function(doc) {
+		cur_frm.set_intro("");
+		if(doc.__islocal) {
+			cur_frm.toggle_display("item_prices_section", false);
+			cur_frm.set_intro("Save this list to begin.");
+			return;
+		} else {
+			cur_frm.cscript.show_item_prices();
+		}
+	},
+	
+	show_item_prices: function() {
+		var item_price = wn.model.get("Item Price", {price_list_name: cur_frm.doc.name});
+	
+		var show = item_price && item_price.length;
+	
+		cur_frm.toggle_display("item_prices_section", show);
+		$(cur_frm.fields_dict.item_prices.wrapper).empty();
+		if (!show) return;
+	
+		var out = '<table class="table table-striped table-bordered">\
+			<thead><tr>\
+				<th>' + wn._("Item Code") + '</th>\
+				<th>' + wn._("Price") + '</th>\
+			</tr></thead>\
+			<tbody>'
+			+ $.map(item_price.sort(function(a, b) { return a.parent.localeCompare(b.parent); }), function(d) {
+				return '<tr>'
+					+ '<td><a href="#Form/Item/' + encodeURIComponent(d.parent) +'">' + d.parent + '</a></td>'
+					+ '<td style="text-align: right;">' + format_currency(d.ref_rate, d.ref_currency) + '</td>'
+					+ '</tr>'
+			}).join("\n")
+			+ '</tbody>\
+		</table>';
+		$(out).appendTo($(cur_frm.fields_dict.item_prices.wrapper));
 	}
-}
-
-cur_frm.cscript.show_item_prices = function() {
-	var item_price = wn.model.get("Item Price", {price_list_name: cur_frm.doc.name});
-	
-	var show = item_price && item_price.length;
-	
-	cur_frm.toggle_display("item_prices_section", show);
-	$(cur_frm.fields_dict.item_prices.wrapper).empty();
-	if (!show) return;
-	
-	var out = '<table class="table table-striped table-bordered">\
-		<thead><tr>\
-			<th>' + wn._("Item Code") + '</th>\
-			<th>' + wn._("Price") + '</th>\
-		</tr></thead>\
-		<tbody>'
-		+ $.map(item_price.sort(function(a, b) { return a.parent.localeCompare(b.parent); }), function(d) {
-			return '<tr>'
-				+ '<td><a href="#Form/Item/' + encodeURIComponent(d.parent) +'">' + d.parent + '</a></td>'
-				+ '<td style="text-align: right;">' + format_currency(d.ref_rate, d.ref_currency) + '</td>'
-				+ '</tr>'
-		}).join("\n")
-		+ '</tbody>\
-	</table>';
-	$(out).appendTo($(cur_frm.fields_dict.item_prices.wrapper));
-}
+});
\ No newline at end of file
