removed landed cost master
diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
index 6f5bdb4..58bee4c 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
+++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.txt
@@ -1,8 +1,8 @@
 [
  {
-  "creation": "2013-01-23 12:23:46", 
+  "creation": "2013-01-23 15:27:14", 
   "docstatus": 0, 
-  "modified": "2013-01-23 12:26:49", 
+  "modified": "2013-01-23 15:56:55", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
diff --git a/patches/january_2013/remove_landed_cost_master.py b/patches/january_2013/remove_landed_cost_master.py
new file mode 100644
index 0000000..01eefb4
--- /dev/null
+++ b/patches/january_2013/remove_landed_cost_master.py
@@ -0,0 +1,4 @@
+def execute():
+	import webnotes
+	webnotes.delete_doc("DocType", "Landed Cost Master")
+	webnotes.delete_doc("DocType", "Landed Cost Master Detail")
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 7e87fe4..f35cb62 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -156,4 +156,5 @@
 	"execute:webnotes.reload_doc('accounts','Print Format','Payment Receipt Voucher')",
 	"patches.january_2013.update_fraction_for_usd",
 	"patches.january_2013.remove_unwanted_permission",
+	"patches.january_2013.remove_landed_cost_master",
 ]
\ No newline at end of file
diff --git a/patches/september_2012/all_permissions_patch.py b/patches/september_2012/all_permissions_patch.py
index ab06b71..8373d8a 100644
--- a/patches/september_2012/all_permissions_patch.py
+++ b/patches/september_2012/all_permissions_patch.py
@@ -16,7 +16,7 @@
 
 def stock_perms():
 	webnotes.conn.sql("""delete from `tabDocPerm`
-		where parent in ('Landed Cost Master', 'Landed Cost Wizard', 
+		where parent in ('Landed Cost Wizard', 
 		'Sales and Purchase Return Tool') and role='All' and permlevel=0""")
 		
 def account_perms():
diff --git a/setup/doctype/company/company.txt b/setup/doctype/company/company.txt
index fc778ce..b81e1f1 100644
--- a/setup/doctype/company/company.txt
+++ b/setup/doctype/company/company.txt
@@ -1,8 +1,8 @@
 [
  {
-  "creation": "2013-01-10 16:34:22", 
+  "creation": "2013-01-22 16:50:36", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:55:58", 
+  "modified": "2013-01-23 15:56:48", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
diff --git a/stock/doctype/landed_cost_master/__init__.py b/stock/doctype/landed_cost_master/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/stock/doctype/landed_cost_master/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/stock/doctype/landed_cost_master/landed_cost_master.js b/stock/doctype/landed_cost_master/landed_cost_master.js
deleted file mode 100644
index 03e8a39..0000000
--- a/stock/doctype/landed_cost_master/landed_cost_master.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-// 
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// 
-// 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
-// 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/>.
-
- 
-
-//--------- ONLOAD -------------
-cur_frm.cscript.onload = function(doc, cdt, cdn) {
-   
-}
-
-cur_frm.cscript.refresh = function(doc, cdt, cdn) {
-   
-}
-
-cur_frm.fields_dict.landed_cost.grid.get_field('account_head').get_query = function(doc, cdt, cdn) {
-	return 'SELECT tabAccount.name FROM tabAccount WHERE tabAccount.group_or_ledger="Ledger" AND tabAccount.docstatus != 2 AND (tabAccount.account_type = "Tax" OR tabAccount.account_type = "Chargeable" or (tabAccount.is_pl_account = "Yes" and tabAccount.debit_or_credit = "Debit")) AND  tabAccount.name LIKE "%s"';
-}
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_master/landed_cost_master.py b/stock/doctype/landed_cost_master/landed_cost_master.py
deleted file mode 100644
index 7f48feb..0000000
--- a/stock/doctype/landed_cost_master/landed_cost_master.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-# 
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-# 
-# 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
-# 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/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
-	def __init__(self, d, dl):
-		self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_master/landed_cost_master.txt b/stock/doctype/landed_cost_master/landed_cost_master.txt
deleted file mode 100644
index 63b102c..0000000
--- a/stock/doctype/landed_cost_master/landed_cost_master.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-[
- {
-  "creation": "2013-01-10 16:34:27", 
-  "docstatus": 0, 
-  "modified": "2013-01-22 14:56:03", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "autoname": "field:title", 
-  "doctype": "DocType", 
-  "document_type": "Master", 
-  "module": "Stock", 
-  "name": "__common__"
- }, 
- {
-  "doctype": "DocField", 
-  "name": "__common__", 
-  "parent": "Landed Cost Master", 
-  "parentfield": "fields", 
-  "parenttype": "DocType", 
-  "permlevel": 0
- }, 
- {
-  "create": 1, 
-  "doctype": "DocPerm", 
-  "name": "__common__", 
-  "parent": "Landed Cost Master", 
-  "parentfield": "permissions", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "read": 1, 
-  "report": 1, 
-  "submit": 0, 
-  "write": 1
- }, 
- {
-  "doctype": "DocType", 
-  "name": "Landed Cost Master"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "trash_reason", 
-  "fieldtype": "Small Text", 
-  "label": "Trash Reason", 
-  "oldfieldname": "trash_reason", 
-  "oldfieldtype": "Small Text", 
-  "read_only": 1
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "title", 
-  "fieldtype": "Data", 
-  "label": "Title", 
-  "oldfieldname": "title", 
-  "oldfieldtype": "Data"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "landed_cost_details", 
-  "fieldtype": "Section Break", 
-  "label": "Landed Cost Items", 
-  "oldfieldtype": "Section Break"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "landed_cost", 
-  "fieldtype": "Table", 
-  "label": "Landed Cost", 
-  "oldfieldname": "landed_cost", 
-  "oldfieldtype": "Table", 
-  "options": "Landed Cost Master Detail"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Purchase Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "System Manager"
- }, 
- {
-  "doctype": "DocPerm", 
-  "role": "Purchase User"
- }
-]
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_master/locale/_messages_doc.json b/stock/doctype/landed_cost_master/locale/_messages_doc.json
deleted file mode 100644
index 4f1ad63..0000000
--- a/stock/doctype/landed_cost_master/locale/_messages_doc.json
+++ /dev/null
@@ -1,8 +0,0 @@
-[
- "Trash Reason", 
- "Title", 
- "Landed Cost Master", 
- "Landed Cost", 
- "Landed Cost Items", 
- "Stock"
-]
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_master/locale/hi-doc.json b/stock/doctype/landed_cost_master/locale/hi-doc.json
deleted file mode 100644
index 41f3344..0000000
--- a/stock/doctype/landed_cost_master/locale/hi-doc.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "Landed Cost": "\u0906\u092f\u093e\u0924\u093f\u0924 \u092e\u093e\u0932 \u0915\u0940 \u0932\u093e\u0917\u0924", 
- "Landed Cost Items": "\u0906\u092f\u093e\u0924\u093f\u0924 \u092e\u093e\u0932 \u0915\u0940 \u0932\u093e\u0917\u0924 \u0906\u0907\u091f\u092e", 
- "Landed Cost Master": "\u0906\u092f\u093e\u0924\u093f\u0924 \u092e\u093e\u0932 \u0915\u0940 \u0932\u093e\u0917\u0924 \u092e\u093e\u0938\u094d\u091f\u0930", 
- "Stock": "\u0938\u094d\u091f\u0949\u0915", 
- "Title": "\u0936\u0940\u0930\u094d\u0937\u0915", 
- "Trash Reason": "\u091f\u094d\u0930\u0948\u0936 \u0915\u093e\u0930\u0923"
-}
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_master_detail/__init__.py b/stock/doctype/landed_cost_master_detail/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/stock/doctype/landed_cost_master_detail/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.py b/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.py
deleted file mode 100644
index 7f48feb..0000000
--- a/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-# 
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-# 
-# 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
-# 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/>.
-
-from __future__ import unicode_literals
-import webnotes
-
-class DocType:
-	def __init__(self, d, dl):
-		self.doc, self.doclist = d, dl
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.txt b/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.txt
deleted file mode 100644
index b1db6a3..0000000
--- a/stock/doctype/landed_cost_master_detail/landed_cost_master_detail.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-[
- {
-  "owner": "Administrator", 
-  "docstatus": 0, 
-  "creation": "2012-05-03 11:00:55", 
-  "modified_by": "Administrator", 
-  "modified": "2012-05-04 13:02:35"
- }, 
- {
-  "section_style": "Simple", 
-  "istable": 1, 
-  "name": "__common__", 
-  "colour": "White:FFF", 
-  "module": "Stock", 
-  "doctype": "DocType", 
-  "version": 1, 
-  "server_code_error": " "
- }, 
- {
-  "name": "__common__", 
-  "parent": "Landed Cost Master Detail", 
-  "oldfieldtype": "Data", 
-  "doctype": "DocField", 
-  "parenttype": "DocType", 
-  "permlevel": 0, 
-  "parentfield": "fields"
- }, 
- {
-  "name": "Landed Cost Master Detail", 
-  "doctype": "DocType"
- }, 
- {
-  "doctype": "DocField", 
-  "label": "Account Head", 
-  "oldfieldname": "account_head", 
-  "fieldname": "account_head", 
-  "fieldtype": "Link", 
-  "options": "Account"
- }, 
- {
-  "doctype": "DocField", 
-  "label": "Description", 
-  "oldfieldname": "description", 
-  "width": "300px", 
-  "fieldname": "description", 
-  "fieldtype": "Data"
- }
-]
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_master_detail/locale/_messages_doc.json b/stock/doctype/landed_cost_master_detail/locale/_messages_doc.json
deleted file mode 100644
index a8a7ba1..0000000
--- a/stock/doctype/landed_cost_master_detail/locale/_messages_doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- "Description", 
- "Landed Cost Master Detail", 
- "Account Head", 
- "Stock"
-]
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_master_detail/locale/hi-doc.json b/stock/doctype/landed_cost_master_detail/locale/hi-doc.json
deleted file mode 100644
index ee50455..0000000
--- a/stock/doctype/landed_cost_master_detail/locale/hi-doc.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "Account Head": "\u0932\u0947\u0916\u093e\u0936\u0940\u0930\u094d\u0937", 
- "Description": "\u0935\u093f\u0935\u0930\u0923", 
- "Landed Cost Master Detail": "\u0909\u0924\u0930\u093e \u0932\u093e\u0917\u0924 \u092e\u093e\u0938\u094d\u091f\u0930 \u0935\u093f\u0938\u094d\u0924\u093e\u0930", 
- "Stock": "\u0938\u094d\u091f\u0949\u0915"
-}
\ No newline at end of file
diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.py b/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
index 7067e52..f2bc799 100644
--- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
+++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
@@ -56,19 +56,6 @@
 			ch.purchase_receipt = i and i['name'] or ''
 			ch.save()
 
-
-	def get_landed_cost_master_details(self):
-		""" pull details from landed cost master"""
-		self.doclist = self.doc.clear_table(self.doclist, 'landed_cost_details')
-		idx = 0
-		landed_cost = sql("select account_head, description from `tabLanded Cost Master Detail` where parent=%s", (self.doc.landed_cost), as_dict = 1)
-		for cost in landed_cost:
-			lct = addchild(self.doc, 'landed_cost_details', 'Landed Cost Item', 
-				self.doclist)
-			lct.account_head = cost['account_head']
-			lct.description = cost['description']
-
-
 	def get_selected_pr(self):
 		""" Get selected purchase receipt no """
 		self.selected_pr = [d.purchase_receipt for d in getlist(self.doclist, 'lc_pr_details') if d.select_pr]
@@ -199,9 +186,6 @@
 		ocd[oc].total_tax_amount = flt(prev_total)
 		ocd[oc].tax_amount += flt(tax_amount)
 		
-		total_amount = flt(ocd[oc].tax_amount)
-		total_tax_amount = flt(ocd[oc].total_tax_amount) + (add_ded * flt(total_amount))
-		
 		if ocd[oc].category != "Valuation":	
 			prev_total += add_ded * flt(ocd[oc].total_amount)
 			total += add_ded * flt(ocd[oc].tax_amount)
diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt b/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt
index fb4483f..15b370a 100644
--- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt
+++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.txt
@@ -1,8 +1,8 @@
 [
  {
-  "creation": "2013-01-10 16:34:28", 
+  "creation": "2013-01-22 16:50:39", 
   "docstatus": 0, 
-  "modified": "2013-01-22 14:56:03", 
+  "modified": "2013-01-23 15:25:00", 
   "modified_by": "Administrator", 
   "owner": "wasim@webnotestech.com"
  }, 
@@ -29,7 +29,7 @@
   "parenttype": "DocType", 
   "permlevel": 0, 
   "read": 1, 
-  "report": 1, 
+  "report": 0, 
   "submit": 0, 
   "write": 1
  }, 
@@ -94,20 +94,6 @@
  }, 
  {
   "doctype": "DocField", 
-  "fieldname": "landed_cost", 
-  "fieldtype": "Link", 
-  "label": "Select Landed Cost Items Master", 
-  "options": "Landed Cost Master"
- }, 
- {
-  "doctype": "DocField", 
-  "fieldname": "get_details", 
-  "fieldtype": "Button", 
-  "label": "Get Details", 
-  "options": "get_landed_cost_master_details"
- }, 
- {
-  "doctype": "DocField", 
   "fieldname": "landed_cost_details", 
   "fieldtype": "Table", 
   "label": "Landed Cost Items", 
diff --git a/stock/page/stock_home/stock_home.js b/stock/page/stock_home/stock_home.js
index 7ea62de..ec03999 100644
--- a/stock/page/stock_home/stock_home.js
+++ b/stock/page/stock_home/stock_home.js
@@ -79,11 +79,6 @@
 				description: wn._("Incoming quality inspection.")
 			},
 			{
-				"doctype":"Landed Cost Master",
-				"label":"Landed Cost Master",
-				description: wn._("Transportatoin cost distribution template.")
-			},
-			{
 				"route":"Form/Landed Cost Wizard/Landed Cost Wizard",
 				"label": wn._("Landed Cost Wizard"),
 				description: wn._("Distribute transport overhead across items."),
diff --git a/utilities/cleanup_data.py b/utilities/cleanup_data.py
index 6f790da..92c41a3 100644
--- a/utilities/cleanup_data.py
+++ b/utilities/cleanup_data.py
@@ -64,7 +64,6 @@
 		'Letter Head':'',
 		'Leave Type':['Leave Without Pay', 'Privilege Leave', 'Casual Leave', 'PL', 'CL', 'LWP', 
 			'Compensatory Off', 'Sick Leave'],
-		'Landed Cost Master':'',
 		'Appraisal Template':'',
 		'Item Group':['All Item Groups', 'Default'], 
 		'Item':'',