mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-25 06:02:09 +01:00
fix: Issue with Barcode Scanning in Stock Entry
(cherry picked from commit 13e3db3730)
This commit is contained in:
committed by
Mergify
parent
dcb3e01df1
commit
45cdb39edd
@@ -459,12 +459,8 @@ erpnext.utils.BarcodeScanner = class BarcodeScanner {
|
|||||||
const item_scanned = row.has_item_scanned;
|
const item_scanned = row.has_item_scanned;
|
||||||
|
|
||||||
let warehouse_match = true;
|
let warehouse_match = true;
|
||||||
if (has_warehouse_field) {
|
if (has_warehouse_field && warehouse && row[warehouse_field]) {
|
||||||
if (warehouse) {
|
warehouse_match = row[warehouse_field] === warehouse;
|
||||||
warehouse_match = row[warehouse_field] === warehouse;
|
|
||||||
} else {
|
|
||||||
warehouse_match = !row[warehouse_field];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1006,7 +1006,7 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle
|
|||||||
this.barcode_scanner = new erpnext.utils.BarcodeScanner({
|
this.barcode_scanner = new erpnext.utils.BarcodeScanner({
|
||||||
frm: this.frm,
|
frm: this.frm,
|
||||||
warehouse_field: (doc) => {
|
warehouse_field: (doc) => {
|
||||||
return doc.purpose === "Material Transfer" ? "t_warehouse" : "s_warehouse";
|
return doc.purpose === "Material Receipt" ? "t_warehouse" : "s_warehouse";
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user