fixed conflict
diff --git a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
index d243717..febc0ee 100755
--- a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
+++ b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
@@ -16,8 +16,8 @@
 
 report.customize_filters = function() {
   this.hide_all_filters();
-  filter_list = ['From Voucher Date', 'To Voucher Date', 'Debit To', 'From Posting Date', 'To Posting Date']
-  for(var i=0;i<filter_list.length;i++)
+  filter_list = ['Debit To', 'From Posting Date', 'To Posting Date']
+  for(var i=0;i<filter_list.length;i++) 
     this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +filter_list[i]].df.filter_hide = 0;
 
   this.filter_fields_dict['RV Detail'+FILTER_SEP +'Item'].df.filter_hide = 0;
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index 89094e9..9afb710 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -368,11 +368,9 @@
 
 			tmp[rate_fld] = flt( flt(cl[i].purchase_ref_rate) - flt(flt(cl[i].purchase_ref_rate)*flt(cl[i].discount_rate)/100) )
 		set_multiple(tname, cl[i].name, tmp, fname);
-		msgprint(cl[i][rate_fld])
 		set_multiple(tname, cl[i].name, {'import_rate': flt(flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname); 
 		set_multiple(tname, cl[i].name, {'amount':flt(flt(cl[i].qty) * flt(cl[i][rate_fld]))}, fname);
 		set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) *	flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname); 
-		msgprint(cl[i]['amount'])
 	}else if( n==5){	
 		tmp[rate_fld] = flt( flt(cl[i].import_ref_rate) - flt(flt(cl[i].import_ref_rate)*flt(cl[i].discount_rate)/100) ) * flt(doc.conversion_rate);
 		set_multiple(tname, cl[i].name, {'purchase_ref_rate': flt(flt(cl[i].import_ref_rate) * flt(doc.conversion_rate))}, fname);
diff --git a/erpnext/production/doctype/bill_of_materials/bill_of_materials.js b/erpnext/production/doctype/bill_of_materials/bill_of_materials.js
index ae61147..c49a9bc 100644
--- a/erpnext/production/doctype/bill_of_materials/bill_of_materials.js
+++ b/erpnext/production/doctype/bill_of_materials/bill_of_materials.js
@@ -157,3 +157,8 @@
 	return 'SELECT DISTINCT `tabBill Of Materials`.`name`, `tabBill Of Materials`.`remarks` FROM `tabBill Of Materials` WHERE `tabBill Of Materials`.`item` = "' + d.item_code + '" AND `tabBill Of Materials`.`is_active` = "Yes" AND `tabBill Of Materials`.docstatus = 1 AND `tabBill Of Materials`.`name` like "%s" ORDER BY `tabBill Of Materials`.`name` LIMIT 50';
 }
 
+cur_frm.cscript.validate = function(doc, dt, dn) {
+	calculate_op_cost(doc, dt, dn);
+	calculate_rm_cost(doc, dt, dn);
+	calculate_total(doc);
+}
\ No newline at end of file
diff --git a/erpnext/production/doctype/production_planning_tool/production_planning_tool.py b/erpnext/production/doctype/production_planning_tool/production_planning_tool.py
index 4e4832f..272d13f 100644
--- a/erpnext/production/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/production/doctype/production_planning_tool/production_planning_tool.py
@@ -242,14 +242,21 @@
 
 	def make_items_dict(self, item_list):
 		for i in item_list:
-			self.item_dict[i[0]] = [(flt(self.item_dict.get(i[1], 0)) + flt(i[1])), i[2], i[3]]
+			self.item_dict[i[0]] = [(flt(self.item_dict.get(i[0], [0])[0]) + flt(i[1])), i[2], i[3]]
 
 
 	def get_csv(self):
-		item_list = [['Item Code', 'Description', 'Stock UOM', 'Required Qty', 'Indented Qty', 'Ordered Qty', 'Actual Qty']]
+		item_list = [['Item Code', 'Description', 'Stock UOM', 'Required Qty', 'Warehouse', 'Indented Qty', 'Ordered Qty', 'Actual Qty']]
 		for d in self.item_dict:
-			item_qty= sql("select sum(indented_qty), sum(ordered_qty), sum(actual_qty) from `tabBin` where item_code = %s", d)
-			item_list.append([d, self.item_dict[d][1], self.item_dict[d][2], self.item_dict[d][0], flt(item_qty[0][0]), flt(item_qty[0][1]), flt(item_qty[0][2])])
+			item_list.append([d, self.item_dict[d][1], self.item_dict[d][2], self.item_dict[d][0]]),
+			item_qty= sql("select warehouse, indented_qty, ordered_qty, actual_qty from `tabBin` where item_code = %s", d)
+			i_qty, o_qty, a_qty = 0,0,0
+			for w in item_qty:
+				i_qty, o_qty, a_qty = i_qty + flt(w[1]), o_qty + flt(w[2]), a_qty + flt(w[3])
+				item_list.append(['', '', '', '', w[0], flt(w[1]), flt(w[2]), flt(w[3])])
+			if item_qty:
+				item_list.append(['', '', '', '', 'Total', i_qty, o_qty, a_qty])
+
 		return item_list
 		
 
diff --git a/erpnext/projects/page/projects/projects.js b/erpnext/projects/page/projects/projects.js
index 3778a34..1ffbe5a 100644
--- a/erpnext/projects/page/projects/projects.js
+++ b/erpnext/projects/page/projects/projects.js
@@ -74,7 +74,7 @@
 	var w = this.make_filter(label,idx);
 	var i = $a(w, 'input');
 
-	var user_fmt = wn.control_panel.date_format;
+	var user_fmt = wn.boot.sysdefaults.date_format;
 	if(!this.user_fmt)this.user_fmt = 'dd-mm-yy';
 
 	$(i).datepicker({
diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js
index b257d6d..a4a6fe6 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.js
+++ b/erpnext/selling/doctype/sales_common/sales_common.js
@@ -140,6 +140,7 @@
 //------------------------------------------------------------------
 
 cur_frm.cscript.dynamic_label = function(doc, cdt, cdn, base_curr, callback) {
+	cur_frm.cscript.base_currency = base_curr;
 	set_dynamic_label_par(doc, cdt, cdn, base_curr);
 	set_dynamic_label_child(doc, cdt, cdn, base_curr);
 
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 3e0d783..a2aaf8f 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -186,7 +186,7 @@
 	if(doc.order_type) cond = ' ifnull(`tabQuotation`.order_type, "") = "'+doc.order_type+'" and';
 	if(doc.customer) cond += ' ifnull(`tabQuotation`.customer, "") = "'+doc.customer+'" and';
 	
-	return repl('SELECT DISTINCT name, customer, transaction_date	FROM `tabQuotation` WHERE `tabQuotation`.company = "' + doc.company + '" and `tabQuotation`.`docstatus` = 1 and `tabQuotation`.status != "Order Lost" and %(cond)s `tabQuotation`.%(key)s LIKE "%s" ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond});
+	return repl('SELECT DISTINCT name, customer, transaction_date FROM `tabQuotation` WHERE `tabQuotation`.company = "' + doc.company + '" and `tabQuotation`.`docstatus` = 1 and `tabQuotation`.status != "Order Lost" and %(cond)s `tabQuotation`.%(key)s LIKE "%s" ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond});
 }
 
 
diff --git a/erpnext/setup/doctype/manage_account/manage_account.py b/erpnext/setup/doctype/manage_account/manage_account.py
index 15700e8..7f9294b 100644
--- a/erpnext/setup/doctype/manage_account/manage_account.py
+++ b/erpnext/setup/doctype/manage_account/manage_account.py
@@ -34,7 +34,8 @@
     'valuation_method': 'default_valuation_method',
 	'date_format': 'date_format',
 	'currency_format':'default_currency_format',
-	'account_url':'account_url'
+	'account_url':'account_url',
+	'allow_negative_stock' : 'allow_negative_stock'
 }
 
 class DocType:
@@ -66,4 +67,4 @@
 				get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d'))
 		
 	def get_defaults(self):
-		return webnotes.conn.get_defaults()
\ No newline at end of file
+		return webnotes.conn.get_defaults()
diff --git a/erpnext/setup/doctype/manage_account/manage_account.txt b/erpnext/setup/doctype/manage_account/manage_account.txt
index 4077afe..db1759c 100644
--- a/erpnext/setup/doctype/manage_account/manage_account.txt
+++ b/erpnext/setup/doctype/manage_account/manage_account.txt
@@ -3,58 +3,58 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2010-08-08 17:09:09',
+		'creation': '2010-09-20 11:59:26',
 		'docstatus': 0,
-		'modified': '2012-01-20 11:25:18',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
+		'modified': '2012-04-18 12:48:57',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
 	},
 
 	# These values are common for all DocType
 	{
-		'_last_update': '1323855502',
+		'_last_update': u'1323855502',
 		'allow_copy': 1,
 		'allow_email': 1,
 		'allow_print': 1,
-		'colour': 'White:FFF',
-		'default_print_format': 'Standard',
+		'colour': u'White:FFF',
+		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'hide_toolbar': 0,
 		'in_create': 1,
 		'issingle': 1,
-		'module': 'Setup',
+		'module': u'Setup',
 		'name': '__common__',
 		'read_only': 1,
-		'section_style': 'Tabbed',
-		'server_code_error': ' ',
+		'section_style': u'Tabbed',
+		'server_code_error': u' ',
 		'show_in_menu': 1,
-		'version': 517
+		'version': 518
 	},
 
 	# These values are common for all DocField
 	{
-		'doctype': 'DocField',
+		'doctype': u'DocField',
 		'name': '__common__',
-		'parent': 'Manage Account',
-		'parentfield': 'fields',
-		'parenttype': 'DocType',
+		'parent': u'Manage Account',
+		'parentfield': u'fields',
+		'parenttype': u'DocType',
 		'permlevel': 0
 	},
 
 	# These values are common for all DocPerm
 	{
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'name': '__common__',
-		'parent': 'Manage Account',
-		'parentfield': 'permissions',
-		'parenttype': 'DocType',
+		'parent': u'Manage Account',
+		'parentfield': u'permissions',
+		'parenttype': u'DocType',
 		'read': 1
 	},
 
 	# DocType, Manage Account
 	{
 		'doctype': 'DocType',
-		'name': 'Manage Account'
+		'name': u'Manage Account'
 	},
 
 	# DocPerm
@@ -62,9 +62,9 @@
 		'amend': 0,
 		'cancel': 0,
 		'create': 1,
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 0,
-		'role': 'System Manager',
+		'role': u'System Manager',
 		'submit': 0,
 		'write': 1
 	},
@@ -72,464 +72,474 @@
 	# DocPerm
 	{
 		'create': 1,
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 0,
-		'role': 'System Manager',
+		'role': u'System Manager',
 		'write': 1
 	},
 
 	# DocPerm
 	{
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 1,
-		'role': 'System Manager',
+		'role': u'All'
+	},
+
+	# DocPerm
+	{
+		'doctype': u'DocPerm',
+		'permlevel': 1,
+		'role': u'System Manager',
 		'write': 1
 	},
 
 	# DocPerm
 	{
-		'doctype': 'DocPerm',
-		'permlevel': 1,
-		'role': 'All'
-	},
-
-	# DocPerm
-	{
-		'doctype': 'DocPerm',
+		'doctype': u'DocPerm',
 		'permlevel': 2,
-		'role': 'System Manager',
+		'role': u'System Manager',
 		'write': 1
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'label': 'System'
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'System'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'description': 'Example: http://frappe.erpnext.com',
-		'doctype': 'DocField',
-		'fieldname': 'account_url',
-		'fieldtype': 'Data',
-		'label': 'Account URL'
+		'colour': u'White:FFF',
+		'description': u'Example: http://frappe.erpnext.com',
+		'doctype': u'DocField',
+		'fieldname': u'account_url',
+		'fieldtype': u'Data',
+		'label': u'Account URL'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Column Break'
+		'doctype': u'DocField',
+		'fieldtype': u'Column Break'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'sms_sender_name',
-		'fieldtype': 'Data',
-		'label': 'SMS Sender Name'
+		'doctype': u'DocField',
+		'fieldname': u'sms_sender_name',
+		'fieldtype': u'Data',
+		'label': u'SMS Sender Name'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'label': 'Company'
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'Company'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_company',
-		'fieldtype': 'Link',
-		'label': 'Default Company',
-		'options': 'Company',
+		'doctype': u'DocField',
+		'fieldname': u'default_company',
+		'fieldtype': u'Link',
+		'label': u'Default Company',
+		'options': u'Company',
 		'reqd': 0
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'current_fiscal_year',
-		'fieldtype': 'Link',
-		'label': 'Current Fiscal Year',
-		'options': 'Fiscal Year',
+		'doctype': u'DocField',
+		'fieldname': u'current_fiscal_year',
+		'fieldtype': u'Link',
+		'label': u'Current Fiscal Year',
+		'options': u'Fiscal Year',
 		'reqd': 1
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'date_format',
-		'fieldtype': 'Select',
-		'label': 'Date Format',
-		'options': 'yyyy-mm-dd\ndd-mm-yyyy\ndd/mm/yyyy\nmm/dd/yyyy\nmm-dd-yyyy'
+		'doctype': u'DocField',
+		'fieldname': u'date_format',
+		'fieldtype': u'Select',
+		'label': u'Date Format',
+		'options': u'yyyy-mm-dd\ndd-mm-yyyy\ndd/mm/yyyy\nmm/dd/yyyy\nmm-dd-yyyy'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Column Break',
-		'width': '50%'
+		'doctype': u'DocField',
+		'fieldtype': u'Column Break',
+		'width': u'50%'
 	},
 
 	# DocField
 	{
-		'default': 'INR',
-		'doctype': 'DocField',
-		'fieldname': 'default_currency',
-		'fieldtype': 'Select',
-		'label': 'Default Currency',
-		'options': 'link:Currency',
+		'default': u'INR',
+		'doctype': u'DocField',
+		'fieldname': u'default_currency',
+		'fieldtype': u'Select',
+		'label': u'Default Currency',
+		'options': u'link:Currency',
 		'reqd': 1
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_currency_format',
-		'fieldtype': 'Select',
-		'label': 'Default Currency Format',
-		'options': 'Lacs\nMillions'
+		'doctype': u'DocField',
+		'fieldname': u'default_currency_format',
+		'fieldtype': u'Select',
+		'label': u'Default Currency Format',
+		'options': u'Lacs\nMillions'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_currency_fraction',
-		'fieldtype': 'Data',
-		'label': 'Default Currency Fraction'
+		'doctype': u'DocField',
+		'fieldname': u'default_currency_fraction',
+		'fieldtype': u'Data',
+		'label': u'Default Currency Fraction'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'label': 'Stock'
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'Stock'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Column Break',
-		'width': '50%'
+		'doctype': u'DocField',
+		'fieldtype': u'Column Break',
+		'width': u'50%'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_item_group',
-		'fieldtype': 'Link',
-		'label': 'Default Item Group',
-		'options': 'Item Group'
+		'doctype': u'DocField',
+		'fieldname': u'default_item_group',
+		'fieldtype': u'Link',
+		'label': u'Default Item Group',
+		'options': u'Item Group'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'HTML',
-		'label': 'IGHelp',
-		'options': '<a href="#!Sales Browser/Item Group">To manage Item Groups, click here</a>'
+		'doctype': u'DocField',
+		'fieldtype': u'HTML',
+		'label': u'IGHelp',
+		'options': u'<a href="#!Sales Browser/Item Group">To manage Item Groups, click here</a>'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_stock_uom',
-		'fieldtype': 'Link',
-		'label': 'Default Stock UOM',
-		'options': 'UOM'
+		'doctype': u'DocField',
+		'fieldname': u'default_stock_uom',
+		'fieldtype': u'Link',
+		'label': u'Default Stock UOM',
+		'options': u'UOM'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_valuation_method',
-		'fieldtype': 'Select',
-		'label': 'Default Valuation Method',
-		'options': 'FIFO\nMoving Average'
+		'doctype': u'DocField',
+		'fieldname': u'default_valuation_method',
+		'fieldtype': u'Select',
+		'label': u'Default Valuation Method',
+		'options': u'FIFO\nMoving Average'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_warehouse_type',
-		'fieldtype': 'Link',
-		'label': 'Default Warehouse Type',
-		'options': 'Warehouse Type'
+		'colour': u'White:FFF',
+		'description': u'Applicable only if valuation method is moving average',
+		'doctype': u'DocField',
+		'fieldname': u'allow_negative_stock',
+		'fieldtype': u'Check',
+		'label': u'Allow Negative Stock'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'auto_indent',
-		'fieldtype': 'Check',
-		'label': 'Raise Indent when stock reaches re-order level'
+		'doctype': u'DocField',
+		'fieldname': u'default_warehouse_type',
+		'fieldtype': u'Link',
+		'label': u'Default Warehouse Type',
+		'options': u'Warehouse Type'
 	},
 
 	# DocField
 	{
-		'default': '1',
-		'doctype': 'DocField',
-		'fieldtype': 'Column Break',
-		'width': '50%'
+		'doctype': u'DocField',
+		'fieldname': u'auto_indent',
+		'fieldtype': u'Check',
+		'label': u'Raise Indent when stock reaches re-order level'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'description': 'Percentage you are allowed to receive or deliver more against the quantity ordered. <p>For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units</p>',
-		'doctype': 'DocField',
-		'fieldname': 'tolerance',
-		'fieldtype': 'Currency',
-		'label': 'Allowance Percent'
+		'default': u'1',
+		'doctype': u'DocField',
+		'fieldtype': u'Column Break',
+		'width': u'50%'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'description': 'Stock level frozen up to this date, nobody can do / modify entry except authorized person',
-		'doctype': 'DocField',
-		'fieldname': 'stock_frozen_upto',
-		'fieldtype': 'Date',
-		'label': 'Stock Frozen Upto'
+		'colour': u'White:FFF',
+		'description': u'Percentage you are allowed to receive or deliver more against the quantity ordered. <p>For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units</p>',
+		'doctype': u'DocField',
+		'fieldname': u'tolerance',
+		'fieldtype': u'Currency',
+		'label': u'Allowance Percent'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'description': 'Users with this role are allowed to do / modify stock entry before frozen date',
-		'doctype': 'DocField',
-		'fieldname': 'stock_auth_role',
-		'fieldtype': 'Link',
-		'label': 'Authorized Role (Frozen Entry)',
-		'options': 'Role'
+		'colour': u'White:FFF',
+		'description': u'Stock level frozen up to this date, nobody can do / modify entry except authorized person',
+		'doctype': u'DocField',
+		'fieldname': u'stock_frozen_upto',
+		'fieldtype': u'Date',
+		'label': u'Stock Frozen Upto'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'label': 'Accounts'
+		'colour': u'White:FFF',
+		'description': u'Users with this role are allowed to do / modify stock entry before frozen date',
+		'doctype': u'DocField',
+		'fieldname': u'stock_auth_role',
+		'fieldtype': u'Link',
+		'label': u'Authorized Role (Frozen Entry)',
+		'options': u'Role'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'description': 'Accounting entry frozen up to this date, nobody can do / modify entry except authorized person',
-		'doctype': 'DocField',
-		'fieldname': 'acc_frozen_upto',
-		'fieldtype': 'Date',
-		'label': 'Accounts Frozen Upto'
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'Accounts'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'description': 'Users with this role are allowed to do / modify accounting entry before frozen date',
-		'doctype': 'DocField',
-		'fieldname': 'bde_auth_role',
-		'fieldtype': 'Link',
-		'label': 'Authourized Role (Frozen Entry)',
-		'options': 'Role'
+		'colour': u'White:FFF',
+		'description': u'Accounting entry frozen up to this date, nobody can do / modify entry except authorized person',
+		'doctype': u'DocField',
+		'fieldname': u'acc_frozen_upto',
+		'fieldtype': u'Date',
+		'label': u'Accounts Frozen Upto'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'credit_controller',
-		'fieldtype': 'Link',
-		'label': 'Credit Controller',
-		'options': 'Role'
+		'colour': u'White:FFF',
+		'description': u'Users with this role are allowed to do / modify accounting entry before frozen date',
+		'doctype': u'DocField',
+		'fieldname': u'bde_auth_role',
+		'fieldtype': u'Link',
+		'label': u'Authourized Role (Frozen Entry)',
+		'options': u'Role'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Column Break'
+		'doctype': u'DocField',
+		'fieldname': u'credit_controller',
+		'fieldtype': u'Link',
+		'label': u'Credit Controller',
+		'options': u'Role'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'HTML',
-		'label': 'Account Info',
-		'options': '<div class="help-box">For more accounting defaults, Open <a href="#!List/Company">Company</a></div>'
+		'doctype': u'DocField',
+		'fieldtype': u'Column Break'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'label': 'Selling'
+		'doctype': u'DocField',
+		'fieldtype': u'HTML',
+		'label': u'Account Info',
+		'options': u'<div class="help-box">For more accounting defaults, Open <a href="#!List/Company">Company</a></div>'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'default': 'Customer Name',
-		'doctype': 'DocField',
-		'fieldname': 'cust_master_name',
-		'fieldtype': 'Select',
-		'label': 'Customer Master created by ',
-		'options': 'Customer Name\nNaming Series'
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'Selling'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_customer_group',
-		'fieldtype': 'Link',
-		'label': 'Default Customer Group',
-		'options': 'Customer Group'
+		'colour': u'White:FFF',
+		'default': u'Customer Name',
+		'doctype': u'DocField',
+		'fieldname': u'cust_master_name',
+		'fieldtype': u'Select',
+		'label': u'Customer Master created by ',
+		'options': u'\nCustomer Name\nNaming Series'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'HTML',
-		'label': 'CGHelp',
-		'options': '<a href="#!Sales Browser/Customer Group">To manage Customer Groups, click here</a>'
+		'doctype': u'DocField',
+		'fieldname': u'default_customer_group',
+		'fieldtype': u'Link',
+		'label': u'Default Customer Group',
+		'options': u'Customer Group'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_territory',
-		'fieldtype': 'Link',
-		'label': 'Default Territory',
-		'options': 'Territory'
+		'doctype': u'DocField',
+		'fieldtype': u'HTML',
+		'label': u'CGHelp',
+		'options': u'<a href="#!Sales Browser/Customer Group">To manage Customer Groups, click here</a>'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'HTML',
-		'label': 'TerritoryHelp',
-		'options': '<a href="#!Sales Browser/Territory">To manage Territory, click here</a>'
+		'doctype': u'DocField',
+		'fieldname': u'default_territory',
+		'fieldtype': u'Link',
+		'label': u'Default Territory',
+		'options': u'Territory'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Column Break',
-		'width': '50%'
+		'doctype': u'DocField',
+		'fieldtype': u'HTML',
+		'label': u'TerritoryHelp',
+		'options': u'<a href="#!Sales Browser/Territory">To manage Territory, click here</a>'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_price_list',
-		'fieldtype': 'Link',
-		'label': 'Default Price List',
-		'options': 'Price List'
+		'doctype': u'DocField',
+		'fieldtype': u'Column Break',
+		'width': u'50%'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_price_list_currency',
-		'fieldtype': 'Link',
-		'label': 'Default Price List Currency',
-		'options': 'Currency'
+		'doctype': u'DocField',
+		'fieldname': u'default_price_list',
+		'fieldtype': u'Link',
+		'label': u'Default Price List',
+		'options': u'Price List'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'default': 'No',
-		'doctype': 'DocField',
-		'fieldname': 'so_required',
-		'fieldtype': 'Select',
-		'label': 'Sales Order Required',
-		'options': 'No\nYes'
+		'doctype': u'DocField',
+		'fieldname': u'default_price_list_currency',
+		'fieldtype': u'Link',
+		'label': u'Default Price List Currency',
+		'options': u'Currency'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'default': 'No',
-		'doctype': 'DocField',
-		'fieldname': 'dn_required',
-		'fieldtype': 'Select',
-		'label': 'Delivery Note Required',
-		'options': 'No\nYes'
+		'colour': u'White:FFF',
+		'default': u'No',
+		'doctype': u'DocField',
+		'fieldname': u'so_required',
+		'fieldtype': u'Select',
+		'label': u'Sales Order Required',
+		'options': u'No\nYes'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'label': 'Buying'
+		'colour': u'White:FFF',
+		'default': u'No',
+		'doctype': u'DocField',
+		'fieldname': u'dn_required',
+		'fieldtype': u'Select',
+		'label': u'Delivery Note Required',
+		'options': u'No\nYes'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'default_supplier_type',
-		'fieldtype': 'Link',
-		'label': 'Default Supplier Type',
-		'options': 'Supplier Type'
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'Buying'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'default': 'Supplier Name',
-		'doctype': 'DocField',
-		'fieldname': 'supp_master_name',
-		'fieldtype': 'Select',
-		'label': 'Supplier Master created by ',
-		'options': 'Supplier Name\nNaming Series'
+		'doctype': u'DocField',
+		'fieldname': u'default_supplier_type',
+		'fieldtype': u'Link',
+		'label': u'Default Supplier Type',
+		'options': u'Supplier Type'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Column Break',
-		'width': '50%'
+		'colour': u'White:FFF',
+		'default': u'Supplier Name',
+		'doctype': u'DocField',
+		'fieldname': u'supp_master_name',
+		'fieldtype': u'Select',
+		'label': u'Supplier Master created by ',
+		'options': u'Supplier Name\nNaming Series'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'default': 'No',
-		'doctype': 'DocField',
-		'fieldname': 'po_required',
-		'fieldtype': 'Select',
-		'label': 'Purchase Order Required',
-		'options': 'No\nYes'
+		'doctype': u'DocField',
+		'fieldtype': u'Column Break',
+		'width': u'50%'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'default': 'No',
-		'doctype': 'DocField',
-		'fieldname': 'pr_required',
-		'fieldtype': 'Select',
-		'label': 'Purchase Receipt Required',
-		'options': 'No\nYes'
+		'colour': u'White:FFF',
+		'default': u'No',
+		'doctype': u'DocField',
+		'fieldname': u'po_required',
+		'fieldtype': u'Select',
+		'label': u'Purchase Order Required',
+		'options': u'No\nYes'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'label': 'HR',
-		'options': '<div style="padding-top: 8px;" class="columnHeading">HR</div>'
+		'colour': u'White:FFF',
+		'default': u'No',
+		'doctype': u'DocField',
+		'fieldname': u'pr_required',
+		'fieldtype': u'Select',
+		'label': u'Purchase Receipt Required',
+		'options': u'No\nYes'
 	},
 
 	# DocField
 	{
-		'colour': 'White:FFF',
-		'description': 'Employee record is created using selected field. ',
-		'doctype': 'DocField',
-		'fieldname': 'emp_created_by',
-		'fieldtype': 'Select',
-		'label': 'Employee Records to be created by ',
-		'options': '\nNaming Series\nEmployee Number'
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'HR',
+		'options': u'<div style="padding-top: 8px;" class="columnHeading">HR</div>'
+	},
+
+	# DocField
+	{
+		'colour': u'White:FFF',
+		'description': u'Employee record is created using selected field. ',
+		'doctype': u'DocField',
+		'fieldname': u'emp_created_by',
+		'fieldtype': u'Select',
+		'label': u'Employee Records to be created by ',
+		'options': u'\nNaming Series\nEmployee Number'
 	}
 ]
\ No newline at end of file
diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py
index de2d131..8e1c949 100644
--- a/erpnext/stock/doctype/bin/bin.py
+++ b/erpnext/stock/doctype/bin/bin.py
@@ -183,18 +183,20 @@
 	# get moving average inventory values
 	# ------------------------------------
 	def get_moving_average_inventory_values(self, val_rate, in_rate, opening_qty, actual_qty, is_cancelled):
+		#msgprint(actual_qty)
 		if flt(in_rate) <= 0: # In case of delivery/stock issue in_rate = 0 or wrong incoming rate
 			in_rate = val_rate
-		if in_rate and val_rate == 0: # First entry
-			val_rate = in_rate
 
 		# val_rate is same as previous entry if :
 		# 1. actual qty is negative(delivery note / stock entry)
 		# 2. cancelled entry
 		# 3. val_rate is negative
 		# Otherwise it will be calculated as per moving average
-		elif actual_qty > 0 and (opening_qty + actual_qty) > 0 and is_cancelled == 'No' and ((opening_qty * val_rate) + (actual_qty * in_rate)) > 0:
+		if actual_qty > 0 and (opening_qty + actual_qty) > 0 and is_cancelled == 'No' and ((opening_qty * val_rate) + (actual_qty * in_rate)) > 0:
+			opening_qty = opening_qty > 0 and opening_qty or 0
 			val_rate = ((opening_qty *val_rate) + (actual_qty * in_rate)) / (opening_qty + actual_qty)
+		elif (opening_qty + actual_qty) <= 0:
+			val_rate = 0
 		stock_val = val_rate
 		return val_rate, stock_val
 
@@ -248,8 +250,10 @@
 	# get stock value
 	# ----------------
 	def get_stock_value(self, val_method, cqty, stock_val, serial_nos):
-		if val_method == 'Moving Average' or serial_nos:
+		if serial_nos:
 			stock_val = flt(stock_val) * flt(cqty)
+		elif val_method == 'Moving Average':
+			stock_val = flt(cqty) > 0 and flt(stock_val) * flt(cqty) or 0
 		elif val_method == 'FIFO':
 			stock_val = sum([flt(d[0])*flt(d[1]) for d in self.fcfs_bal])
 		return stock_val
@@ -277,6 +281,11 @@
 		# get valuation method
 		val_method = get_obj('Valuation Control').get_valuation_method(self.doc.item_code)
 
+		# allow negative stock (only for moving average method)
+		from webnotes.utils import get_defaults
+		allow_negative_stock = get_defaults().get('allow_negative_stock', 0)
+
+
 		# recalculate the balances for all stock ledger entries
 		# after the prev sle
 		sll = sql("""
@@ -289,10 +298,10 @@
 			order by timestamp(posting_date, posting_time) asc, name asc""", \
 				(self.doc.item_code, self.doc.warehouse, \
 					prev_sle.get('posting_date','1900-01-01'), prev_sle.get('posting_time', '12:00')), as_dict = 1)
-
 		for sle in sll:
 			# block if stock level goes negative on any date
-			self.validate_negative_stock(cqty, sle)
+			if val_method != 'Moving Average' or flt(allow_negative_stock) == 0:
+				self.validate_negative_stock(cqty, sle)
 
 			stock_val, in_rate = 0, sle['incoming_rate'] # IN
 			serial_nos = sle["serial_no"] and ("'"+"', '".join(cstr(sle["serial_no"]).split('\n')) \
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 3d8a101..aeccc43 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -321,7 +321,6 @@
 	def on_submit(self):
 		self.validate_packed_qty()
 		set(self.doc, 'message', 'Items against your Order #%s have been delivered. Delivery #%s: ' % (self.doc.po_no, self.doc.name))
-		self.check_qty_in_stock()
 		# Check for Approving Authority
 		get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.company, self.doc.grand_total, self)
 		sl_obj = get_obj("Stock Ledger")
@@ -360,14 +359,6 @@
 			webnotes.msgprint("Packing Error:\n" + err_msg, raise_exception=1)
 
 
-	# *********** Checks whether actual quantity is present in warehouse *************
-	def check_qty_in_stock(self):
-		for d in getlist(self.doclist, 'packing_details'):
-			is_stock_item = sql("select is_stock_item from `tabItem` where name = '%s'" % d.item_code)[0][0]
-			if is_stock_item == 'Yes' and d.warehouse and flt(d.qty) > flt(d.actual_qty):
-				msgprint("For Item: " + cstr(d.item_code) + " at Warehouse: " + cstr(d.warehouse) + " Quantity: " + cstr(d.qty) +" is not Available. (Must be less than or equal to " + cstr(d.actual_qty) + " )")
-				raise Exception, "Validation Error"
-
 
 
 # ON CANCEL
diff --git a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py
index 9b421d3..36f019b 100644
--- a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py
+++ b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py
@@ -42,9 +42,9 @@
   def pull_item_details(self):
     if self.doc.return_type == 'Sales Return':
       if self.doc.delivery_note_no:
-        det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.uom, t2.basic_rate, t3.customer, t3.customer_name, t3.customer_address, t2.serial_no, t2.batch_no from `tabDelivery Note Packing Detail` t1, `tabDelivery Note Detail` t2, `tabDelivery Note` t3 where t1.parent = t3.name and t2.parent = t3.name and t1.parent_detail_docname = t2.name and t3.name = '%s' and t3.docstatus = 1" % self.doc.delivery_note_no)
+        det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.uom, t2.export_rate * t3.conversion_rate, t3.customer, t3.customer_name, t3.customer_address, t2.serial_no, t2.batch_no from `tabDelivery Note Packing Detail` t1, `tabDelivery Note Detail` t2, `tabDelivery Note` t3 where t1.parent = t3.name and t2.parent = t3.name and t1.parent_detail_docname = t2.name and t3.name = '%s' and t3.docstatus = 1" % self.doc.delivery_note_no)
       elif self.doc.sales_invoice_no:
-        det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.stock_uom, t1.basic_rate, t2.customer, t2.customer_name, t2.customer_address, t1.serial_no from `tabRV Detail` t1, `tabReceivable Voucher` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.sales_invoice_no)
+        det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.stock_uom, t1.export_rate * t2.conversion_rate, t2.customer, t2.customer_name, t2.customer_address, t1.serial_no from `tabRV Detail` t1, `tabReceivable Voucher` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.sales_invoice_no)
     elif self.doc.return_type == 'Purchase Return' and self.doc.purchase_receipt_no:
       det = sql("select t1.name, t1.item_code, t1.description, t1.received_qty, t1.uom, t1.purchase_rate, t2.supplier, t2.supplier_name, t2.supplier_address, t1.serial_no, t1.batch_no from `tabPurchase Receipt Detail` t1, `tabPurchase Receipt` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.purchase_receipt_no)
 
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index a6fbba0..a1cec39 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -265,9 +265,6 @@
 			if flt(d.transfer_qty) <= 0:
 				msgprint("Transfer Quantity can not be less than or equal to zero at Row No " + cstr(d.idx))
 				raise Exception
-			if d.s_warehouse and flt(d.transfer_qty) > flt(d.actual_qty):
-				msgprint("Transfer Quantity is more than Available Qty at Row No " + cstr(d.idx))
-				raise Exception
 
 
 	def calc_amount(self):
diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
index bef15f8..b9d982b 100644
--- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
+++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.txt
@@ -3,19 +3,18 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2010-08-08 17:09:25',
+		'creation': '2009-05-12 16:46:51',
 		'docstatus': 0,
-		'modified': '2012-03-21 14:04:38',
+		'modified': '2012-04-18 11:59:34',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
 
 	# These values are common for all DocType
 	{
-		'_last_update': u'1322549701',
+		'_last_update': u'1334728856',
 		'autoname': u'SLE/.########',
 		'colour': u'White:FFF',
-		'default_print_format': u'Standard',
 		'doctype': 'DocType',
 		'hide_toolbar': 1,
 		'in_create': 1,
@@ -24,7 +23,7 @@
 		'section_style': u'Simple',
 		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 53
+		'version': 54
 	},
 
 	# These values are common for all DocField
@@ -38,17 +37,12 @@
 
 	# These values are common for all DocPerm
 	{
-		'amend': 0,
-		'cancel': 0,
-		'create': 0,
 		'doctype': u'DocPerm',
 		'name': '__common__',
 		'parent': u'Stock Ledger Entry',
 		'parentfield': u'permissions',
 		'parenttype': u'DocType',
-		'read': 1,
-		'submit': 0,
-		'write': 0
+		'read': 1
 	},
 
 	# DocType, Stock Ledger Entry
@@ -60,29 +54,32 @@
 	# DocPerm
 	{
 		'doctype': u'DocPerm',
-		'permlevel': 0,
-		'role': u'System Manager'
-	},
-
-	# DocPerm
-	{
-		'doctype': u'DocPerm',
-		'permlevel': 0,
-		'role': u'Material User'
-	},
-
-	# DocPerm
-	{
-		'doctype': u'DocPerm',
 		'permlevel': 1,
 		'role': u'All'
 	},
 
 	# DocPerm
 	{
+		'amend': 0,
+		'cancel': 0,
+		'create': 0,
 		'doctype': u'DocPerm',
 		'permlevel': 1,
-		'role': u'Material User'
+		'role': u'Material User',
+		'submit': 0,
+		'write': 0
+	},
+
+	# DocPerm
+	{
+		'amend': 0,
+		'cancel': 0,
+		'create': 0,
+		'doctype': u'DocPerm',
+		'permlevel': 0,
+		'role': u'Material User',
+		'submit': 0,
+		'write': 0
 	},
 
 	# DocPerm
@@ -97,12 +94,14 @@
 		'doctype': u'DocField',
 		'fieldname': u'item_code',
 		'fieldtype': u'Link',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Item Code',
 		'oldfieldname': u'item_code',
 		'oldfieldtype': u'Link',
 		'options': u'Item',
 		'permlevel': 1,
+		'print_hide': 0,
 		'reqd': 0,
 		'search_index': 1,
 		'width': u'100px'
@@ -125,10 +124,13 @@
 		'doctype': u'DocField',
 		'fieldname': u'batch_no',
 		'fieldtype': u'Data',
+		'hidden': 0,
 		'label': u'Batch No',
 		'oldfieldname': u'batch_no',
 		'oldfieldtype': u'Data',
-		'permlevel': 0
+		'permlevel': 0,
+		'print_hide': 0,
+		'reqd': 0
 	},
 
 	# DocField
@@ -136,12 +138,15 @@
 		'doctype': u'DocField',
 		'fieldname': u'warehouse',
 		'fieldtype': u'Link',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Warehouse',
 		'oldfieldname': u'warehouse',
 		'oldfieldtype': u'Link',
 		'options': u'Warehouse',
 		'permlevel': 1,
+		'print_hide': 0,
+		'reqd': 0,
 		'search_index': 1,
 		'width': u'100px'
 	},
@@ -151,13 +156,16 @@
 		'doctype': u'DocField',
 		'fieldname': u'warehouse_type',
 		'fieldtype': u'Select',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Warehouse Type',
 		'oldfieldname': u'warehouse_type',
 		'oldfieldtype': u'Select',
-		'options': u'link:Warehouse Type',
+		'options': u'\nStores',
 		'permlevel': 1,
-		'search_index': 0
+		'print_hide': 0,
+		'reqd': 0,
+		'search_index': 1
 	},
 
 	# DocField
@@ -166,11 +174,13 @@
 		'doctype': u'DocField',
 		'fieldname': u'posting_date',
 		'fieldtype': u'Date',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Posting Date',
 		'oldfieldname': u'posting_date',
 		'oldfieldtype': u'Date',
 		'permlevel': 1,
+		'print_hide': 0,
 		'reqd': 0,
 		'search_index': 1,
 		'width': u'100px'
@@ -181,11 +191,14 @@
 		'doctype': u'DocField',
 		'fieldname': u'posting_time',
 		'fieldtype': u'Time',
+		'hidden': 0,
 		'in_filter': 0,
 		'label': u'Posting Time',
 		'oldfieldname': u'posting_time',
 		'oldfieldtype': u'Time',
 		'permlevel': 1,
+		'print_hide': 0,
+		'reqd': 0,
 		'search_index': 0,
 		'width': u'100px'
 	},
@@ -196,12 +209,15 @@
 		'doctype': u'DocField',
 		'fieldname': u'transaction_date',
 		'fieldtype': u'Date',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Transaction Date',
 		'oldfieldname': u'transaction_date',
 		'oldfieldtype': u'Date',
 		'permlevel': 1,
-		'search_index': 0,
+		'print_hide': 0,
+		'reqd': 0,
+		'search_index': 1,
 		'width': u'100px'
 	},
 
@@ -210,12 +226,15 @@
 		'doctype': u'DocField',
 		'fieldname': u'voucher_type',
 		'fieldtype': u'Data',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Voucher Type',
 		'oldfieldname': u'voucher_type',
 		'oldfieldtype': u'Data',
 		'permlevel': 1,
-		'search_index': 0,
+		'print_hide': 0,
+		'reqd': 0,
+		'search_index': 1,
 		'width': u'150px'
 	},
 
@@ -224,12 +243,15 @@
 		'doctype': u'DocField',
 		'fieldname': u'voucher_no',
 		'fieldtype': u'Data',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Voucher No',
 		'oldfieldname': u'voucher_no',
 		'oldfieldtype': u'Data',
 		'permlevel': 1,
-		'search_index': 0,
+		'print_hide': 0,
+		'reqd': 0,
+		'search_index': 1,
 		'width': u'150px'
 	},
 
@@ -238,10 +260,13 @@
 		'doctype': u'DocField',
 		'fieldname': u'voucher_detail_no',
 		'fieldtype': u'Data',
+		'hidden': 0,
 		'label': u'Voucher Detail No',
 		'oldfieldname': u'voucher_detail_no',
 		'oldfieldtype': u'Data',
 		'permlevel': 1,
+		'print_hide': 0,
+		'reqd': 0,
 		'width': u'150px'
 	},
 
@@ -251,11 +276,14 @@
 		'doctype': u'DocField',
 		'fieldname': u'actual_qty',
 		'fieldtype': u'Currency',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Actual Quantity',
 		'oldfieldname': u'actual_qty',
 		'oldfieldtype': u'Currency',
 		'permlevel': 1,
+		'print_hide': 0,
+		'reqd': 0,
 		'width': u'150px'
 	},
 
@@ -264,10 +292,13 @@
 		'doctype': u'DocField',
 		'fieldname': u'incoming_rate',
 		'fieldtype': u'Currency',
+		'hidden': 0,
 		'label': u'Incoming Rate',
 		'oldfieldname': u'incoming_rate',
 		'oldfieldtype': u'Currency',
-		'permlevel': 0
+		'permlevel': 0,
+		'print_hide': 0,
+		'reqd': 0
 	},
 
 	# DocField
@@ -275,10 +306,13 @@
 		'doctype': u'DocField',
 		'fieldname': u'stock_uom',
 		'fieldtype': u'Data',
+		'hidden': 0,
 		'label': u'Stock UOM',
 		'oldfieldname': u'stock_uom',
 		'oldfieldtype': u'Data',
 		'permlevel': 1,
+		'print_hide': 0,
+		'reqd': 0,
 		'width': u'150px'
 	},
 
@@ -287,11 +321,14 @@
 		'doctype': u'DocField',
 		'fieldname': u'bin_aqat',
 		'fieldtype': u'Currency',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Bin Actual Qty After Transaction',
 		'oldfieldname': u'bin_aqat',
 		'oldfieldtype': u'Currency',
 		'permlevel': 1,
+		'print_hide': 0,
+		'reqd': 0,
 		'width': u'150px'
 	},
 
@@ -306,7 +343,8 @@
 		'oldfieldtype': u'Currency',
 		'permlevel': 0,
 		'print_hide': 1,
-		'report_hide': 1
+		'report_hide': 1,
+		'reqd': 0
 	},
 
 	# DocField
@@ -320,7 +358,8 @@
 		'oldfieldtype': u'Currency',
 		'permlevel': 0,
 		'print_hide': 1,
-		'report_hide': 1
+		'report_hide': 1,
+		'reqd': 0
 	},
 
 	# DocField
@@ -328,10 +367,13 @@
 		'doctype': u'DocField',
 		'fieldname': u'valuation_rate',
 		'fieldtype': u'Currency',
+		'hidden': 0,
 		'label': u'Valuation Rate',
 		'oldfieldname': u'valuation_rate',
 		'oldfieldtype': u'Currency',
 		'permlevel': 0,
+		'print_hide': 0,
+		'reqd': 0,
 		'width': u'150px'
 	},
 
@@ -340,14 +382,18 @@
 		'doctype': u'DocField',
 		'fieldname': u'stock_value',
 		'fieldtype': u'Currency',
+		'hidden': 0,
 		'label': u'Stock Value',
 		'oldfieldname': u'stock_value',
 		'oldfieldtype': u'Currency',
-		'permlevel': 0
+		'permlevel': 0,
+		'print_hide': 0,
+		'reqd': 0
 	},
 
 	# DocField
 	{
+		'colour': u'White:FFF',
 		'doctype': u'DocField',
 		'fieldname': u'fcfs_stack',
 		'fieldtype': u'Text',
@@ -359,6 +405,7 @@
 		'permlevel': 2,
 		'print_hide': 1,
 		'report_hide': 1,
+		'reqd': 0,
 		'search_index': 0
 	},
 
@@ -367,13 +414,16 @@
 		'doctype': u'DocField',
 		'fieldname': u'company',
 		'fieldtype': u'Select',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Company',
 		'oldfieldname': u'company',
 		'oldfieldtype': u'Data',
-		'options': u'link:Company',
+		'options': u'\nWeb Notes Technologies Pvt Ltd',
 		'permlevel': 1,
-		'search_index': 0,
+		'print_hide': 0,
+		'reqd': 0,
+		'search_index': 1,
 		'width': u'150px'
 	},
 
@@ -382,12 +432,15 @@
 		'doctype': u'DocField',
 		'fieldname': u'fiscal_year',
 		'fieldtype': u'Data',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Fiscal Year',
 		'oldfieldname': u'fiscal_year',
 		'oldfieldtype': u'Data',
 		'permlevel': 1,
-		'search_index': 0,
+		'print_hide': 0,
+		'reqd': 0,
+		'search_index': 1,
 		'width': u'150px'
 	},
 
@@ -396,13 +449,16 @@
 		'doctype': u'DocField',
 		'fieldname': u'is_cancelled',
 		'fieldtype': u'Select',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Is Cancelled',
 		'oldfieldname': u'is_cancelled',
 		'oldfieldtype': u'Select',
 		'options': u'\nYes\nNo',
 		'permlevel': 1,
-		'search_index': 0,
+		'print_hide': 0,
+		'reqd': 0,
+		'search_index': 1,
 		'width': u'100px'
 	},
 
@@ -411,13 +467,16 @@
 		'doctype': u'DocField',
 		'fieldname': u'is_stock_entry',
 		'fieldtype': u'Select',
+		'hidden': 0,
 		'in_filter': 1,
 		'label': u'Is Stock Entry',
 		'oldfieldname': u'is_stock_entry',
 		'oldfieldtype': u'Select',
 		'options': u'\nYes\nNo',
 		'permlevel': 1,
-		'search_index': 0,
+		'print_hide': 0,
+		'reqd': 0,
+		'search_index': 1,
 		'width': u'100px'
 	}
 ]
\ No newline at end of file