Merge pull request #9430 from sagarvora/fix-travis

[ci] use deprecated trusty build for now
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 8ba4eef..7526f37 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
 from __future__ import unicode_literals
 import frappe
 
-__version__ = '8.0.51'
+__version__ = '8.1.1'
 
 
 def get_default_company(user=None):
@@ -36,12 +36,13 @@
 		frappe.flags.company_currency[company] = frappe.db.get_value('Company', company, 'default_currency')
 	return frappe.flags.company_currency[company]
 
+def set_perpetual_inventory(enable=1, company=None):
+	if not company:
+		company = "_Test Company" if frappe.flags.in_test else get_default_company()
 
-def set_perpetual_inventory(enable=1):
-	accounts_settings = frappe.get_doc("Accounts Settings")
-	accounts_settings.auto_accounting_for_stock = enable
-	accounts_settings.save()
-
+	company = frappe.get_doc("Company", company)
+	company.enable_perpetual_inventory = enable
+	company.save()
 
 def encode_company_abbr(name, company):
 	'''Returns name encoded with company abbreviation'''
@@ -53,4 +54,15 @@
 
 	return " - ".join(parts)
 
+def is_perpetual_inventory_enabled(company):
+	if not company:
+		company = "_Test Company" if frappe.flags.in_test else get_default_company()
 
+	if not hasattr(frappe.local, 'enable_perpetual_inventory'):
+		frappe.local.enable_perpetual_inventory = {}
+
+	if not company in frappe.local.enable_perpetual_inventory:
+		frappe.local.enable_perpetual_inventory[company] = frappe.db.get_value("Company",
+			company, "enable_perpetual_inventory") or 0
+
+	return frappe.local.enable_perpetual_inventory[company]
diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
index 4f268a2..0ce3d5d 100644
--- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
+++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.json
@@ -14,6 +14,7 @@
  "engine": "InnoDB", 
  "fields": [
   {
+   "allow_bulk_edit": 0, 
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -22,7 +23,7 @@
    "description": "If enabled, the system will post accounting entries for inventory automatically.", 
    "fieldname": "auto_accounting_for_stock", 
    "fieldtype": "Check", 
-   "hidden": 0, 
+   "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
@@ -44,6 +45,7 @@
    "unique": 0
   }, 
   {
+   "allow_bulk_edit": 0, 
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -73,6 +75,7 @@
    "unique": 0
   }, 
   {
+   "allow_bulk_edit": 0, 
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -103,6 +106,7 @@
    "unique": 0
   }, 
   {
+   "allow_bulk_edit": 0, 
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -131,6 +135,7 @@
    "unique": 0
   }, 
   {
+   "allow_bulk_edit": 0, 
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -161,6 +166,7 @@
    "unique": 0
   }, 
   {
+   "allow_bulk_edit": 0, 
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -190,6 +196,7 @@
    "unique": 0
   }, 
   {
+   "allow_bulk_edit": 0, 
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -219,6 +226,7 @@
    "unique": 0
   }, 
   {
+   "allow_bulk_edit": 0, 
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -249,6 +257,7 @@
    "unique": 0
   }, 
   {
+   "allow_bulk_edit": 0, 
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -290,7 +299,7 @@
  "issingle": 1, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-04-18 13:35:59.166250", 
+ "modified": "2017-06-16 17:39:50.614522", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Accounts Settings", 
diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py
index 4246755..dd33ff1 100644
--- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py
+++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py
@@ -11,18 +11,4 @@
 
 class AccountsSettings(Document):
 	def on_update(self):
-		frappe.db.set_default("auto_accounting_for_stock", self.auto_accounting_for_stock)
-
-		if cint(self.auto_accounting_for_stock):
-			# set default perpetual account in company
-			for company in frappe.db.sql("select name from tabCompany"):
-				company = frappe.get_doc("Company", company[0])
-				company.flags.ignore_permissions = True
-				company.save()
-
-			# validate warehouse linked to company
-			warehouse_with_no_company = frappe.db.sql_list("""select name from tabWarehouse 
-				where disabled=0 and company is null or company = ''""")
-			if warehouse_with_no_company:
-				frappe.throw(_("Company is missing in warehouses {0}")
-					.format(comma_and(warehouse_with_no_company)))
\ No newline at end of file
+		pass
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.js b/erpnext/accounts/doctype/pos_profile/pos_profile.js
index 83016a9..03d84e9 100755
--- a/erpnext/accounts/doctype/pos_profile/pos_profile.js
+++ b/erpnext/accounts/doctype/pos_profile/pos_profile.js
@@ -26,6 +26,23 @@
 	});
 });
 
+frappe.ui.form.on('POS Profile', {
+	refresh: function(frm) {
+		if(frm.doc.company) {
+			frm.trigger("toggle_display_account_head");
+		}
+	},
+	
+	company: function(frm) {
+		frm.trigger("toggle_display_account_head");
+	},
+	
+	toggle_display_account_head: function(frm) {
+		frm.toggle_display('expense_account',
+			erpnext.is_perpetual_inventory_enabled(frm.doc.company));
+	}
+})
+
 // Income Account
 // --------------------------------
 cur_frm.fields_dict['income_account'].get_query = function(doc,cdt,cdn) {
diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json
index c2c75e1..93aca1b 100644
--- a/erpnext/accounts/doctype/pos_profile/pos_profile.json
+++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json
@@ -1132,7 +1132,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
+   "depends_on": "", 
    "fieldname": "expense_account", 
    "fieldtype": "Link", 
    "hidden": 0, 
@@ -1201,7 +1201,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-06-15 20:07:55.682137", 
+ "modified": "2017-06-16 17:04:33.165676", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "POS Profile", 
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index 394ad49..e768c27 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -164,7 +164,7 @@
 				frappe.msgprint(_("Item Code required at Row No {0}").format(d.idx), raise_exception=True)
 
 	def set_expense_account(self, for_validate=False):
-		auto_accounting_for_stock = cint(frappe.defaults.get_global_default("auto_accounting_for_stock"))
+		auto_accounting_for_stock = erpnext.is_perpetual_inventory_enabled(self.company)
 
 		if auto_accounting_for_stock:
 			stock_not_billed_account = self.get_company_default("stock_received_but_not_billed")
@@ -335,9 +335,7 @@
 			delete_gl_entries(voucher_type=self.doctype, voucher_no=self.name)
 
 	def get_gl_entries(self, warehouse_account=None):
-		self.auto_accounting_for_stock = \
-			cint(frappe.defaults.get_global_default("auto_accounting_for_stock"))
-
+		self.auto_accounting_for_stock = erpnext.is_perpetual_inventory_enabled(self.company)
 		self.stock_received_but_not_billed = self.get_company_default("stock_received_but_not_billed")
 		self.expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation")
 		self.negative_expense_to_be_booked = 0.0
diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
index cf0ec57..8bbd6c5 100644
--- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
@@ -4,7 +4,7 @@
 
 from __future__ import unicode_literals
 import unittest
-import frappe
+import frappe, erpnext
 import frappe.model
 from frappe.utils import cint, flt, today, nowdate
 import frappe.defaults
@@ -25,11 +25,10 @@
 	def tearDown(self):
 		unlink_payment_on_cancel_of_invoice(0)
 
-	def test_gl_entries_without_auto_accounting_for_stock(self):
-		set_perpetual_inventory(0)
-		self.assertTrue(not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")))
-
+	def test_gl_entries_without_perpetual_inventory(self):
 		wrapper = frappe.copy_doc(test_records[0])
+		set_perpetual_inventory(0, wrapper.company)
+		self.assertTrue(not cint(erpnext.is_perpetual_inventory_enabled(wrapper.company)))
 		wrapper.insert()
 		wrapper.submit()
 		wrapper.load_from_db()
@@ -51,17 +50,16 @@
 		for d in gl_entries:
 			self.assertEqual([d.debit, d.credit], expected_gl_entries.get(d.account))
 
-	def test_gl_entries_with_auto_accounting_for_stock(self):
-		set_perpetual_inventory(1)
-		self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
-
+	def test_gl_entries_with_perpetual_inventory(self):
 		pi = frappe.copy_doc(test_records[1])
+		set_perpetual_inventory(1, pi.company)
+		self.assertTrue(cint(erpnext.is_perpetual_inventory_enabled(pi.company)), 1)
 		pi.insert()
 		pi.submit()
 
 		self.check_gle_for_pi(pi.name)
 
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, pi.company)
 
 	def test_payment_entry_unlink_against_purchase_invoice(self):
 		from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
@@ -84,11 +82,10 @@
 
 		self.assertRaises(frappe.LinkExistsError, pi_doc.cancel)
 
-	def test_gl_entries_with_auto_accounting_for_stock_against_pr(self):
-		set_perpetual_inventory(1)
-		self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
-
+	def test_gl_entries_with_perpetual_inventory_against_pr(self):
 		pr = frappe.copy_doc(pr_test_records[0])
+		set_perpetual_inventory(1, pr.company)
+		self.assertTrue(cint(erpnext.is_perpetual_inventory_enabled(pr.company)), 1)
 		pr.submit()
 
 		pi = frappe.copy_doc(test_records[1])
@@ -99,7 +96,7 @@
 
 		self.check_gle_for_pi(pi.name)
 
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, pr.company)
 
 	def check_gle_for_pi(self, pi):
 		gl_entries = frappe.db.sql("""select account, debit, credit
@@ -133,10 +130,9 @@
 		self.assertRaises(frappe.CannotChangeConstantError, pi.save)
 
 	def test_gl_entries_with_aia_for_non_stock_items(self):
-		set_perpetual_inventory()
-		self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
-
 		pi = frappe.copy_doc(test_records[1])
+		set_perpetual_inventory(1, pi.company)
+		self.assertTrue(cint(erpnext.is_perpetual_inventory_enabled(pi.company)), 1)
 		pi.get("items")[0].item_code = "_Test Non Stock Item"
 		pi.get("items")[0].expense_account = "_Test Account Cost for Goods Sold - _TC"
 		pi.get("taxes").pop(0)
@@ -159,7 +155,7 @@
 			self.assertEquals(expected_values[i][0], gle.account)
 			self.assertEquals(expected_values[i][1], gle.debit)
 			self.assertEquals(expected_values[i][2], gle.credit)
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, pi.company)
 
 	def test_purchase_invoice_calculation(self):
 		pi = frappe.copy_doc(test_records[0])
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 2107581..10bd3a0 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -400,19 +400,6 @@
 	}
 });
 
-// expense account
-if (frappe.sys_defaults.auto_accounting_for_stock) {
-	cur_frm.fields_dict['items'].grid.get_field('expense_account').get_query = function(doc) {
-		return {
-			filters: {
-				'report_type': 'Profit and Loss',
-				'company': doc.company,
-				"is_group": 0
-			}
-		}
-	}
-}
-
 
 // Cost Center in Details Table
 // -----------------------------
@@ -502,6 +489,21 @@
 				filters: {'project': doc.project}
 			}
 		}
+
+		// expense account
+		frm.fields_dict['items'].grid.get_field('expense_account').get_query = function(doc) {
+			if (erpnext.is_perpetual_inventory_enabled(doc.company)) {
+				return {
+					filters: {
+						'report_type': 'Profit and Loss',
+						'company': doc.company,
+						"is_group": 0
+					}
+				}
+			}
+		}
+		
+		
 	},
 
 	project: function(frm){
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 24da970..85c5079 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -2,7 +2,7 @@
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
-import frappe
+import frappe, erpnext
 import frappe.defaults
 from frappe.utils import cint, flt
 from frappe import _, msgprint, throw
@@ -559,6 +559,8 @@
 				throw(_("Delivery Note {0} is not submitted").format(d.delivery_note))
 
 	def make_gl_entries(self, gl_entries=None, repost_future_gle=True, from_repost=False):
+		auto_accounting_for_stock = erpnext.is_perpetual_inventory_enabled(self.company)
+
 		if not self.grand_total:
 			return
 
@@ -580,11 +582,11 @@
 					self.doctype, self.return_against if cint(self.is_return) else self.name)
 
 			if repost_future_gle and cint(self.update_stock) \
-				and cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
+				and cint(auto_accounting_for_stock):
 					items, warehouses = self.get_items_and_warehouses()
 					update_gl_entries_after(self.posting_date, self.posting_time, warehouses, items)
 		elif self.docstatus == 2 and cint(self.update_stock) \
-			and cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
+			and cint(auto_accounting_for_stock):
 				from erpnext.accounts.general_ledger import delete_gl_entries
 				delete_gl_entries(voucher_type=self.doctype, voucher_no=self.name)
 
@@ -672,8 +674,8 @@
 					)
 
 		# expense account gl entries
-		if cint(frappe.defaults.get_global_default("auto_accounting_for_stock")) \
-				and cint(self.update_stock):
+		if cint(self.update_stock) and \
+			erpnext.is_perpetual_inventory_enabled(self.company):
 			gl_entries += super(SalesInvoice, self).get_gl_entries()
 
 	def make_pos_gl_entries(self, gl_entries):
diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
index cb05ac8..2e044cc 100644
--- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -488,8 +488,8 @@
 		self.assertEquals(frappe.db.get_value("Sales Invoice", w.name, "outstanding_amount"), 561.8)
 
 	def test_sales_invoice_gl_entry_without_perpetual_inventory(self):
-		set_perpetual_inventory(0)
 		si = frappe.copy_doc(test_records[1])
+		set_perpetual_inventory(0, si.company)
 		si.insert()
 		si.submit()
 
@@ -617,6 +617,7 @@
 			self.assertEquals(expected_gl_entries[i][2], gle.credit)
 
 		si.cancel()
+		frappe.delete_doc('Sales Invoice', si.name)
 		gle = frappe.db.sql("""select * from `tabGL Entry`
 			where voucher_type='Sales Invoice' and voucher_no=%s""", si.name)
 
diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py
index 5541cc0..ceae61c 100644
--- a/erpnext/accounts/general_ledger.py
+++ b/erpnext/accounts/general_ledger.py
@@ -2,7 +2,7 @@
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
-import frappe
+import frappe, erpnext
 from frappe.utils import flt, cstr, cint
 from frappe import _
 from frappe.model.meta import get_field_precision
@@ -80,7 +80,7 @@
 
 def save_entries(gl_map, adv_adj, update_outstanding, from_repost=False):
 	if not from_repost:
-		validate_account_for_auto_accounting_for_stock(gl_map)
+		validate_account_for_perpetual_inventory(gl_map)
 		
 	round_off_debit_credit(gl_map)
 
@@ -100,8 +100,8 @@
 	gle.run_method("on_update_with_args", adv_adj, update_outstanding, from_repost)
 	gle.submit()
 
-def validate_account_for_auto_accounting_for_stock(gl_map):
-	if cint(frappe.db.get_single_value("Accounts Settings", "auto_accounting_for_stock")) \
+def validate_account_for_perpetual_inventory(gl_map):
+	if cint(erpnext.is_perpetual_inventory_enabled(gl_map[0].company)) \
 		and gl_map[0].voucher_type=="Journal Entry":
 			aii_accounts = [d[0] for d in frappe.db.sql("""select name from tabAccount
 				where account_type = 'Stock' and is_group=0""")]
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index abe81a2..2bbce60 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -1484,7 +1484,7 @@
 	print_dialog: function () {
 		var me = this;
 
-		this.frappe.msgprint = frappe.msgprint(
+		this.msgprint = frappe.msgprint(
 			`<a class="btn btn-primary print_doc"
 				style="margin-right: 5px;">${__('Print')}</a>
 			<a class="btn btn-default new_doc">${__('New')}</a>`);
@@ -1495,7 +1495,7 @@
 		})
 
 		$('.new_doc').click(function () {
-			me.frappe.msgprint.hide()
+			me.msgprint.hide()
 			me.make_new_cart()
 		})
 	},
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py
index 4b28f1f..bb5a82d 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.py
+++ b/erpnext/accounts/report/gross_profit/gross_profit.py
@@ -227,7 +227,7 @@
 				if not average_buying_rate:
 					average_buying_rate = get_valuation_rate(item_code, row.warehouse,
 						row.parenttype, row.parent, allow_zero_rate=True, 
-						currency=self.filters.currency)
+						currency=self.filters.currency, company=self.filters.company)
 
 				self.average_buying_rate[item_code] =  flt(average_buying_rate)
 
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index d770af3..553c7b3 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -227,7 +227,7 @@
 				})
 				if not rm.rate:
 					rm.rate = get_valuation_rate(bom_item.item_code, self.supplier_warehouse,
-						self.doctype, self.name, currency=self.company_currency)
+						self.doctype, self.name, currency=self.company_currency, company = self.company)
 			else:
 				rm.rate = bom_item.rate
 
diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py
index 822712f..605881c 100644
--- a/erpnext/controllers/stock_controller.py
+++ b/erpnext/controllers/stock_controller.py
@@ -2,7 +2,7 @@
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
-import frappe
+import frappe, erpnext
 from frappe.utils import cint, flt, cstr
 from frappe import msgprint, _
 import frappe.defaults
@@ -21,7 +21,7 @@
 		if self.docstatus == 2:
 			delete_gl_entries(voucher_type=self.doctype, voucher_no=self.name)
 
-		if cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
+		if cint(erpnext.is_perpetual_inventory_enabled(self.company)):
 			warehouse_account = get_warehouse_account_map()
 
 			if self.docstatus==1:
@@ -95,7 +95,7 @@
 
 	def update_stock_ledger_entries(self, sle):
 		sle.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse,
-			self.doctype, self.name, currency=self.company_currency)
+			self.doctype, self.name, currency=self.company_currency, company=self.company)
 
 		sle.stock_value = flt(sle.qty_after_transaction) * flt(sle.valuation_rate)
 		sle.stock_value_difference = flt(sle.actual_qty) * flt(sle.valuation_rate)
diff --git a/erpnext/crm/doctype/lead/lead.json b/erpnext/crm/doctype/lead/lead.json
index 40b0e50..e7c2d33 100644
--- a/erpnext/crm/doctype/lead/lead.json
+++ b/erpnext/crm/doctype/lead/lead.json
@@ -1144,7 +1144,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-06-13 14:29:12.567700", 
+ "modified": "2017-06-22 14:29:12.700000", 
  "modified_by": "Administrator", 
  "module": "CRM", 
  "name": "Lead", 
diff --git a/erpnext/docs/assets/img/accounts/perpetual-1.png b/erpnext/docs/assets/img/accounts/perpetual-1.png
index d9e9342..458f364 100644
--- a/erpnext/docs/assets/img/accounts/perpetual-1.png
+++ b/erpnext/docs/assets/img/accounts/perpetual-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/collaboration-tools/calendar-5.png b/erpnext/docs/assets/img/collaboration-tools/calendar-5.png
deleted file mode 100644
index df8346e..0000000
--- a/erpnext/docs/assets/img/collaboration-tools/calendar-5.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/holiday-list-1.png b/erpnext/docs/assets/img/human-resources/holiday-list-1.png
new file mode 100644
index 0000000..0de3ea9
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/holiday-list-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/holiday-list-2.gif b/erpnext/docs/assets/img/human-resources/holiday-list-2.gif
new file mode 100644
index 0000000..393255c
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/holiday-list-2.gif
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/holiday-list-3.png b/erpnext/docs/assets/img/human-resources/holiday-list-3.png
new file mode 100644
index 0000000..dd0c87c
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/holiday-list-3.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/holiday-list-4.png b/erpnext/docs/assets/img/human-resources/holiday-list-4.png
new file mode 100644
index 0000000..5435dc4
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/holiday-list-4.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/holiday-list.png b/erpnext/docs/assets/img/human-resources/holiday-list.png
deleted file mode 100644
index 94dbee8..0000000
--- a/erpnext/docs/assets/img/human-resources/holiday-list.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/implementation-image.png b/erpnext/docs/assets/img/setup/implementation-image.png
similarity index 100%
rename from erpnext/docs/assets/old_images/erpnext/implementation-image.png
rename to erpnext/docs/assets/img/setup/implementation-image.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/integrations/dropbox_redirect_uri.png b/erpnext/docs/assets/img/setup/integrations/dropbox_redirect_uri.png
new file mode 100644
index 0000000..c284521
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/integrations/dropbox_redirect_uri.png
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/fifo.png b/erpnext/docs/assets/img/stock/fifo.png
similarity index 100%
rename from erpnext/docs/assets/old_images/erpnext/fifo.png
rename to erpnext/docs/assets/img/stock/fifo.png
Binary files differ
diff --git a/erpnext/docs/assets/img/stock/item-manufacturing-and-website.png b/erpnext/docs/assets/img/stock/item-manufacturing-and-website.png
new file mode 100644
index 0000000..5fc5606
--- /dev/null
+++ b/erpnext/docs/assets/img/stock/item-manufacturing-and-website.png
Binary files differ
diff --git a/erpnext/docs/assets/img/stock/item-purchase.png b/erpnext/docs/assets/img/stock/item-purchase.png
new file mode 100644
index 0000000..7a8b102
--- /dev/null
+++ b/erpnext/docs/assets/img/stock/item-purchase.png
Binary files differ
diff --git a/erpnext/docs/assets/img/stock/item-reorder.png b/erpnext/docs/assets/img/stock/item-reorder.png
new file mode 100644
index 0000000..49a202f
--- /dev/null
+++ b/erpnext/docs/assets/img/stock/item-reorder.png
Binary files differ
diff --git a/erpnext/docs/assets/img/stock/item-sales.png b/erpnext/docs/assets/img/stock/item-sales.png
new file mode 100644
index 0000000..4484187
--- /dev/null
+++ b/erpnext/docs/assets/img/stock/item-sales.png
Binary files differ
diff --git a/erpnext/docs/assets/img/stock/item-supplier.png b/erpnext/docs/assets/img/stock/item-supplier.png
new file mode 100644
index 0000000..fd40b20
--- /dev/null
+++ b/erpnext/docs/assets/img/stock/item-supplier.png
Binary files differ
diff --git a/erpnext/docs/assets/img/stock/item-warranty.png b/erpnext/docs/assets/img/stock/item-warranty.png
new file mode 100644
index 0000000..8040548
--- /dev/null
+++ b/erpnext/docs/assets/img/stock/item-warranty.png
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/customer-portal-orders-1.png b/erpnext/docs/assets/old_images/erpnext/customer-portal-orders-1.png
deleted file mode 100644
index 5cb95bd..0000000
--- a/erpnext/docs/assets/old_images/erpnext/customer-portal-orders-1.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/email-settings1.png b/erpnext/docs/assets/old_images/erpnext/email-settings1.png
deleted file mode 100644
index 8052a38..0000000
--- a/erpnext/docs/assets/old_images/erpnext/email-settings1.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/email-settings2.png b/erpnext/docs/assets/old_images/erpnext/email-settings2.png
deleted file mode 100644
index 3f84c71..0000000
--- a/erpnext/docs/assets/old_images/erpnext/email-settings2.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/faq-manufacturer-part-no.png b/erpnext/docs/assets/old_images/erpnext/faq-manufacturer-part-no.png
deleted file mode 100644
index e43667b..0000000
--- a/erpnext/docs/assets/old_images/erpnext/faq-manufacturer-part-no.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/faq-reorder-level.png b/erpnext/docs/assets/old_images/erpnext/faq-reorder-level.png
deleted file mode 100644
index 8e3e8c5..0000000
--- a/erpnext/docs/assets/old_images/erpnext/faq-reorder-level.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/faq-reorder-qty.png b/erpnext/docs/assets/old_images/erpnext/faq-reorder-qty.png
deleted file mode 100644
index 7b1e312..0000000
--- a/erpnext/docs/assets/old_images/erpnext/faq-reorder-qty.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/faq-warranty.png b/erpnext/docs/assets/old_images/erpnext/faq-warranty.png
deleted file mode 100644
index 93903a1..0000000
--- a/erpnext/docs/assets/old_images/erpnext/faq-warranty.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/holiday-list-1.png b/erpnext/docs/assets/old_images/erpnext/holiday-list-1.png
deleted file mode 100644
index 579c6dd..0000000
--- a/erpnext/docs/assets/old_images/erpnext/holiday-list-1.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/holiday-list-2.png b/erpnext/docs/assets/old_images/erpnext/holiday-list-2.png
deleted file mode 100644
index 5717971..0000000
--- a/erpnext/docs/assets/old_images/erpnext/holiday-list-2.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/item-manufacturing-website.png b/erpnext/docs/assets/old_images/erpnext/item-manufacturing-website.png
deleted file mode 100644
index 65d78b9..0000000
--- a/erpnext/docs/assets/old_images/erpnext/item-manufacturing-website.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/item-purchase.png b/erpnext/docs/assets/old_images/erpnext/item-purchase.png
deleted file mode 100644
index 04940b9..0000000
--- a/erpnext/docs/assets/old_images/erpnext/item-purchase.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/item-sales.png b/erpnext/docs/assets/old_images/erpnext/item-sales.png
deleted file mode 100644
index 4579249..0000000
--- a/erpnext/docs/assets/old_images/erpnext/item-sales.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/user/manual/de/customize-erpnext/custom-field.md b/erpnext/docs/user/manual/de/customize-erpnext/custom-field.md
index feeb7d9..7d0f0fa 100644
--- a/erpnext/docs/user/manual/de/customize-erpnext/custom-field.md
+++ b/erpnext/docs/user/manual/de/customize-erpnext/custom-field.md
@@ -16,7 +16,7 @@
 
 In einem benutzerdefinierten Formular finden Sie für jedes Feld die Plus(+)-Option. Wenn Sie auf dieses Symbol klicken, wird eine neue Zeile oberhalb dieses Feldes eingefügt. Sie können die Einstellungen für Ihr Feld in der neu eingefügten leeren Zeile eingeben.
 
-![Formular anpassen - benutzerdefiniertes Feld]({{docs_base_url}}/assets/old_images/erpnext/customize-form-custom-field.png)
+<img alt="Formular anpassen - benutzerdefiniertes Feld" class="screenshot" src="{{docs_base_url}}/assets/img/customize/custom-field-2.gif">
 
 Im Folgenden sind die Schritte aufgeführt, wie man ein benutzerdefiniertes Feld in ein bestehendes Formular einfügt.
 
@@ -56,8 +56,6 @@
 
 Wenn der Feldtyp als Auswahlfeld (Drop Down-Feld) angegeben ist, dann sollten alle möglichen Ergebnisse für dieses Feld im Optionen-Feld aufgelistet werden. Die möglichen Ergebnisse sollten alle in einer eigenen Zeile stehen.
 
-![Optionen für benutzerdefinierte Felder]({{docs_base_url}}/assets/old_images/erpnext/custom-field-option.png)
-
 Bei anderen Feldtypen, wie Daten, Datum, Währung usw. lassen Sie das Optionen-Feld leer.
 
 ### Weitere Eigenschaften
diff --git a/erpnext/docs/user/manual/de/introduction/the-champion.md b/erpnext/docs/user/manual/de/introduction/the-champion.md
index b89f48b..912c252 100644
--- a/erpnext/docs/user/manual/de/introduction/the-champion.md
+++ b/erpnext/docs/user/manual/de/introduction/the-champion.md
@@ -1,7 +1,7 @@
 # Der Champion
 <span class="text-muted contributed-by">Beigetragen von CWT Connector & Wire Technology GmbH</span>
 
-<img class="cover" alt="Bild" src="{{docs_base_url}}/assets/old_images/erpnext/implementation-image.png">
+<img alt="Champion" class="screenshot" src="{{docs_base_url}}/assets/img/setup/implementation-image.png">
 
 Wir haben uns in den letzten Jahren dutzende von ERP-Umsetzungen angesehen, und wir haben erkannt, dass eine erfolgreiche Umsetzung viel mit schwer greifbaren Dingen und persönlichen Einstellungen zu tun hat.
 
diff --git a/erpnext/docs/user/manual/de/using-erpnext/calendar.md b/erpnext/docs/user/manual/de/using-erpnext/calendar.md
index 7087df3..42d884b 100644
--- a/erpnext/docs/user/manual/de/using-erpnext/calendar.md
+++ b/erpnext/docs/user/manual/de/using-erpnext/calendar.md
@@ -5,6 +5,8 @@
 
 Sie können die Kalenderansicht umschalten zwischen Monatsansicht, Wochenansicht und Tagesansicht.
 
+<img class="screenshot" alt="Calendar" src="{{docs_base_url}}/assets/img/collaboration-tools/calendar-1.png">
+
 ### Ereignisse im Kalender erstellen
 
 #### Ein Ereignis manuell erstellen
@@ -13,7 +15,7 @@
 
 Diese Ansicht zeigt die 24 Stunden des Tages aufgeteilt in verschiedene Zeitfenster an. Klicken Sie für den Startzeitpunkt auf ein Zeitfenster und ziehen Sie den Rahmen auf bis Sie den Endzeitpunkt erreichen.
 
-![Manuelle Kalenderereignisse]({{docs_base_url}}/assets/old_images/erpnext/calender-event-manually.png)
+<img class="screenshot" alt="Calendar" src="{{docs_base_url}}/assets/img/collaboration-tools/calendar-2.gif">
 
 Auf Grundlage der Auswahl des Zeitfensters werden Start- und Endzeitpunkt in die Ereignisvorlage übernommen. Sie können dann noch die Bezeichnung des Ereignisses angeben und speichern.
 
@@ -21,7 +23,7 @@
 
 Im Leadformular finden Sie die Felder "Nächster Kontakt durch" und "Nächstes Kontaktdatum". Wenn Sie in diesen Feldern einen Termin und eine Kontaktperson eintragen, wird automatisch ein Ereignis erstellt.
 
-![Ereignis auf Grundlage eines Leads]({{docs_base_url}}/assets/old_images/erpnext/calender-event-lead.png)
+<img class="screenshot" alt="Lead Event" src="{{docs_base_url}}/assets/img/collaboration-tools/calendar-3.png">
 
 #### Geburtstag
 
@@ -31,15 +33,7 @@
 
 Sie können Ereignisse als wiederkehrend in bestimmten Intervallen markieren, indem Sie "Dieses Ereignis wiederholen" aktivieren.
 
-![Wiederkehrendes Kalenderereignis]({{docs_base_url}}/assets/old_images/erpnext/calender-event-recurring.png)
-
-### Berechtigungen für ein Ereignis
-
-Sie können ein Ereignis als privat oder öffentlich erstellen. Private Ereignisse können nur Sie und Benutzer, die in der Tabelle "Teilnehmer" ausgewählt wurden, sehen. Sie können Berechtigungen für Ereignisse nicht nur über den Benutzer, sondern auch über die Rolle setzen.
-
-Ein öffentliches Ereignis wie ein Geburtstag ist für alle sichtbar.
-
-![Berechtigungen für Kalenderereignisse]({{docs_base_url}}/assets/old_images/erpnext/calender-event-permission.png)
+<img class="screenshot" alt="Calendar Recurring Event" src="{{docs_base_url}}/assets/img/collaboration-tools/calendar-4.png">
 
 ### Erinnerungen an Ereignisse
 
@@ -49,7 +43,7 @@
 
 Wenn Sie in der Ereignisvorlage den Punkt "E-Mail-Erinnerung am Morgen senden" anklicken, erhalten alle Teilnehmer an diesem Ereignis eine Benachrichtungs-E-Mail.
 
-![Benachrichtigung über Kalenderereignisse]({{docs_base_url}}/assets/old_images/erpnext/calender-event-notification.png)
+<img class="screenshot" alt="Calendar Recurring Event" src="{{docs_base_url}}/assets/img/collaboration-tools/calendar-6.png">
 
 #### Einen täglichen E-Mail-Bericht erstellen
 
@@ -59,6 +53,6 @@
 
 > Einstellungen > E-Mail > Täglicher E-Mail-Bericht
 
-![Täglicher E-Mail-Bericht]({{docs_base_url}}/assets/old_images/erpnext/calender-email-digest.png)
+<img class="screenshot" alt="Calendar Recurring Event" src="{{docs_base_url}}/assets/img/collaboration-tools/calender-email-digest.png">
 
 {next}
diff --git a/erpnext/docs/user/manual/en/customer-portal/portal-login.md b/erpnext/docs/user/manual/en/customer-portal/portal-login.md
index e2cdbdb..62a9b6f 100644
--- a/erpnext/docs/user/manual/en/customer-portal/portal-login.md
+++ b/erpnext/docs/user/manual/en/customer-portal/portal-login.md
@@ -1,6 +1,6 @@
 To login into the customer account, the customer has to use his Email Address and
 the password sent by ERPNext; generated through the sign-up process.
 
-![Login]({{docs_base_url}}/assets/old_images/erpnext/customer-portal-login.png)
+<img class="screenshot" alt="Website User Signup" src="{{docs_base_url}}/assets/img/website/website-login.png">
 
 {next}
diff --git a/erpnext/docs/user/manual/en/customize-erpnext/custom-doctype.md b/erpnext/docs/user/manual/en/customize-erpnext/custom-doctype.md
index 316fe2b..433db2d 100644
--- a/erpnext/docs/user/manual/en/customize-erpnext/custom-doctype.md
+++ b/erpnext/docs/user/manual/en/customize-erpnext/custom-doctype.md
@@ -1,4 +1,4 @@
-DocType or Document Type is a tool to insert form in ERPNext. The forms like Sales Order,
+DocType or a Document Type is a tool to insert form in ERPNext. The forms like Sales Order,
 Sales Invoices, Production Order are added as Doctype in the backend. Let's assume we are
 creating a Custom Doctype for a Book.
 
@@ -8,7 +8,7 @@
 
 `Setup > Customize > Doctype > New`
 
-#### Doctype Detail
+#### DocType Detail
 
 1. Module: Select module in which this Doctype should be placed.
 1. Document Type: Specify if this Doctype will be to carry master data, or to track transactions. Doctype
@@ -52,13 +52,13 @@
 
 <img alt="Doctype Permissions" class="screenshot" src="{{docs_base_url}}/assets/img/setup/customize/doctype-permissions.png">
 
-#### Save Doctype
+#### Save DocType
 
 On saving doctype, you will get pop-up to provide name for this Doctype.
 
-<img alt="Doctype Save" class="screenshot" src="{{docs_base_url}}/assets/img/setup/customize/Doctype-save.png">
+<img alt="Doctype Save" class="screenshot" src="{{docs_base_url}}/assets/img/setup/customize/doctype-save.png">
 
-#### Doctype in System
+#### DocType in System
 
 To check this Doctype, open Module defined for this doctype. Since we have added Books doctype in the
 Human Resource module, to access this doctype, go to:
@@ -71,6 +71,6 @@
 
 Using the fields entered, following is the master one book.
 
-<img alt="Doctype Form" class="screenshot" src="{{docs_base_url}}/assets/img/setup/customize/Doctype-book-added.png">
+<img alt="Doctype Form" class="screenshot" src="{{docs_base_url}}/assets/img/setup/customize/doctype-book-added.png">
 
 {next}
diff --git a/erpnext/docs/user/manual/en/human-resources/holiday-list.md b/erpnext/docs/user/manual/en/human-resources/holiday-list.md
index 1a98ad3..c1e76f1 100644
--- a/erpnext/docs/user/manual/en/human-resources/holiday-list.md
+++ b/erpnext/docs/user/manual/en/human-resources/holiday-list.md
@@ -1,59 +1,40 @@
-Holiday List is a list which contains the dates of holidays along with the
-occasion of that holiday. The list is generally valid for one calendar year.  
+#Holiday List
 
-Most organisations have a standard Holiday-List for their employees. Some even
-have different holiday lists for laborers and a different one for management
-staff.
+Holiday List is a list which contains the dates of holidays.
+
+Most organisations have a standard Holiday-List for their employees. Some even have different holiday lists based on the different locations or departments.
+
+To add a new Holiday List, go to:
+
+`Human Resources (HR) > Leave and Holiday > Holiday List`
+
+Click on New to add new Holiday List.
+  
+### New Holiday List
+
+Give a name to Holiday List. It can be based in Fiscal Year or location or department as application. Also select From and To Date for the Holiday List.
+
+<img class="screenshot" alt="Holiday List" src="{{docs_base_url}}/assets/img/human-resources/holiday-list-1.png"> 
+
+You can quickly add Weekly Off in the Holiday List as following.
+
+<img class="screenshot" alt="Holiday List" src="{{docs_base_url}}/assets/img/human-resources/holiday-list-2.gif"> 
+
+After that, you can also add specific days (like festival holidays) manually.
+
+<img class="screenshot" alt="Holiday List" src="{{docs_base_url}}/assets/img/human-resources/holiday-list-3.png"> 
 
   
+### Holiday List in Employee
 
-To set up a holiday list in the system, Go to Human Resources Module and Click
-on Holiday List.
+If you have created multiple Holiday List, then select specific Holiday List for an Employee in the respective master.
 
-  
+<img class="screenshot" alt="Holiday List" src="{{docs_base_url}}/assets/img/human-resources/holiday-list-4.png"> 
 
-> Human Resources >Holiday List > New Holiday List  
+When an Employee applies for the Leave, then days mentioned in the Holiday List will not be counted, as they are holiday already. For more configuration option in Holiday List, check `HR > HR Settings`.
 
-  
-#### Figure 1: Holiday List
+> Note 1: If you have specified a Holiday List in the Employment master, then that Holiday List will give priority the default Holiday List of the company.
 
-![]({{docs_base_url}}/assets/old_images/erpnext/holiday-list-1.png)  
-
-  
-
-__Step 1:__ Give a name to the Holiday list
-
-__Step 2:__ Mention the Fiscal Year  
-
-__Step 3:__ State the Weekly  off.  
-
-__Step 4:__ Click on the button 'Get Weekly Off Dates'  
-
-This step will fill the box below with yearly off dates with day as the
-description.
-
-__Step 5:__ Click on Add new row to add more dates  
-
-Mention the holiday reason in the description and select the date from the
-'Date' field.
-
-  
-#### Figure 2: Adding new holidays to the list
-
-![]({{docs_base_url}}/assets/old_images/erpnext/holiday-list-2.png)  
-
-  
-
-> Note 1: If you have selected a holiday list in the Employment Details form,
-the system will give priority to the form mentioned here. It will fetch the
-list mentioned in the form rather than the one which you may have specified as
-Default; However, if there is no list in the employment details form, the
-default list will be fetched.
-
-
-> Note 2: You can form as many holiday lists as you wish. For example, if you
-have a mill, you can have one list for mill workers and another list for
-office staff. You can manage between lists by attaching their respective
-holiday list to their respective employment detail form.
+> Note 2: You can form as many holiday lists as you wish. For example, if you have a factory, you can have one list for the factory workers and another list for office staff. You can manage between lists by attaching their respective holiday list to their respective employment detail form.
 
 {next}
diff --git a/erpnext/docs/user/manual/en/human-resources/setup/holiday-list.md b/erpnext/docs/user/manual/en/human-resources/setup/holiday-list.md
deleted file mode 100644
index 31094f7..0000000
--- a/erpnext/docs/user/manual/en/human-resources/setup/holiday-list.md
+++ /dev/null
@@ -1,5 +0,0 @@
-You can specify the Holidays for a particular year using Holiday List.
-
-<img class="screenshot" alt="Holiday List" src="{{docs_base_url}}/assets/img/human-resources/holiday-list.png">
-
-{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/introduction/the-champion.md b/erpnext/docs/user/manual/en/introduction/the-champion.md
index 472cd94..4d75abb 100644
--- a/erpnext/docs/user/manual/en/introduction/the-champion.md
+++ b/erpnext/docs/user/manual/en/introduction/the-champion.md
@@ -2,7 +2,7 @@
 
 <h1 class="white">The Champion</h1>
 
-<img class="cover" src="{{docs_base_url}}/assets/old_images/erpnext/implementation-image.png">
+<img alt="Champion" class="screenshot" src="{{docs_base_url}}/assets/img/setup/implementation-image.png">
 
 We have seen dozens of ERP implementations over the past few years and we
 realize that successful implementation is a lot about intangibles and
diff --git a/erpnext/docs/user/manual/en/setting-up/integrations/dropbox-backup.md b/erpnext/docs/user/manual/en/setting-up/integrations/dropbox-backup.md
index 9d8554e..0839072 100644
--- a/erpnext/docs/user/manual/en/setting-up/integrations/dropbox-backup.md
+++ b/erpnext/docs/user/manual/en/setting-up/integrations/dropbox-backup.md
@@ -43,12 +43,16 @@
 
 ####Step 3: Fill in details for the app
 
-<img class="screenshot" alt="Create new" src="{{docs_base_url}}/assets/img/setup/integrations/dropbox-open-1.png">
+<img class="screenshot" alt="Choose Dropbox API and type as APP Folder" src="{{docs_base_url}}/assets/img/setup/integrations/dropbox-open-1.png">
 
 -
-<img class="screenshot" alt="Create new" src="{{docs_base_url}}/assets/img/setup/integrations/dropbox-open-2.png">
+<img class="screenshot" alt="Setup APP Name" src="{{docs_base_url}}/assets/img/setup/integrations/dropbox-open-2.png">
 
-####Step 4: Settings in Site Config
+####Step  4: Setup Redirect URL in app
+
+<img class="screenshot" alt="Set Redirect URL" src="{{docs_base_url}}/assets/img/setup/integrations/dropbox_redirect_uri.png">
+
+####Step 5: Settings in Site Config
 
 After the app is created, note the app key and app secret on Dropbox Settings page or enter in `sites/{sitename}/site_config.json` as follows,
 
diff --git a/erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/perpetual-inventory.md b/erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/perpetual-inventory.md
index 92e0544..343e3f4 100644
--- a/erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/perpetual-inventory.md
+++ b/erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/perpetual-inventory.md
@@ -8,7 +8,7 @@
 
   * Activate Perpetual Inventory
 
-	 > Explore > Accounts > Accounts Settings > "Make Accounting Entry For Every Stock Movement"
+	 > Setup > Company > Stock Settings > "Enable Perpetual Inventory"
 
 <img class="screenshot" alt="Perpetual Inventory" src="{{docs_base_url}}/assets/img/accounts/perpetual-1.png">
 
diff --git a/erpnext/docs/user/manual/en/stock/item/index.md b/erpnext/docs/user/manual/en/stock/item/index.md
index ad44866..b3b7279 100644
--- a/erpnext/docs/user/manual/en/stock/item/index.md
+++ b/erpnext/docs/user/manual/en/stock/item/index.md
@@ -1,6 +1,6 @@
-An Item is your companys' product or a service. The term Item is applicable to things (products or services) you sell as well as raw materials or components of products yet to be produced (before they can be sold to customers). An Item can be a phyical product or a service that you buy/sell from your customers/suppliers. ERPNext allows you to manage all sorts of items like raw-materials, sub-assemblies, finished goods, item variants and service items.
+An Item is your companys' product or a service. The term Item is applicable to things (products or services) you sell as well as raw materials or components of products yet to be produced (before they can be sold to customers). An Item can be a physical product or a service that you buy/sell from your customers/suppliers. ERPNext allows you to manage all sorts of items like raw-materials, sub-assemblies, finished goods, item variants and service items.
 
-ERPNext is optimized for itemized management of your sales and purchase. If you are in services, you can create an Item for each services that your offer. Completing the Item Master is very essential for successful implementation of ERPNext.
+ERPNext is optimised for itemised management of your sales and purchase. If you are in services, you can create an Item for each services that your offer. Completing the Item Master is very essential for successful implementation of ERPNext.
 
 ## Item Properties
 
@@ -9,19 +9,15 @@
   * **Item Group:** Item Group is used to categorize an Item under various criterias like products, raw materials, services, sub-assemblies, consumables or all Item groups. Create your default Item Group list under Setup> Item Group and pre-select the option while filling your New Item details under [Item Group]({{docs_base_url}}/user/manual/en/stock/setup/item-group.html)
   * **Default Unit of Measure:** This is the default measuring unit that you will use for your product. It could be in nos, kgs, meters, etc. You can store all the UOM’s that your product will require under Set Up> Master Data > UOM. These can be preselected while filling New Item by using % sign to get a pop up of the UOM list.
   * **Brand:** If you have more than one brand save them under Set Up> Master Data> Brand and pre-select them while filling a New Item.
-  * **Variant:** A Item Variant is a different version of a Item.To learn more about managing varaints see [Item Variants]({{docs_base_url}}/user/manual/en/stock/item/item-variants.html)
+  * **Variant:** A Item Variant is a different version of a Item.To learn more about managing variants see [Item Variants]({{docs_base_url}}/user/manual/en/stock/item/item-variants.html)
 
 ### Upload an Image
 
-To upload an image for your icon that will appear in all transactions, save
-the partially filled form. Only after your file is saved  the 'upload' button will
-work above the Image icon. Click on this sign and upload the image.
+To upload an image for your icon that will appear in all transactions, save the partially filled form. Only after your file is saved  the 'upload' button will work above the Image icon. Click on this sign and upload the image.
 
 ### Inventory : Warehouse and Stock Setting
 
-In ERPNext, you can select different type of Warehouses to stock your
-different Items. This can be selected based on Item types. It could be Fixed
-Asset Item, Stock Item or even Manufacturing Item.
+In ERPNext, you can select different type of Warehouses to stock your different Items. This can be selected based on Item types. It could be Fixed Asset Item, Stock Item or even Manufacturing Item.
 
   * **Stock Item:** If you are maintaining stock of this Item in your Inventory, ERPNext will make a stock ledger entry for each transaction of this item.
   * **Default Warehouse:** This is the Warehouse that is automatically selected in your transactions.
@@ -44,49 +40,51 @@
 
 ### Item Tax
 
-These settings are required only if a particular Item has a different tax rate
-than the rate defined in the standard tax Account. For example, If you have a
-tax Account, “VAT 10%” and this particular Item is exempted from tax, then you
-select “VAT 10%” in the first column, and set “0” as the tax rate in the
-second column.
+These settings are required only if a particular Item has a different tax rate than the rate defined in the standard tax Account. For example, If you have a tax Account, “VAT 10%” and this particular Item is exempted from tax, then you select “VAT 10%” in the first column, and set “0” as the tax rate in the second column.
 
 Go to [Setting Up Taxes]({{docs_base_url}}/user/manual/en/setting-up/setting-up-taxes.html) to understand this topic in detail.
 
 ### Inspection
 
-Inspection Required: If an incoming inspection (at the time of delivery from
-the Supplier) is mandatory for this Item, mention “Inspection Required” as
-“Yes”. The system will ensure that a Quality Inspection will be prepared and
-approved before a Purchase Receipt is submitted.
+Inspection Required: If an incoming inspection (at the time of delivery from the Supplier) is mandatory for this Item, mention “Inspection Required” as “Yes”. The system will ensure that a Quality Inspection will be prepared and approved before a Purchase Receipt is submitted.
 
-Inspection Criteria: If a Quality Inspection is prepared for this Item, then
-this template of criteria will automatically be updated in the Quality
-Inspection table of the Quality Inspection. Examples of Criteria are: Weight,
-Length, Finish etc.
+Inspection Criteria: If a Quality Inspection is prepared for this Item, then this template of criteria will automatically be updated in the Quality Inspection table of the Quality Inspection. Examples of Criteria are: Weight, Length, Finish etc.
 
 ### Purchase Details
 
-![Purchase Details]({{docs_base_url}}/assets/old_images/erpnext/item-purchase.png)
+<img alt="Item Purchase Details" class="screenshot" src="{{docs_base_url}}/assets/img/stock/item-purchase.png">
 
-**Lead time days:** Lead time days are the number of days required for the Item to reach the warehouse.
+* **Lead time days:** Lead time days are the number of days required for the Item to reach the warehouse.
 
-**Default Expense Account:** It is the account in which cost of the Item will be debited.
+* **Default Expense Account:** It is the account in which cost of the Item will be debited.
 
-**Default Cost Centre:** It is used for tracking expense for this Item.
+* **Default Cost Centre:** It is used for tracking expense for this Item.
+
+###Supplier Details
+
+<img alt="Item Supplier Details" class="screenshot" src="{{docs_base_url}}/assets/img/stock/item-supplier.png">
+
+* **Default Supplier:** Supplier from whom you generally purchase this item.
+
+* **Manufacturer Details:** Select Manufacturer and Part No. assigned by the Manufacturer for this item.
+
+* **Supplier Codes:** Track Item Code defined by the Suppliers for this Item. In the Purchase transactions, on selection and Supplier, Supplier Part No. will be fetched as well for the Supplier's reference.
 
 ### Sales Details
 
-![Sales Details]({{docs_base_url}}/assets/old_images/erpnext/item-sales.png)
+<img alt="Item Sales Details" class="screenshot" src="{{docs_base_url}}/assets/img/stock/item-sales.png">
 
-**Default Income Account:** Income account selected here will be fetched automatically in sales invoice for this item.
+* **Default Income Account:** Income account selected here will be fetched automatically in sales invoice for this item.
 
-**Cost Centre:** Cost center selected here will be fetched automatically in sales invoice for this item.
+* **Cost Centre:** Cost center selected here will be fetched automatically in sales invoice for this item.
+
+* **Customer Codes:** Track Item Code assigned by the Customers for this Item. This will help you in searching item while creating Sales Order based on the Item Code in the Customer's Purchase Order.
 
 ### Manufacturing And Website
 
-![Manufacturing]({{docs_base_url}}/assets/old_images/erpnext/item-manufacturing-website.png)
+<img alt="Item Manfacturing and Website Details" class="screenshot" src="{{docs_base_url}}/assets/img/stock/item-manufacturing-and-website.png">
 
-Visit [Manufacturing]({{docs_base_url}}/user/manual/en/manufacturing) and [Website ]({{docs_base_url}}/user/manual/en/website)to understand these topics in detail.
+Visit [Manufacturing]({{docs_base_url}}/user/manual/en/manufacturing.html) and [Website ]({{docs_base_url}}/user/manual/en/website.html)to understand these topics in detail.
 
 ### Learn more about Item
 
diff --git a/erpnext/docs/user/manual/en/stock/item/item-valuation-fifo-and-moving-average.md b/erpnext/docs/user/manual/en/stock/item/item-valuation-fifo-and-moving-average.md
index fc5ef00..d1456ee 100644
--- a/erpnext/docs/user/manual/en/stock/item/item-valuation-fifo-and-moving-average.md
+++ b/erpnext/docs/user/manual/en/stock/item/item-valuation-fifo-and-moving-average.md
@@ -19,7 +19,7 @@
 
   * **FIFO (First In First Out):** In this system, ERPNext assumes that you will consume / sell those Items first which you bought first. For example, if you buy an Item at price X and then after a few days at price Y, whenever you sell your Item, ERPNext will reduce the quantity of the Item priced at X first and then Y.
 
-![FIFO]({{docs_base_url}}/assets/old_images/erpnext/fifo.png)
+<img alt="FIFO" class="screenshot" src="{{docs_base_url}}/assets/img/stock/fifo.png">
 
   * **Moving Average:** In this method, ERPNext assumes that the value of the item at any point is the average price of the units of that Item in stock. For example, if the value of an Item is X in a Warehouse with quantity Y and another quantity Y1 is added to the Warehouse at cost X1, the new value X2 would be:
 
diff --git a/erpnext/docs/user/manual/en/stock/item/purchase-details.md b/erpnext/docs/user/manual/en/stock/item/purchase-details.md
index 47983df..134d551 100644
--- a/erpnext/docs/user/manual/en/stock/item/purchase-details.md
+++ b/erpnext/docs/user/manual/en/stock/item/purchase-details.md
@@ -1,22 +1,7 @@
-# Purchase Details
+# Item Warranty
 
-# How Do I Track Warranty Status?
-
-To track a warranty period, it is necessary that the Item is a serialized Item.
-When this Item is delivered, the delivery date and the expiry period is saved in the serial number master. Through the serial number master you can track the warranty status.
+To track a warranty period, it is necessary that the Item is a serialized Item. When this Item is delivered, the delivery date and the expiry period is saved in the serial number master. Through the serial number master you can track the warranty status.
 
 A warranty means a guarantee or a promise which provides assurance by one party to the other party which allows for a legal remedy if that promise is not true or followed. A warranty period is a time period in which a purchased product may be returned or exchanged.
 
-![Warranty]({{docs_base_url}}/assets/old_images/erpnext/faq-warranty.png)
-
-# How To Name A Manufacturer Part Number?
-
-Go to the purchase details section of the Item form, and enter the number on the right hand side in the field ‘Manufacturer Part Number’
-
-> Stock > Item
-
-A manufacturer part number is a series of numbers and /or letters that has been given to a part by the manufacturer. The manufacturer part number belongs to the manufacturer and helps distinguish the part from other manufacturers. If two parts come from different manufacturers, they will have different MPNs. This allows businesses to identify which company made the part.
-
-![Part No]({{docs_base_url}}/assets/old_images/erpnext/faq-manufacturer-part-no.png)
-
-__For Example:__ A refrigerator will have different parts which will have manufacturer part number. Thus, when any part fails and you want to replace it, you can simply order that part based on its part number.
+<img class="screenshot" alt="Item Warranty" src="{{docs_base_url}}/assets/img/stock/item-warranty.png">
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/stock/item/reorder.md b/erpnext/docs/user/manual/en/stock/item/reorder.md
index 4537d95..548a8a9 100644
--- a/erpnext/docs/user/manual/en/stock/item/reorder.md
+++ b/erpnext/docs/user/manual/en/stock/item/reorder.md
@@ -1,26 +1,13 @@
-# Re-Order 
+# Re-order Level & Re-order Qty
 
-# How To Setup Re-order Level?
+The **Re-order Level** is the point at which stock on a particular item has diminished to a point where it needs to be replenished. To order based on Re-order level can avoid shortages. Re-order level can be determined based on the lead time and the average daily consumption.
 
-Go to the Re-order section of the Item form in the Stock module.
+You can update Re-order Level and Re-order Qty for an Item in the Auto Re-order section.
 
-> Stock > Item
+For example, you can set your reorder level of Motherboard at 10. When there are only 10 Motherboards remaining in stock, the system will either automatically create a Material Request in your ERPNext account.
 
-The Re-order level is the point at which stock on a particular item has diminished to a point where it needs to be replenished. To order based on Re-order level can avoid shortages. Re-order level can be determined based on the lead time and the average daily consumption.
+**Re-order quantity** is the quantity to order, so that the sum of ordering cost and holding cost is at its minimum.The re-order quantity is based on the minimum order quantity specified by the supplier and many other factors.
 
-![Reorder Level]({{docs_base_url}}/assets/old_images/erpnext/faq-reorder-level.png)
+For example, If reorder level is 100 items, your reorder quantity may not necessarily be 100 items. The Reorder quantity can be greater than or equal to reorder level. It may depend upon lead time, discount, transportation and average daily consumption.
 
-__For example:__ You can set your reorder level of bath towels at 10. When there are only 10 towels remaining in stock, the system will either send a mail or take action depending upon what you have selected in global settings.
-
-# How To Setup Reorder Quantity?
-
-To setup Reorder quantity, go to the Re-order section of the Item form. In the field ‘Re-order Qty’ type the amount that is needed.
-
-> Stock> Item
-
-Re-order quantity is the quantity to order, so that the sum of ordering cost and holding cost is at its minimum.The re-order quantity is based on the minimum order quantity specified by the supplier and many other factors.
-
-![Reorder Quantity]({{docs_base_url}}/assets/old_images/erpnext/faq-reorder-qty.png)
-
-__For example:__ If reorder level is 100 items, your reorder quantity may not necessarily be 100 items. The Reorder quantity can be greater than or equal to reorder level. It may depend upon lead time, discount, transportation and average daily consumption.
-
+<img alt="Item Reorder" class="screenshot" src="{{docs_base_url}}/assets/img/stock/item-reorder.png">
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/using-erpnext/calendar.md b/erpnext/docs/user/manual/en/using-erpnext/calendar.md
index c674bf6..c8b64af 100644
--- a/erpnext/docs/user/manual/en/using-erpnext/calendar.md
+++ b/erpnext/docs/user/manual/en/using-erpnext/calendar.md
@@ -1,14 +1,14 @@
 The Calendar is a tool where you can create and share Events and also see auto-generated events from the system.
 
-You can switch calender view based on Month, Week and Day.
+You can switch calendar view based on Month, Week and Day.
 
 <img class="screenshot" alt="Calendar" src="{{docs_base_url}}/assets/img/collaboration-tools/calendar-1.png">
 
-### Creating Events in Calender
+### Creating Events in Calendar
 
 #### Creating Event Manually
 
-To create event manually, you should first determine Calender View. If Event's start and end time will be within one day, then you should first switch to Day view.
+To create event manually, you should first determine Calendar View. If Event's start and end time will be within one day, then you should first switch to Day view.
 
 This view will 24 hours of a day broken in various slots. You should click on slot for Event Start Time, and drag it down till you reach event end time.
 
@@ -45,7 +45,7 @@
 
 #### Create Email Digest
 
-To get email reminders for event, you should set Email Digest for Calender Events.
+To get email reminders for event, you should set Email Digest for Calendar Events.
 
 Email Digest can be set from:
 
diff --git a/erpnext/hr/doctype/training_event/training_event.py b/erpnext/hr/doctype/training_event/training_event.py
index c9be3dd..27ae8cf 100644
--- a/erpnext/hr/doctype/training_event/training_event.py
+++ b/erpnext/hr/doctype/training_event/training_event.py
@@ -8,20 +8,19 @@
 from frappe.model.document import Document
 
 class TrainingEvent(Document):
-	def validate(self):
-		if self.event_status == "Scheduled":
-			self.invite_employee()
+	def on_update(self):
+		self.invite_employee()
 	
 	def on_update_after_submit(self):
-		if self.event_status == "Scheduled" and self.send_email:
-			self.invite_employee()
+		self.invite_employee()
 	
 	def invite_employee(self):
-		subject = _("""You are invited for to attend {0} - {1} scheduled from {2} to {3} at {4}."""\
-			.format(self.type, self.event_name, self.start_time, self.end_time, self.location))
-	
-		for emp in self.employees:
-			if emp.status== "Open":
-				frappe.sendmail(frappe.db.get_value("Employee", emp.employee, "company_email"), \
-					subject=subject, content= self.introduction)
-				emp.status= "Invited"
\ No newline at end of file
+		if self.event_status == "Scheduled" and self.send_email:
+			subject = _("""You are invited for to attend {0} - {1} scheduled from {2} to {3} at {4}."""\
+				.format(self.type, self.event_name, self.start_time, self.end_time, self.location))
+
+			for emp in self.employees:
+				if emp.status== "Open":
+					frappe.sendmail(frappe.db.get_value("Employee", emp.employee, "company_email"), \
+						subject=subject, content= self.introduction)
+					emp.status= "Invited"
\ No newline at end of file
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 1f2966d..d0fa2e6 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -1,5 +1,5 @@
 execute:import unidecode # new requirement
-
+erpnext.patches.v8_0.move_perpetual_inventory_setting
 erpnext.patches.v4_0.validate_v3_patch
 erpnext.patches.v4_0.fix_employee_user_id
 erpnext.patches.v4_0.remove_employee_role_if_no_employee
@@ -404,4 +404,6 @@
 erpnext.patches.v8_0.move_account_head_from_account_to_warehouse_for_inventory
 erpnext.patches.v8_0.change_in_words_varchar_length
 erpnext.patches.v8_0.create_domain_docs	#16-05-2017
-erpnext.patches.v8_0.update_sales_cost_in_project
\ No newline at end of file
+erpnext.patches.v8_0.update_sales_cost_in_project
+erpnext.patches.v8_0.save_system_settings
+erpnext.patches.v8_1.delete_deprecated_reports
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/create_warehouse_nestedset.py b/erpnext/patches/v7_0/create_warehouse_nestedset.py
index 8c52c3e..06766b9 100644
--- a/erpnext/patches/v7_0/create_warehouse_nestedset.py
+++ b/erpnext/patches/v7_0/create_warehouse_nestedset.py
@@ -1,6 +1,6 @@
 
 from __future__ import unicode_literals
-import frappe
+import frappe, erpnext
 from frappe import _
 from frappe.utils import cint
 from frappe.utils.nestedset import rebuild_tree
@@ -51,7 +51,8 @@
 def make_warehouse_nestedset(company=None):
 	validate_parent_account_for_warehouse(company)
 	stock_account_group = get_stock_account_group(company.name)
-	if not stock_account_group and cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
+	enable_perpetual_inventory = cint(erpnext.is_perpetual_inventory_enabled(company)) or 0
+	if not stock_account_group and enable_perpetual_inventory:
 		return
 
 	if company:
@@ -65,14 +66,14 @@
 		create_default_warehouse_group(company, stock_account_group, ignore_mandatory)
 
 	set_parent_to_warehouse(warehouse_group, company)
-	if cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
+	if enable_perpetual_inventory:
 		set_parent_to_warehouse_account(company)
 
 def validate_parent_account_for_warehouse(company=None):
 	if not company:
 		return
 
-	if cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
+	if cint(erpnext.is_perpetual_inventory_enabled(company)):
 		parent_account = frappe.db.sql("""select name from tabAccount
 			where account_type='Stock' and company=%s and is_group=1
 			and (warehouse is null or warehouse = '')""", company.name)
diff --git a/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py b/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py
index 174bb11..d0e816a 100644
--- a/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py
+++ b/erpnext/patches/v7_0/fix_nonwarehouse_ledger_gl_entries_for_transactions.py
@@ -2,18 +2,16 @@
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
-import frappe
+import frappe, erpnext
 
 def execute():
-	if not frappe.db.get_single_value("Accounts Settings", "auto_accounting_for_stock"):
-		return
-	
 	frappe.reload_doctype("Account")
 
-	warehouses = frappe.db.sql_list("""select name from tabAccount
+	warehouses = frappe.db.sql_list("""select name, company from tabAccount
 		where account_type = 'Stock' and is_group = 0
-		and (warehouse is null or warehouse = '')""")
-	if warehouses:
+		and (warehouse is null or warehouse = '')""", as_dict)
+	warehouses = [d.name for d in warehouses if erpnext.is_perpetual_inventory_enabled(d.company)]
+	if len(warehouses) > 0:
 		warehouses = set_warehouse_for_stock_account(warehouses)
 		if not warehouses:
 			return
diff --git a/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py b/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py
index f5aee15..22f9db6 100644
--- a/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py
+++ b/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py
@@ -8,17 +8,16 @@
 from erpnext.controllers.stock_controller import update_gl_entries_after
 
 def execute():
-	if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
-		return
-
+	company_list = frappe.db.sql_list("""Select name from tabCompany where enable_perpetual_inventory = 1""")
 	frappe.reload_doc('accounts', 'doctype', 'sales_invoice')
 	
 	frappe.reload_doctype("Purchase Invoice")	
 	wh_account = get_warehouse_account_map()
 	
-	for pi in frappe.get_all("Purchase Invoice", filters={"docstatus": 1, "update_stock": 1}):
-		pi_doc = frappe.get_doc("Purchase Invoice", pi.name)
-		items, warehouses = pi_doc.get_items_and_warehouses()
-		update_gl_entries_after(pi_doc.posting_date, pi_doc.posting_time, warehouses, items, wh_account)
+	for pi in frappe.get_all("Purchase Invoice", fields=["name", "company"], filters={"docstatus": 1, "update_stock": 1}):
+		if pi.company in company_list:
+			pi_doc = frappe.get_doc("Purchase Invoice", pi.name)
+			items, warehouses = pi_doc.get_items_and_warehouses()
+			update_gl_entries_after(pi_doc.posting_date, pi_doc.posting_time, warehouses, items, wh_account)
 		
-		frappe.db.commit()
\ No newline at end of file
+			frappe.db.commit()
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/repost_gle_for_pi_with_update_stock.py b/erpnext/patches/v7_0/repost_gle_for_pi_with_update_stock.py
index 9f159be..2d1a151 100644
--- a/erpnext/patches/v7_0/repost_gle_for_pi_with_update_stock.py
+++ b/erpnext/patches/v7_0/repost_gle_for_pi_with_update_stock.py
@@ -6,13 +6,11 @@
 from frappe.utils import cint
 
 def execute():
-	if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
-		return
-
 	frappe.reload_doctype("Purchase Invoice")
 
 	for pi in frappe.db.sql("""select name from `tabPurchase Invoice` 
-		where update_stock=1 and docstatus=1  order by posting_date asc""", as_dict=1):
+		where company in(select name from tabCompany where enable_perpetual_inventory = 1) and 
+		update_stock=1 and docstatus=1 order by posting_date asc""", as_dict=1):
 		
 			frappe.db.sql("""delete from `tabGL Entry` 
 				where voucher_type = 'Purchase Invoice' and voucher_no = %s""", pi.name)
diff --git a/erpnext/patches/v8_0/move_perpetual_inventory_setting.py b/erpnext/patches/v8_0/move_perpetual_inventory_setting.py
new file mode 100644
index 0000000..594a15c
--- /dev/null
+++ b/erpnext/patches/v8_0/move_perpetual_inventory_setting.py
@@ -0,0 +1,13 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+	frappe.reload_doctype('Company')
+	enabled = frappe.db.get_single_value("Accounts Settings", "auto_accounting_for_stock") or 0
+	for data in frappe.get_all('Company', fields = ["name"]):
+		doc = frappe.get_doc('Company', data.name)
+		doc.enable_perpetual_inventory = enabled
+		doc.save(ignore_permissions=True)
\ No newline at end of file
diff --git a/erpnext/patches/v8_0/save_system_settings.py b/erpnext/patches/v8_0/save_system_settings.py
new file mode 100644
index 0000000..d91e4c1
--- /dev/null
+++ b/erpnext/patches/v8_0/save_system_settings.py
@@ -0,0 +1,15 @@
+# Copyright (c) 2017, Frappe and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+	"""
+		save system settings document
+	"""
+
+	frappe.reload_doc("core", "doctype", "system_settings")
+	doc = frappe.get_doc("System Settings", "System Settings")
+	doc.flags.ignore_mandatory = True
+	doc.save(ignore_permissions=True)
diff --git a/erpnext/patches/v8_1/__init__.py b/erpnext/patches/v8_1/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/patches/v8_1/__init__.py
diff --git a/erpnext/patches/v8_1/delete_deprecated_reports.py b/erpnext/patches/v8_1/delete_deprecated_reports.py
new file mode 100644
index 0000000..2cb84a9
--- /dev/null
+++ b/erpnext/patches/v8_1/delete_deprecated_reports.py
@@ -0,0 +1,15 @@
+# Copyright (c) 2017, Frappe and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+	""" delete deprecated reports """
+
+	reports = ["Monthly Salary Register", "Customer Addresses And Contacts",
+		"Supplier Addresses And Contacts"]
+
+	for report in reports:
+		if frappe.db.exists("Report", report):
+			frappe.delete_doc("Report", report, ignore_permissions=True)
\ No newline at end of file
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index 10d4f22..2cb93f0 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -120,6 +120,11 @@
 		self.flags.dont_sync_tasks = True
 		self.save(ignore_permissions = True)
 
+	def after_insert(self):
+		if self.sales_order:
+			frappe.db.set_value("Sales Order", self.sales_order, "project", self.name)
+
+
 	def update_percent_complete(self):
 		total = frappe.db.sql("""select count(name) from tabTask where project=%s""", self.name)[0][0]
 		if not total and self.percent_complete:
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index 9650862..eaf064b 100644
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -31,6 +31,12 @@
 		}
 	},
 
+	is_perpetual_inventory_enabled: function(company) {
+		if(company) {
+			return frappe.get_doc(":Company", company).enable_perpetual_inventory
+		}
+	},
+
 	setup_serial_no: function() {
 		var grid_row = cur_frm.open_grid_row();
 		if(!grid_row || !grid_row.grid_form.fields_dict.serial_no ||
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index 0c55ec4..6c3d86d 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -156,7 +156,7 @@
 		erpnext.company.set_custom_query(frm, v);
 	});
 
-	if (frappe.sys_defaults.auto_accounting_for_stock) {
+	if (frm.doc.enable_perpetual_inventory) {
 		$.each([
 			["stock_adjustment_account", 
 				{"root_type": "Expense", "account_type": "Stock Adjustment"}],
diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json
index cd11057..69b2c3a 100644
--- a/erpnext/setup/doctype/company/company.json
+++ b/erpnext/setup/doctype/company/company.json
@@ -1128,6 +1128,37 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
+   "default": "1", 
+   "fieldname": "enable_perpetual_inventory", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Enable Perpetual Inventory", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
    "fieldname": "default_inventory_account", 
    "fieldtype": "Link", 
    "hidden": 0, 
@@ -1243,6 +1274,7 @@
    "unique": 0
   }, 
   {
+   "allow_bulk_edit": 0, 
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -1777,7 +1809,7 @@
  "istable": 0, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2017-06-14 11:06:33.629948", 
+ "modified": "2017-06-15 19:46:10.875108", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Company", 
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py
index 0ddadf0..1af0d8c 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -33,6 +33,7 @@
 		self.validate_default_accounts()
 		self.validate_currency()
 		self.validate_coa_input()
+		self.validate_perpetual_inventory()
 
 	def validate_abbr(self):
 		if not self.abbr:
@@ -88,6 +89,10 @@
 		if self.default_currency:
 			frappe.db.set_value("Currency", self.default_currency, "enabled", 1)
 
+		if hasattr(frappe.local, 'enable_perpetual_inventory') and \
+			self.name in frappe.local.enable_perpetual_inventory:
+			frappe.local.enable_perpetual_inventory[self.name] = self.enable_perpetual_inventory
+
 		frappe.clear_cache()
 
 	def install_country_fixtures(self):
@@ -139,6 +144,12 @@
 			if not self.chart_of_accounts:
 				self.chart_of_accounts = "Standard"
 
+	def validate_perpetual_inventory(self):
+		if not self.get("__islocal"):
+			if cint(self.enable_perpetual_inventory) == 1 and not self.default_inventory_account:
+				frappe.msgprint(_("Set default inventory account for perpetual inventory"), 
+					alert=True, indicator='orange')
+
 	def set_default_accounts(self):
 		self._set_default_account("default_cash_account", "Cash")
 		self._set_default_account("default_bank_account", "Bank")
@@ -146,7 +157,7 @@
 		self._set_default_account("accumulated_depreciation_account", "Accumulated Depreciation")
 		self._set_default_account("depreciation_expense_account", "Depreciation")
 
-		if cint(frappe.db.get_single_value("Accounts Settings", "auto_accounting_for_stock")):
+		if self.enable_perpetual_inventory:
 			self._set_default_account("stock_received_but_not_billed", "Stock Received But Not Billed")
 			self._set_default_account("default_inventory_account", "Stock")
 			self._set_default_account("stock_adjustment_account", "Stock Adjustment")
diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py
index 5daa4e4..9d814fd 100644
--- a/erpnext/setup/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/setup_wizard/setup_wizard.py
@@ -85,6 +85,7 @@
 		frappe.get_doc({
 			"doctype":"Company",
 			'company_name':args.get('company_name').strip(),
+			'enable_perpetual_inventory': 1,
 			'abbr':args.get('company_abbr'),
 			'default_currency':args.get('currency'),
 			'country': args.get('country'),
@@ -159,10 +160,6 @@
 
 	frappe.db.set_value("System Settings", None, "email_footer_address", args.get("company"))
 
-	accounts_settings = frappe.get_doc("Accounts Settings")
-	accounts_settings.auto_accounting_for_stock = 1
-	accounts_settings.save()
-
 	stock_settings = frappe.get_doc("Stock Settings")
 	stock_settings.item_naming_by = "Item Code"
 	stock_settings.valuation_method = "FIFO"
diff --git a/erpnext/startup/boot.py b/erpnext/startup/boot.py
index 6e71769..80a7834 100644
--- a/erpnext/startup/boot.py
+++ b/erpnext/startup/boot.py
@@ -27,8 +27,8 @@
 			bootinfo.setup_complete = frappe.db.sql("""select name from
 				tabCompany limit 1""") and 'Yes' or 'No'
 
-		bootinfo.docs += frappe.db.sql("""select name, default_currency, cost_center,
-			default_terms, default_letter_head, default_bank_account from `tabCompany`""",
+		bootinfo.docs += frappe.db.sql("""select name, default_currency, cost_center, default_terms,
+			default_letter_head, default_bank_account, enable_perpetual_inventory from `tabCompany`""",
 			as_dict=1, update={"doctype":":Company"})
 
 def load_country_and_currency(bootinfo):
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index faa1fac..de47fde 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -38,8 +38,9 @@
 			}
 		});
 
-		if (frappe.sys_defaults.auto_accounting_for_stock) {
-			frm.set_query('expense_account', 'items', function(doc, cdt, cdn) {
+		
+		frm.set_query('expense_account', 'items', function(doc, cdt, cdn) {
+			if (erpnext.is_perpetual_inventory_enabled(doc.company)) {
 				return {
 					filters: {
 						"report_type": "Profit and Loss",
@@ -47,17 +48,20 @@
 						"is_group": 0
 					}
 				}
-			});
+			}
+		});
 
-			frm.set_query('cost_center', 'items', function(doc, cdt, cdn) {
+		frm.set_query('cost_center', 'items', function(doc, cdt, cdn) {
+			if (erpnext.is_perpetual_inventory_enabled(doc.company)) {
 				return {
 					filters: {
 						'company': doc.company,
 						"is_group": 0
 					}
 				}
-			});
-		}
+			}
+		});
+		
 
 		$.extend(frm.cscript, new erpnext.stock.DeliveryNoteController({frm: frm}));
 	},
@@ -137,7 +141,7 @@
 
 		if (doc.docstatus==1) {
 			this.show_stock_ledger();
-			if (cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
+			if (erpnext.is_perpetual_inventory_enabled(doc.company)) {
 				this.show_general_ledger();
 			}
 			if (this.frm.has_perm("submit") && doc.status !== "Closed") {
@@ -164,10 +168,6 @@
 				__("Status"))
 		}
 		erpnext.stock.delivery_note.set_print_hide(doc, dt, dn);
-
-		// unhide expense_account and cost_center is auto_accounting_for_stock enabled
-		var aii_enabled = cint(frappe.sys_defaults.auto_accounting_for_stock)
-		this.frm.fields_dict["items"].grid.set_column_disp(["expense_account", "cost_center"], aii_enabled);
 	},
 
 	make_sales_invoice: function() {
@@ -225,6 +225,24 @@
 
 });
 
+frappe.ui.form.on('Delivery Note', {
+	setup: function(frm) {
+		if(frm.doc.company) {
+			frm.trigger("unhide_account_head");
+		}
+	},
+
+	company: function(frm) {
+		frm.trigger("unhide_account_head");
+	},
+	
+	unhide_account_head: function(frm) {
+		// unhide expense_account and cost_center if perpetual inventory is enabled in the company
+		var aii_enabled = erpnext.is_perpetual_inventory_enabled(frm.doc.company)
+		frm.fields_dict["items"].grid.set_column_disp(["expense_account", "cost_center"], aii_enabled);
+	}
+})
+
 
 erpnext.stock.delivery_note.set_print_hide = function(doc, cdt, cdn){
 	var dn_fields = frappe.meta.docfield_map['Delivery Note'];
diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py
index 0f3099f..751d527 100644
--- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py
@@ -47,9 +47,8 @@
 		self.assertRaises(frappe.ValidationError, frappe.get_doc(si).insert)
 
 	def test_delivery_note_no_gl_entry(self):
-		set_perpetual_inventory(0)
-		self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 0)
-
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(0, company)
 		make_stock_entry(target="_Test Warehouse - _TC", qty=5, basic_rate=100)
 
 		stock_queue = json.loads(get_previous_sle({
@@ -68,8 +67,9 @@
 		self.assertFalse(get_gl_entries("Delivery Note", dn.name))
 
 	def test_delivery_note_gl_entry(self):
-		set_perpetual_inventory()
-		self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(1, company)
+
 		set_valuation_method("_Test Item", "FIFO")
 
 		make_stock_entry(target="_Test Warehouse - _TC", qty=5, basic_rate=100)
@@ -115,10 +115,11 @@
 
 		dn.cancel()
 		self.assertFalse(get_gl_entries("Delivery Note", dn.name))
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, company)
 
 	def test_delivery_note_gl_entry_packing_item(self):
-		set_perpetual_inventory()
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(1, company)
 
 		make_stock_entry(item_code="_Test Item", target="_Test Warehouse - _TC", qty=10, basic_rate=100)
 		make_stock_entry(item_code="_Test Item Home Desktop 100",
@@ -156,7 +157,7 @@
 		dn.cancel()
 		self.assertFalse(get_gl_entries("Delivery Note", dn.name))
 
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, company)
 
 	def test_serialized(self):
 		se = make_serialized_item()
@@ -196,7 +197,8 @@
 			self.assertEquals(cstr(serial_no.get(field)), value)
 
 	def test_sales_return_for_non_bundled_items(self):
-		set_perpetual_inventory()
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(1, company)
 
 		make_stock_entry(item_code="_Test Item", target="_Test Warehouse - _TC", qty=50, basic_rate=100)
 
@@ -230,10 +232,11 @@
 
 		self.assertEquals(gle_warehouse_amount, stock_value_difference)
 
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, company)
 
 	def test_return_single_item_from_bundled_items(self):
-		set_perpetual_inventory()
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(1, company)
 
 		create_stock_reconciliation(item_code="_Test Item", target="_Test Warehouse - _TC", qty=50, rate=100)
 		create_stock_reconciliation(item_code="_Test Item Home Desktop 100", target="_Test Warehouse - _TC",
@@ -270,10 +273,11 @@
 
 		self.assertEquals(gle_warehouse_amount, stock_value_difference)
 
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, company)
 
 	def test_return_entire_bundled_items(self):
-		set_perpetual_inventory()
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(1, company)
 
 		create_stock_reconciliation(item_code="_Test Item",
 			target="_Test Warehouse - _TC", qty=50, rate=100)
@@ -312,7 +316,7 @@
 
 		self.assertEquals(gle_warehouse_amount, 1400)
 
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, company)
 
 	def test_return_for_serialized_items(self):
 		se = make_serialized_item()
@@ -350,7 +354,8 @@
 		})
 
 	def test_delivery_of_bundled_items_to_target_warehouse(self):
-		set_perpetual_inventory()
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(1, company)
 
 		set_valuation_method("_Test Item", "FIFO")
 		set_valuation_method("_Test Item Home Desktop 100", "FIFO")
@@ -418,7 +423,7 @@
 		for i, gle in enumerate(gl_entries):
 			self.assertEquals([gle.debit, gle.credit], expected_values.get(gle.account))
 
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, company)
 
 	def test_closed_delivery_note(self):
 		from erpnext.stock.doctype.delivery_note.delivery_note import update_delivery_note_status
diff --git a/erpnext/stock/doctype/material_request/test_material_request.py b/erpnext/stock/doctype/material_request/test_material_request.py
index c3a2137..1531f40 100644
--- a/erpnext/stock/doctype/material_request/test_material_request.py
+++ b/erpnext/stock/doctype/material_request/test_material_request.py
@@ -5,13 +5,13 @@
 # For license information, please see license.txt
 
 from __future__ import unicode_literals
-import frappe, unittest
+import frappe, unittest, erpnext
 from frappe.utils import flt
 from erpnext.stock.doctype.material_request.material_request import raise_production_orders
 
 class TestMaterialRequest(unittest.TestCase):
 	def setUp(self):
-		frappe.defaults.set_global_default("auto_accounting_for_stock", 0)
+		erpnext.set_perpetual_inventory(0)
 
 	def test_make_purchase_order(self):
 		from erpnext.stock.doctype.material_request.material_request import make_purchase_order
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index c998140..19cc44a 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -33,6 +33,21 @@
 			}
 		});
 
+	},
+
+	refresh: function(frm) {
+		if(frm.doc.company) {
+			frm.trigger("toggle_display_account_head");
+		}
+	},
+
+	company: function(frm) {
+		frm.trigger("toggle_display_account_head");
+	},
+
+	toggle_display_account_head: function(frm) {
+		var enabled = erpnext.is_perpetual_inventory_enabled(frm.doc.company)
+		frm.fields_dict["items"].grid.set_column_disp(["cost_center"], enabled);
 	}
 });
 
@@ -47,7 +62,7 @@
 		this._super();
 		if(this.frm.doc.docstatus===1) {
 			this.show_stock_ledger();
-			if (cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
+			if (erpnext.is_perpetual_inventory_enabled(this.frm.doc.company)) {
 				this.show_general_ledger();
 			}
 		}
diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
index 4ea0add..d8cd271 100644
--- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
@@ -4,7 +4,7 @@
 
 from __future__ import unicode_literals
 import unittest
-import frappe
+import frappe, erpnext
 import frappe.defaults
 from frappe.utils import cint, flt, cstr, today
 from erpnext.stock.doctype.purchase_receipt.purchase_receipt import make_purchase_invoice
@@ -30,7 +30,8 @@
 		self.assertRaises(frappe.ValidationError, frappe.get_doc(pi).submit)
 
 	def test_purchase_receipt_no_gl_entry(self):
-		set_perpetual_inventory(0)
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(0, company)
 
 		existing_bin_stock_value = frappe.db.get_value("Bin", {"item_code": "_Test Item",
 			"warehouse": "_Test Warehouse - _TC"}, "stock_value")
@@ -50,9 +51,9 @@
 		self.assertFalse(get_gl_entries("Purchase Receipt", pr.name))
 
 	def test_purchase_receipt_gl_entry(self):
-		set_perpetual_inventory()
-		self.assertEqual(cint(frappe.defaults.get_global_default("auto_accounting_for_stock")), 1)
 		pr = frappe.copy_doc(test_records[0])
+		set_perpetual_inventory(1, pr.company)
+		self.assertEqual(cint(erpnext.is_perpetual_inventory_enabled(pr.company)), 1)
 		pr.insert()
 		pr.submit()
 
@@ -84,7 +85,7 @@
 		pr.cancel()
 		self.assertFalse(get_gl_entries("Purchase Receipt", pr.name))
 
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, pr.company)
 
 	def test_subcontracting(self):
 		from erpnext.stock.doctype.stock_entry.test_stock_entry import make_stock_entry
diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
index e18e532..2d87257 100755
--- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
+++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
@@ -1,1996 +1,2061 @@
 {
- "allow_copy": 0,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "autoname": "hash",
- "beta": 0,
- "creation": "2013-05-24 19:29:10",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Document",
- "editable_grid": 1,
+ "allow_copy": 0, 
+ "allow_guest_to_view": 0, 
+ "allow_import": 0, 
+ "allow_rename": 0, 
+ "autoname": "hash", 
+ "beta": 0, 
+ "creation": "2013-05-24 19:29:10", 
+ "custom": 0, 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "Document", 
+ "editable_grid": 1, 
  "fields": [
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "barcode",
-   "fieldtype": "Data",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Barcode",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "barcode", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Barcode", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "section_break_2",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "section_break_2", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 1,
-   "collapsible": 0,
-   "columns": 3,
-   "fieldname": "item_code",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 1,
-   "in_list_view": 1,
-   "in_standard_filter": 0,
-   "label": "Item Code",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "item_code",
-   "oldfieldtype": "Link",
-   "options": "Item",
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 1,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 1, 
+   "collapsible": 0, 
+   "columns": 3, 
+   "fieldname": "item_code", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 1, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Item Code", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "item_code", 
+   "oldfieldtype": "Link", 
+   "options": "Item", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 1, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "column_break_2",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "column_break_2", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "item_name",
-   "fieldtype": "Data",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 1,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Item Name",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "item_name",
-   "oldfieldtype": "Data",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "item_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 1, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Item Name", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "item_name", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 1,
-   "columns": 0,
-   "fieldname": "section_break_4",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Description",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 1, 
+   "columns": 0, 
+   "fieldname": "section_break_4", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Description", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "description",
-   "fieldtype": "Text Editor",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Description",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "description",
-   "oldfieldtype": "Text",
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "print_width": "300px",
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "description", 
+   "fieldtype": "Text Editor", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Description", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "description", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "300px", 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "300px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "col_break1",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "col_break1", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "image",
-   "fieldtype": "Attach",
-   "hidden": 1,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Image",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "image", 
+   "fieldtype": "Attach", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Image", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "image_view",
-   "fieldtype": "Image",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Image View",
-   "length": 0,
-   "no_copy": 0,
-   "options": "image",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "image_view", 
+   "fieldtype": "Image", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Image View", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "image", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "received_and_accepted",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Received and Accepted",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "received_and_accepted", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Received and Accepted", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 1,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "received_qty",
-   "fieldtype": "Float",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Recd Quantity",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "received_qty",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 1, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "received_qty", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Recd Quantity", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "received_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 2,
-   "fieldname": "qty",
-   "fieldtype": "Float",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 1,
-   "in_standard_filter": 0,
-   "label": "Accepted Quantity",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "qty",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 2, 
+   "fieldname": "qty", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Accepted Quantity", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "rejected_qty",
-   "fieldtype": "Float",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Rejected Quantity",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "rejected_qty",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "rejected_qty", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Rejected Quantity", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "rejected_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "col_break2",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "col_break2", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "uom",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "UOM",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "uom",
-   "oldfieldtype": "Link",
-   "options": "UOM",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "uom", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "UOM", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "uom", 
+   "oldfieldtype": "Link", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "stock_uom",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Stock UOM",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "stock_uom",
-   "oldfieldtype": "Data",
-   "options": "UOM",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "stock_uom", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Stock UOM", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "stock_uom", 
+   "oldfieldtype": "Data", 
+   "options": "UOM", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "conversion_factor",
-   "fieldtype": "Float",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Conversion Factor",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "conversion_factor",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "conversion_factor", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Conversion Factor", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "conversion_factor", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "rate_and_amount",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Rate and Amount",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "rate_and_amount", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Rate and Amount", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "price_list_rate",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Price List Rate",
-   "length": 0,
-   "no_copy": 0,
-   "options": "currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "price_list_rate", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Price List Rate", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "depends_on": "price_list_rate",
-   "fieldname": "discount_percentage",
-   "fieldtype": "Percent",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Discount on Price List Rate (%)",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "depends_on": "price_list_rate", 
+   "fieldname": "discount_percentage", 
+   "fieldtype": "Percent", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Discount on Price List Rate (%)", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "col_break3",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "col_break3", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "base_price_list_rate",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Price List Rate (Company Currency)",
-   "length": 0,
-   "no_copy": 0,
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "base_price_list_rate", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Price List Rate (Company Currency)", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "sec_break1",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "sec_break1", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 1,
-   "collapsible": 0,
-   "columns": 3,
-   "fieldname": "rate",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 1,
-   "in_standard_filter": 0,
-   "label": "Rate",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "import_rate",
-   "oldfieldtype": "Currency",
-   "options": "currency",
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 1, 
+   "collapsible": 0, 
+   "columns": 3, 
+   "fieldname": "rate", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Rate", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "import_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "amount",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 1,
-   "in_standard_filter": 0,
-   "label": "Amount",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "import_amount",
-   "oldfieldtype": "Currency",
-   "options": "currency",
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "amount", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Amount", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "import_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "currency", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "col_break4",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "col_break4", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "base_rate",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Rate (Company Currency)",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "purchase_rate",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 1,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "base_rate", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Rate (Company Currency)", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "purchase_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "base_amount",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Amount (Company Currency)",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "amount",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "base_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Amount (Company Currency)", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "pricing_rule",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Pricing Rule",
-   "length": 0,
-   "no_copy": 0,
-   "options": "Pricing Rule",
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "pricing_rule", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Pricing Rule", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Pricing Rule", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "section_break_29",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "section_break_29", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "net_rate",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Net Rate",
-   "length": 0,
-   "no_copy": 0,
-   "options": "currency",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "net_rate", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Net Rate", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 2,
-   "fieldname": "net_amount",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 1,
-   "in_standard_filter": 0,
-   "label": "Net Amount",
-   "length": 0,
-   "no_copy": 0,
-   "options": "currency",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 2, 
+   "fieldname": "net_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Net Amount", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "column_break_32",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "column_break_32", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "base_net_rate",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Net Rate (Company Currency)",
-   "length": 0,
-   "no_copy": 0,
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "base_net_rate", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Net Rate (Company Currency)", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "base_net_amount",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Net Amount (Company Currency)",
-   "length": 0,
-   "no_copy": 0,
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "base_net_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Net Amount (Company Currency)", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "warehouse_and_reference",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Warehouse and Reference",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "warehouse_and_reference", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Warehouse and Reference", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 1,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "warehouse",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 1,
-   "in_standard_filter": 0,
-   "label": "Accepted Warehouse",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "warehouse",
-   "oldfieldtype": "Link",
-   "options": "Warehouse",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 1, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Accepted Warehouse", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "rejected_warehouse",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Rejected Warehouse",
-   "length": 0,
-   "no_copy": 1,
-   "oldfieldname": "rejected_warehouse",
-   "oldfieldtype": "Link",
-   "options": "Warehouse",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "rejected_warehouse", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Rejected Warehouse", 
+   "length": 0, 
+   "no_copy": 1, 
+   "oldfieldname": "rejected_warehouse", 
+   "oldfieldtype": "Link", 
+   "options": "Warehouse", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "depends_on": "eval:!doc.__islocal",
-   "fieldname": "quality_inspection",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Quality Inspection",
-   "length": 0,
-   "no_copy": 1,
-   "oldfieldname": "qa_no",
-   "oldfieldtype": "Link",
-   "options": "Quality Inspection",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "depends_on": "eval:!doc.__islocal", 
+   "fieldname": "quality_inspection", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Quality Inspection", 
+   "length": 0, 
+   "no_copy": 1, 
+   "oldfieldname": "qa_no", 
+   "oldfieldtype": "Link", 
+   "options": "Quality Inspection", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "column_break_40",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "column_break_40", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "purchase_order",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Purchase Order",
-   "length": 0,
-   "no_copy": 1,
-   "oldfieldname": "prevdoc_docname",
-   "oldfieldtype": "Link",
-   "options": "Purchase Order",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "150px",
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 1,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "purchase_order", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Purchase Order", 
+   "length": 0, 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_docname", 
+   "oldfieldtype": "Link", 
+   "options": "Purchase Order", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 1, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "150px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "schedule_date",
-   "fieldtype": "Date",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Required By",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "schedule_date",
-   "oldfieldtype": "Date",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "schedule_date", 
+   "fieldtype": "Date", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Required By", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "schedule_date", 
+   "oldfieldtype": "Date", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "stock_qty",
-   "fieldtype": "Float",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Qty as per Stock UOM",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "stock_qty",
-   "oldfieldtype": "Currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "100px",
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "stock_qty", 
+   "fieldtype": "Float", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Qty as per Stock UOM", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "stock_qty", 
+   "oldfieldtype": "Currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "100px", 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "100px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "section_break_45",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "section_break_45", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "serial_no",
-   "fieldtype": "Small Text",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 1,
-   "in_standard_filter": 0,
-   "label": "Serial No",
-   "length": 0,
-   "no_copy": 1,
-   "oldfieldname": "serial_no",
-   "oldfieldtype": "Text",
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "serial_no", 
+   "fieldtype": "Small Text", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Serial No", 
+   "length": 0, 
+   "no_copy": 1, 
+   "oldfieldname": "serial_no", 
+   "oldfieldtype": "Text", 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "batch_no",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 1,
-   "in_standard_filter": 0,
-   "label": "Batch No",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "batch_no",
-   "oldfieldtype": "Link",
-   "options": "Batch",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "batch_no", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Batch No", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "batch_no", 
+   "oldfieldtype": "Link", 
+   "options": "Batch", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "column_break_48",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "",
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "column_break_48", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "rejected_serial_no",
-   "fieldtype": "Small Text",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Rejected Serial No",
-   "length": 0,
-   "no_copy": 1,
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "rejected_serial_no", 
+   "fieldtype": "Small Text", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Rejected Serial No", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "section_break_50",
-   "fieldtype": "Section Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "section_break_50", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "project",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Project",
-   "length": 0,
-   "no_copy": 0,
-   "options": "Project",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "project", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Project", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Project", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "default": ":Company",
-   "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)",
-   "fieldname": "cost_center",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Cost Center",
-   "length": 0,
-   "no_copy": 0,
-   "options": "Cost Center",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "default": ":Company", 
+   "depends_on": "", 
+   "fieldname": "cost_center", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Cost Center", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Cost Center", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "purchase_order_item",
-   "fieldtype": "Data",
-   "hidden": 1,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Purchase Order Item",
-   "length": 0,
-   "no_copy": 1,
-   "oldfieldname": "prevdoc_detail_docname",
-   "oldfieldtype": "Data",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "150px",
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 1,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "purchase_order_item", 
+   "fieldtype": "Data", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Purchase Order Item", 
+   "length": 0, 
+   "no_copy": 1, 
+   "oldfieldname": "prevdoc_detail_docname", 
+   "oldfieldtype": "Data", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 1, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "150px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "col_break5",
-   "fieldtype": "Column Break",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "length": 0,
-   "no_copy": 0,
-   "permlevel": 0,
-   "print_hide": 0,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "col_break5", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "allow_zero_valuation_rate",
-   "fieldtype": "Check",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Allow Zero Valuation Rate",
-   "length": 0,
-   "no_copy": 1,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "allow_zero_valuation_rate", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Allow Zero Valuation Rate", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "bom",
-   "fieldtype": "Link",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "BOM",
-   "length": 0,
-   "no_copy": 1,
-   "options": "BOM",
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "bom", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "BOM", 
+   "length": 0, 
+   "no_copy": 1, 
+   "options": "BOM", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "billed_amt",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Billed Amt",
-   "length": 0,
-   "no_copy": 1,
-   "permlevel": 0,
-   "precision": "",
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "billed_amt", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Billed Amt", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 1,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "landed_cost_voucher_amount",
-   "fieldtype": "Currency",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Landed Cost Voucher Amount",
-   "length": 0,
-   "no_copy": 1,
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 1, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "landed_cost_voucher_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Landed Cost Voucher Amount", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "brand",
-   "fieldtype": "Link",
-   "hidden": 1,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Brand",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "brand",
-   "oldfieldtype": "Link",
-   "options": "Brand",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "brand", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Brand", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "brand", 
+   "oldfieldtype": "Link", 
+   "options": "Brand", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "description": "",
-   "fieldname": "item_group",
-   "fieldtype": "Link",
-   "hidden": 1,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Item Group",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "item_group",
-   "oldfieldtype": "Link",
-   "options": "Item Group",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "description": "", 
+   "fieldname": "item_group", 
+   "fieldtype": "Link", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Item Group", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "item_group", 
+   "oldfieldtype": "Link", 
+   "options": "Item Group", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "rm_supp_cost",
-   "fieldtype": "Currency",
-   "hidden": 1,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Raw Materials Supplied Cost",
-   "length": 0,
-   "no_copy": 1,
-   "oldfieldname": "rm_supp_cost",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "150px",
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "rm_supp_cost", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Raw Materials Supplied Cost", 
+   "length": 0, 
+   "no_copy": 1, 
+   "oldfieldname": "rm_supp_cost", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "150px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "item_tax_amount",
-   "fieldtype": "Currency",
-   "hidden": 1,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Item Tax Amount",
-   "length": 0,
-   "no_copy": 1,
-   "oldfieldname": "item_tax_amount",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "150px",
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "item_tax_amount", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Item Tax Amount", 
+   "length": 0, 
+   "no_copy": 1, 
+   "oldfieldname": "item_tax_amount", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "150px", 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "150px"
-  },
+  }, 
   {
-   "allow_on_submit": 1,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "valuation_rate",
-   "fieldtype": "Currency",
-   "hidden": 1,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Valuation Rate",
-   "length": 0,
-   "no_copy": 1,
-   "oldfieldname": "valuation_rate",
-   "oldfieldtype": "Currency",
-   "options": "Company:company:default_currency",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "print_width": "80px",
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
-   "unique": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 1, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "valuation_rate", 
+   "fieldtype": "Currency", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Valuation Rate", 
+   "length": 0, 
+   "no_copy": 1, 
+   "oldfieldname": "valuation_rate", 
+   "oldfieldtype": "Currency", 
+   "options": "Company:company:default_currency", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "print_width": "80px", 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0, 
    "width": "80px"
-  },
+  }, 
   {
-   "allow_on_submit": 0,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges",
-   "fieldname": "item_tax_rate",
-   "fieldtype": "Code",
-   "hidden": 1,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Item Tax Rate",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "item_tax_rate",
-   "oldfieldtype": "Small Text",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 1,
-   "remember_last_selected_value": 0,
-   "report_hide": 1,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "description": "Tax detail table fetched from item master as a string and stored in this field.\nUsed for Taxes and Charges", 
+   "fieldname": "item_tax_rate", 
+   "fieldtype": "Code", 
+   "hidden": 1, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Item Tax Rate", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "item_tax_rate", 
+   "oldfieldtype": "Small Text", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 1, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 1, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
-  },
+  }, 
   {
-   "allow_on_submit": 1,
-   "bold": 0,
-   "collapsible": 0,
-   "columns": 0,
-   "fieldname": "page_break",
-   "fieldtype": "Check",
-   "hidden": 0,
-   "ignore_user_permissions": 0,
-   "ignore_xss_filter": 0,
-   "in_filter": 0,
-   "in_global_search": 0,
-   "in_list_view": 0,
-   "in_standard_filter": 0,
-   "label": "Page Break",
-   "length": 0,
-   "no_copy": 0,
-   "oldfieldname": "page_break",
-   "oldfieldtype": "Check",
-   "permlevel": 0,
-   "print_hide": 1,
-   "print_hide_if_no_value": 0,
-   "read_only": 0,
-   "remember_last_selected_value": 0,
-   "report_hide": 0,
-   "reqd": 0,
-   "search_index": 0,
-   "set_only_once": 0,
+   "allow_bulk_edit": 0, 
+   "allow_on_submit": 1, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "page_break", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_global_search": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Page Break", 
+   "length": 0, 
+   "no_copy": 0, 
+   "oldfieldname": "page_break", 
+   "oldfieldtype": "Check", 
+   "permlevel": 0, 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
    "unique": 0
   }
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 1,
- "max_attachments": 0,
- "modified": "2017-04-19 11:54:00.260886",
- "modified_by": "Administrator",
- "module": "Stock",
- "name": "Purchase Receipt Item",
- "owner": "Administrator",
- "permissions": [],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "track_changes": 0,
+ ], 
+ "has_web_view": 0, 
+ "hide_heading": 0, 
+ "hide_toolbar": 0, 
+ "idx": 1, 
+ "image_view": 0, 
+ "in_create": 0, 
+ "is_submittable": 0, 
+ "issingle": 0, 
+ "istable": 1, 
+ "max_attachments": 0, 
+ "modified": "2017-06-16 17:23:01.404744", 
+ "modified_by": "Administrator", 
+ "module": "Stock", 
+ "name": "Purchase Receipt Item", 
+ "owner": "Administrator", 
+ "permissions": [], 
+ "quick_entry": 1, 
+ "read_only": 0, 
+ "read_only_onload": 0, 
+ "show_name_in_global_search": 0, 
+ "sort_field": "modified", 
+ "sort_order": "DESC", 
+ "track_changes": 0, 
  "track_seen": 0
-}
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 6303df1..74ac589 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -67,6 +67,10 @@
 				});
 			});
 		}
+
+		if(frm.doc.company) {
+			frm.trigger("toggle_display_account_head");
+		}
 	},
 	purpose: function(frm) {
 		frm.fields_dict.items.grid.refresh();
@@ -78,6 +82,7 @@
 			if(company_doc.default_letter_head) {
 				frm.set_value("letter_head", company_doc.default_letter_head);
 			}
+			frm.trigger("toggle_display_account_head");
 		}
 	},
 	set_serial_no: function(frm, cdt, cdn) {
@@ -98,6 +103,10 @@
 			}
 		});
 	},
+	toggle_display_account_head: function(frm) {
+		var enabled = erpnext.is_perpetual_inventory_enabled(frm.doc.company);
+		frm.fields_dict["items"].grid.set_column_disp(["cost_center", "expense_account"], enabled);
+	}
 })
 
 frappe.ui.form.on('Stock Entry Detail', {
@@ -213,17 +222,19 @@
 			};
 		});
 
-		if(cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
+		if(me.frm.doc.company && erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) {
 			this.frm.add_fetch("company", "stock_adjustment_account", "expense_account");
-			this.frm.fields_dict.items.grid.get_field('expense_account').get_query =
-				function() {
-					return {
-						filters: {
-							"company": me.frm.doc.company,
-							"is_group": 0
-						}
+		}
+
+		this.frm.fields_dict.items.grid.get_field('expense_account').get_query = function() {
+			if (erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) {
+				return {
+					filters: {
+						"company": me.frm.doc.company,
+						"is_group": 0
 					}
 				}
+			}
 		}
 
 		this.frm.set_indicator_formatter('item_code',
@@ -254,7 +265,7 @@
 		this.toggle_related_fields(this.frm.doc);
 		this.toggle_enable_bom();
 		this.show_stock_ledger();
-		if (cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
+		if (this.frm.doc.docstatus===1 && erpnext.is_perpetual_inventory_enabled(this.frm.doc.company)) {
 			this.show_general_ledger();
 		}
 		erpnext.hide_company();
@@ -272,7 +283,7 @@
 	set_default_account: function(callback) {
 		var me = this;
 
-		if(cint(frappe.defaults.get_default("auto_accounting_for_stock")) && this.frm.doc.company) {
+		if(this.frm.doc.company && erpnext.is_perpetual_inventory_enabled(this.frm.doc.company)) {
 			return this.frm.call({
 				method: "erpnext.accounts.utils.get_company_default",
 				args: {
diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
index 2451a9b..8670f73 100644
--- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py
@@ -123,7 +123,8 @@
 		self.assertTrue(item_code in items)
 
 	def test_material_receipt_gl_entry(self):
-		set_perpetual_inventory()
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(1, company)
 
 		mr = make_stock_entry(item_code="_Test Item", target="_Test Warehouse - _TC",
 			qty=50, basic_rate=100, expense_account="Stock Adjustment - _TC")
@@ -148,7 +149,8 @@
 			where voucher_type='Stock Entry' and voucher_no=%s""", mr.name))
 
 	def test_material_issue_gl_entry(self):
-		set_perpetual_inventory()
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(1, company)
 
 		make_stock_entry(item_code="_Test Item", target="_Test Warehouse - _TC",
 			qty=50, basic_rate=100, expense_account="Stock Adjustment - _TC")
@@ -179,7 +181,8 @@
 			where voucher_type='Stock Entry' and voucher_no=%s""", mi.name))
 
 	def test_material_transfer_gl_entry(self):
-		set_perpetual_inventory()
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(1, company)
 
 		create_stock_reconciliation(qty=100, rate=100)
 
@@ -217,7 +220,8 @@
 			where voucher_type='Stock Entry' and voucher_no=%s""", mtn.name))
 
 	def test_repack_no_change_in_valuation(self):
-		set_perpetual_inventory(0)
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(0, company)
 
 		make_stock_entry(item_code="_Test Item", target="_Test Warehouse - _TC", qty=50, basic_rate=100)
 		make_stock_entry(item_code="_Test Item Home Desktop 100", target="_Test Warehouse - _TC",
@@ -238,10 +242,11 @@
 			order by account desc""", repack.name, as_dict=1)
 		self.assertFalse(gl_entries)
 
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, repack.company)
 
 	def test_repack_with_additional_costs(self):
-		set_perpetual_inventory()
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse - _TC', 'company')
+		set_perpetual_inventory(1, company)
 
 		make_stock_entry(item_code="_Test Item", target="_Test Warehouse - _TC", qty=50, basic_rate=100)
 		repack = frappe.copy_doc(test_records[3])
@@ -278,7 +283,7 @@
 				["Expenses Included In Valuation - _TC", 0.0, 1200.0]
 			])
 		)
-		set_perpetual_inventory(0)
+		set_perpetual_inventory(0, repack.company)
 
 	def check_stock_ledger_entries(self, voucher_type, voucher_no, expected_sle):
 		expected_sle.sort(key=lambda x: x[0])
@@ -452,7 +457,8 @@
 		self.assertFalse(frappe.db.get_value("Serial No", serial_no, "warehouse"))
 
 	def test_warehouse_company_validation(self):
-		set_perpetual_inventory(0)
+		company = frappe.db.get_value('Warehouse', '_Test Warehouse 2 - _TC1', 'company')
+		set_perpetual_inventory(0, company)
 		frappe.get_doc("User", "test2@example.com")\
 			.add_roles("Sales User", "Sales Manager", "Stock User", "Stock Manager")
 		frappe.set_user("test2@example.com")
@@ -465,8 +471,6 @@
 
 	# permission tests
 	def test_warehouse_user(self):
-		set_perpetual_inventory(0)
-
 		for role in ("Stock User", "Sales User"):
 			set_user_permission_doctypes(doctype="Stock Entry", role=role,
 				apply_user_permissions=1, user_permission_doctypes=["Warehouse"])
@@ -483,6 +487,7 @@
 		frappe.set_user("test@example.com")
 		st1 = frappe.copy_doc(test_records[0])
 		st1.company = "_Test Company 1"
+		set_perpetual_inventory(0, st1.company)
 		st1.get("items")[0].t_warehouse="_Test Warehouse 2 - _TC1"
 		self.assertRaises(frappe.PermissionError, st1.insert)
 
@@ -490,6 +495,8 @@
 		st1 = frappe.copy_doc(test_records[0])
 		st1.company = "_Test Company 1"
 		st1.get("items")[0].t_warehouse="_Test Warehouse 2 - _TC1"
+		st1.get("items")[0].expense_account = "Stock Adjustment - _TC1"
+		st1.get("items")[0].cost_center = "Main - _TC1"
 		st1.insert()
 		st1.submit()
 
diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
index 58bcff0..b2c6091 100644
--- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
+++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
@@ -960,7 +960,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "depends_on": "eval:cint(frappe.sys_defaults.auto_accounting_for_stock)", 
+   "depends_on": "", 
    "fieldname": "expense_account", 
    "fieldtype": "Link", 
    "hidden": 0, 
@@ -1020,7 +1020,7 @@
    "collapsible": 0, 
    "columns": 0, 
    "default": ":Company", 
-   "depends_on": "eval:cint(frappe.sys_defaults.auto_accounting_for_stock)", 
+   "depends_on": "", 
    "fieldname": "cost_center", 
    "fieldtype": "Link", 
    "hidden": 0, 
@@ -1266,8 +1266,8 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2017-06-08 10:38:10.914780", 
- "modified_by": "prateeksha@erpnext.com", 
+ "modified": "2017-06-16 17:32:56.989049", 
+ "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Stock Entry Detail", 
  "owner": "Administrator", 
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index a6d5383..a86dea7 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -31,6 +31,10 @@
 				frm.events.get_items(frm);
 			});
 		}
+
+		if(frm.doc.company) {
+			frm.trigger("toggle_display_account_head");
+		}
 	},
 
 	get_items: function(frm) {
@@ -103,6 +107,13 @@
 			frappe.model.set_value(cdt, cdn, "quantity_difference", flt(d.qty) - flt(d.current_qty));
 			frappe.model.set_value(cdt, cdn, "amount_difference", flt(d.amount) - flt(d.current_amount));
 		}
+	},
+	company: function(frm) {
+		frm.trigger("toggle_display_account_head");
+	},
+	toggle_display_account_head: function(frm) {
+		frm.toggle_display(['expense_account', 'cost_center'],
+			erpnext.is_perpetual_inventory_enabled(frm.doc.company));
 	}
 });
 
@@ -133,7 +144,7 @@
 	set_default_expense_account: function() {
 		var me = this;
 		if(this.frm.doc.company) {
-			if (frappe.sys_defaults.auto_accounting_for_stock && !this.frm.doc.expense_account) {
+			if (erpnext.is_perpetual_inventory_enabled(this.frm.doc.company) && !this.frm.doc.expense_account) {
 				return this.frm.call({
 					method: "erpnext.accounts.utils.get_company_default",
 					args: {
@@ -155,11 +166,12 @@
 
 		this.setup_posting_date_time_check();
 
-		if (frappe.sys_defaults.auto_accounting_for_stock) {
+		if (me.frm.doc.company && erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) {
 			this.frm.add_fetch("company", "stock_adjustment_account", "expense_account");
 			this.frm.add_fetch("company", "cost_center", "cost_center");
-
-			this.frm.fields_dict["expense_account"].get_query = function() {
+		}
+		this.frm.fields_dict["expense_account"].get_query = function() {
+			if(erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) {
 				return {
 					"filters": {
 						'company': me.frm.doc.company,
@@ -167,7 +179,9 @@
 					}
 				}
 			}
-			this.frm.fields_dict["cost_center"].get_query = function() {
+		}
+		this.frm.fields_dict["cost_center"].get_query = function() {
+			if(erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) {
 				return {
 					"filters": {
 						'company': me.frm.doc.company,
@@ -181,7 +195,7 @@
 	refresh: function() {
 		if(this.frm.doc.docstatus==1) {
 			this.show_stock_ledger();
-			if (cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
+			if (erpnext.is_perpetual_inventory_enabled(this.frm.doc.company)) {
 				this.show_general_ledger();
 			}
 		}
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
index 3d37053..9df4ff7 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
@@ -320,7 +320,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
+   "depends_on": "", 
    "fieldname": "expense_account", 
    "fieldtype": "Link", 
    "hidden": 0, 
@@ -351,7 +351,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "depends_on": "eval:cint(sys_defaults.auto_accounting_for_stock)", 
+   "depends_on": "", 
    "fieldname": "cost_center", 
    "fieldtype": "Link", 
    "hidden": 0, 
@@ -477,7 +477,7 @@
  "istable": 0, 
  "max_attachments": 1, 
  "menu_index": 0, 
- "modified": "2017-06-13 14:28:56.013804", 
+ "modified": "2017-06-16 17:35:54.811500", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Stock Reconciliation", 
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
index d710949..9c42529 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -2,7 +2,7 @@
 # License: GNU General Public License v3. See license.txt
 
 from __future__ import unicode_literals
-import frappe
+import frappe, erpnext
 import frappe.defaults
 from frappe import msgprint, _
 from frappe.utils import cstr, flt, cint
@@ -231,7 +231,7 @@
 			self.expense_account, self.cost_center)
 
 	def validate_expense_account(self):
-		if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
+		if not cint(erpnext.is_perpetual_inventory_enabled(self.company)):
 			return
 
 		if not self.expense_account:
diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py
index d5f64b1..711f064 100644
--- a/erpnext/stock/stock_ledger.py
+++ b/erpnext/stock/stock_ledger.py
@@ -423,8 +423,11 @@
 		}, previous_sle, as_dict=1, debug=debug)
 
 def get_valuation_rate(item_code, warehouse, voucher_type, voucher_no,
-	allow_zero_rate=False, currency=None):
+	allow_zero_rate=False, currency=None, company=None):
 	# Get valuation rate from last sle for the same item and warehouse
+	if not company:
+		company = erpnext.get_default_company()
+
 	last_valuation_rate = frappe.db.sql("""select valuation_rate
 		from `tabStock Ledger Entry`
 		where item_code = %s and warehouse = %s
@@ -451,7 +454,7 @@
 			dict(item_code=item_code, buying=1, currency=currency), 'price_list_rate')
 
 	if not allow_zero_rate and not valuation_rate \
-			and cint(frappe.db.get_value("Accounts Settings", None, "auto_accounting_for_stock")):
+			and cint(erpnext.is_perpetual_inventory_enabled(company)):
 		frappe.local.message_log = []
 		frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a sample item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submiting/cancelling this entry").format(item_code, voucher_type, voucher_no))