Merge pull request #12530 from frappe/manassolanki-patch-2

Issue in the data import while importing the invoice
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index bd400c0..7ab6784 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
 from erpnext.hooks import regional_overrides
 from frappe.utils import getdate
 
-__version__ = '10.0.10'
+__version__ = '10.0.11'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py
index f38f28d..6ad36f6 100644
--- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py
+++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py
@@ -36,7 +36,7 @@
 	return data
 
 def get_conditions(filters):
-	conditions = ""
+	conditions = "1=1"
 	if filters.get("from_date"): conditions += "a.posting_date >= %(from_date)s"
 	if filters.get("to_date"): conditions += " and a.posting_date <= %(to_date)s"
 	if filters.get("company"): conditions += " and a.company=%(company)s"
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index fe8642c..ab8ab03 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -21,10 +21,10 @@
 			return erpnext.queries.warehouse(frm.doc);
 		});
 
-		frappe.db.get_value('Buying Settings', {name: 'Buying Settings'}, 'disable_fetch_last_purchase_rate', (r) => {
-			value = r && cint(r.disable_fetch_last_purchase_rate);
-			frm.toggle_display('get_last_purchase_rate', !value);
-		});
+		if (frm.doc.__onload) {
+			frm.toggle_display('get_last_purchase_rate',
+				frm.doc.__onload.disable_fetch_last_purchase_rate);
+		}
 
 		frm.set_indicator_formatter('item_code',
 			function(doc) { return (doc.qty<=doc.received_qty) ? "green" : "orange" })
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index 1929476..db13bd5 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -34,6 +34,12 @@
 			'overflow_type': 'order'
 		}]
 
+	def onload(self):
+		super(PurchaseOrder, self).onload()
+
+		self.set_onload('disable_fetch_last_purchase_rate',
+			cint(frappe.db.get_single_value("Buying Settings", "disable_fetch_last_purchase_rate")))
+
 	def validate(self):
 		super(PurchaseOrder, self).validate()
 
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 3ef7be1..16a3023 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
@@ -310,6 +310,7 @@
 			}
 		"""
 		item_list = []
+		precision = frappe.get_precision("BOM Item", "stock_qty")
 
 		for bom, so_wise_qty in bom_dict.items():
 			bom_wise_item_details = {}
@@ -334,8 +335,9 @@
 
 			for item, item_details in bom_wise_item_details.items():
 				for so_qty in so_wise_qty:
-					item_list.append([item, flt(item_details.qty) * so_qty[1], item_details.description,
-						item_details.stock_uom, item_details.min_order_qty, so_qty[0]])
+					item_list.append([item, flt(flt(item_details.qty) * so_qty[1], precision),
+						item_details.description, item_details.stock_uom, item_details.min_order_qty,
+						so_qty[0]])
 
 		self.make_items_dict(item_list)
 
diff --git a/erpnext/patches/v7_0/convert_timelog_to_timesheet.py b/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
index 9894c2a..4b6cf74 100644
--- a/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
+++ b/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
@@ -16,7 +16,7 @@
 		else:
 			company = frappe.db.get_single_value('Global Defaults', 'default_company')
 		
-		time_sheet = make_timesheet(data.production_order)
+		time_sheet = make_timesheet(data.production_order, company)
 		args = get_timelog_data(data)
 		add_timesheet_detail(time_sheet, args)
 		if data.docstatus == 2:
diff --git a/erpnext/public/less/pos.less b/erpnext/public/less/pos.less
index 0fcb654..af3008e 100644
--- a/erpnext/public/less/pos.less
+++ b/erpnext/public/less/pos.less
@@ -216,6 +216,10 @@
 	}
 
 	.grand-total-value {
-		font-size: 24px;
+		font-size: 18px;
 	}
+}
+
+.rounded-total-value {
+  font-size: 18px;
 }
\ No newline at end of file