Merge pull request #4977 from nabinhait/fix88

[fix] Item or Warehouse filter mandatory in Stock Balance if number of sle is greater than 500000
diff --git a/erpnext/setup/doctype/company/delete_company_transactions.py b/erpnext/setup/doctype/company/delete_company_transactions.py
index d32e14f..b07a794 100644
--- a/erpnext/setup/doctype/company/delete_company_transactions.py
+++ b/erpnext/setup/doctype/company/delete_company_transactions.py
@@ -27,10 +27,6 @@
 			"Purchase Taxes and Charges Template", "POS Profile", 'BOM'):
 				delete_for_doctype(doctype, company_name)
 
-		else:
-			# un-set company
-			frappe.db.sql('update `tab{0}` set company="" where company=%s'.format(doctype), company_name)
-
 	# Clear notification counts
 	clear_notifications()
 
diff --git a/erpnext/templates/form_grid/material_request_grid.html b/erpnext/templates/form_grid/material_request_grid.html
index 8016316..866c06e 100644
--- a/erpnext/templates/form_grid/material_request_grid.html
+++ b/erpnext/templates/form_grid/material_request_grid.html
@@ -11,7 +11,7 @@
 {% } else { %}
 	<div class="row">
 		<div class="col-sm-4">
-            <span class="indicator {%= (doc.qty==doc.ordered_qty) ? "green" : "orange" %}">{%= doc.item_code %}</strong>
+            <span class="indicator {%= (doc.qty<=doc.ordered_qty) ? "green" : "orange" %}">{%= doc.item_code %}</strong>
 			{% if(doc.item_name != doc.item_code) { %}
 				<br>{%= doc.item_name %}{% } %}
             <!-- {% if(doc.item_name != doc.description) { %}
diff --git a/erpnext/templates/print_formats/includes/item_table_description.html b/erpnext/templates/print_formats/includes/item_table_description.html
index b7437a7..99215e8 100644
--- a/erpnext/templates/print_formats/includes/item_table_description.html
+++ b/erpnext/templates/print_formats/includes/item_table_description.html
@@ -35,7 +35,7 @@
 
 	{% if compact -%}
 		{%- for fieldname in doc.flags.show_in_description -%}
-			{% if doc.get(fieldname) -%}
+			{% if doc.get(fieldname) and doc.in_format_data(fieldname) -%}
 			<p>
 				<strong>{{ _(doc.meta.get_label(fieldname)) }}:</strong>
 				{{ doc.get_formatted(fieldname, translated=True)  }}