From 92ec633a5c531b123bedde0f1ea50c615c73a47e Mon Sep 17 00:00:00 2001 From: Pugazhendhi Velu Date: Mon, 1 Dec 2025 19:11:57 +0000 Subject: [PATCH] fix(barcode_scanner): set serial and batch before item to prevent FIFO override --- erpnext/public/js/utils/barcode_scanner.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/public/js/utils/barcode_scanner.js b/erpnext/public/js/utils/barcode_scanner.js index 1c3d5d160e6..822a9902a38 100644 --- a/erpnext/public/js/utils/barcode_scanner.js +++ b/erpnext/public/js/utils/barcode_scanner.js @@ -138,15 +138,15 @@ erpnext.utils.BarcodeScanner = class BarcodeScanner { frappe.run_serially([ () => this.set_selector_trigger_flag(data), - () => - this.set_item(row, item_code, barcode, batch_no, serial_no).then((qty) => { - this.show_scan_message(row.idx, !is_new_row, qty); - }), () => this.set_barcode_uom(row, uom), () => this.set_serial_no(row, serial_no), () => this.set_batch_no(row, batch_no), () => this.set_barcode(row, barcode), () => this.set_warehouse(row), + () => + this.set_item(row, item_code, barcode, batch_no, serial_no).then((qty) => { + this.show_scan_message(row.idx, !is_new_row, qty); + }), () => this.clean_up(), () => this.revert_selector_flag(), () => resolve(row),