Merge branch 'feat-picklist-scan' of github.com:dj12djdjs/erpnext into feat-picklist-scan
diff --git a/erpnext/public/js/utils/barcode_scanner.js b/erpnext/public/js/utils/barcode_scanner.js
index 24d49a4..5a73fea 100644
--- a/erpnext/public/js/utils/barcode_scanner.js
+++ b/erpnext/public/js/utils/barcode_scanner.js
@@ -197,7 +197,7 @@
 	get_row_to_modify_on_scan(item_code) {
 		// get an existing item row to increment or blank row to modify
 		const existing_item_row = this.items_table.filter((d) => {
-			const [qty, max_qty] = [d[this.qty_field], d[this.max_qty_field] || null]
+			const [qty, max_qty] = [d[this.qty_field], d[this.max_qty_field] || null];
 			return d.item_code === item_code && ((max_qty === null) || (qty < max_qty));
 		}).splice(0, 1).pop();
 
diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py
index 70d2f23..ce3ec60 100644
--- a/erpnext/stock/doctype/pick_list/pick_list.py
+++ b/erpnext/stock/doctype/pick_list/pick_list.py
@@ -42,8 +42,13 @@
 		update_sales_orders = set()
 		for item in self.locations:
 			# if the user has not entered any picked qty, set it to stock_qty, before submit
-			if item.picked_qty == 0:
-				item.picked_qty = item.stock_qty
+			if item.picked_qty < item.stock_qty:
+				frappe.throw(
+					_("Row {0} is short by {1} {2}").format(
+						item.idx, item.stock_qty - item.picked_qty, item.stock_uom
+					),
+					title=_("Pick List Incomplete"),
+				)
 
 			if item.sales_order_item:
 				# update the picked_qty in SO Item