From 8053f2dbcd835602d86dca520b8629b0ac866656 Mon Sep 17 00:00:00 2001 From: Devin Slauenwhite Date: Wed, 27 Apr 2022 22:10:15 -0400 Subject: [PATCH] feat: increment picked_qty on scan_barcode --- erpnext/stock/doctype/pick_list/pick_list.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/erpnext/stock/doctype/pick_list/pick_list.js b/erpnext/stock/doctype/pick_list/pick_list.js index 13b74b5eb1..ba1475347a 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.js +++ b/erpnext/stock/doctype/pick_list/pick_list.js @@ -158,6 +158,17 @@ frappe.ui.form.on('Pick List', { get_query_filters: get_query_filters }); }); + }, + scan_barcode: (frm) => { + const opts = { + frm, + items_table_name: 'locations', + qty_field: 'picked_qty', + max_qty_field: 'qty', + allow_new_row: false + }; + const barcode_scanner = new erpnext.utils.BarcodeScanner(opts); + barcode_scanner.process_scan(); } });