mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
Merge pull request #49387 from frappe/mergify/bp/version-15-hotfix/pr-49386
fix: Issue with Barcode Scanning in Stock Entry (backport #49386)
This commit is contained in:
@@ -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