Merge pull request #6648 from saurabh6790/hotfix

[fix] calculate variance only for submitted budgets
diff --git a/erpnext/hr/doctype/salary_slip/test_salary_slip.py b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
index d90d4b2..48a945e 100644
--- a/erpnext/hr/doctype/salary_slip/test_salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
@@ -14,7 +14,7 @@
 		for dt in ["Leave Application", "Leave Allocation", "Salary Slip"]:
 			frappe.db.sql("delete from `tab%s`" % dt)
 
-		make_allocation_record(leave_type="_Test Leave Type LWP")
+		# make_allocation_record(leave_type="_Test Leave Type")
 
 		frappe.db.set_value("Company", "_Test Company", "default_holiday_list", "_Test Holiday List")
 
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
index 1e6c48a..5fbcf1e 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
@@ -454,21 +454,20 @@
 				material_request.update({"material_request_type": item_wrapper.default_material_request_type})
 
 				for sales_order, requested_qty in items_to_be_requested[item].items():
-					if sales_order != 'No Sales Order':
-						material_request.append("items", {
-							"doctype": "Material Request Item",
-							"__islocal": 1,
-							"item_code": item,
-							"item_name": item_wrapper.item_name,
-							"description": item_wrapper.description,
-							"uom": item_wrapper.stock_uom,
-							"item_group": item_wrapper.item_group,
-							"brand": item_wrapper.brand,
-							"qty": requested_qty,
-							"schedule_date": add_days(nowdate(), cint(item_wrapper.lead_time_days)),
-							"warehouse": self.purchase_request_for_warehouse,
-							"sales_order": sales_order if sales_order!="No Sales Order" else None
-						})
+					material_request.append("items", {
+						"doctype": "Material Request Item",
+						"__islocal": 1,
+						"item_code": item,
+						"item_name": item_wrapper.item_name,
+						"description": item_wrapper.description,
+						"uom": item_wrapper.stock_uom,
+						"item_group": item_wrapper.item_group,
+						"brand": item_wrapper.brand,
+						"qty": requested_qty,
+						"schedule_date": add_days(nowdate(), cint(item_wrapper.lead_time_days)),
+						"warehouse": self.purchase_request_for_warehouse,
+						"sales_order": sales_order if sales_order!="No Sales Order" else None
+					})
 
 				material_request.flags.ignore_permissions = 1
 				material_request.submit()
diff --git a/erpnext/templates/print_formats/includes/item_table_description.html b/erpnext/templates/print_formats/includes/item_table_description.html
index 16e98e0..e99d712 100644
--- a/erpnext/templates/print_formats/includes/item_table_description.html
+++ b/erpnext/templates/print_formats/includes/item_table_description.html
@@ -2,7 +2,7 @@
 {%- set compact_fields = doc.flags.compact_item_fields -%}
 
 {% if doc.in_format_data("image") and doc.get("image") and not doc.is_print_hide("image")-%}
-<div class="pull-left" style="width: 20%; margin-right: 10px;">
+<div class="pull-left" style="max-width: 40%; margin-right: 10px;">
 	<img class="print-item-image" src="{{ doc.image }}" alt="">
 </div>
 {%- endif %}