mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-17 22:05:10 +00:00
Merge pull request #49386 from rohitwaghchaure/fixed-support-47111
fix: Issue with Barcode Scanning in Stock Entry
This commit is contained in:
@@ -459,12 +459,8 @@ erpnext.utils.BarcodeScanner = class BarcodeScanner {
|
||||
const item_scanned = row.has_item_scanned;
|
||||
|
||||
let warehouse_match = true;
|
||||
if (has_warehouse_field) {
|
||||
if (warehouse) {
|
||||
warehouse_match = row[warehouse_field] === warehouse;
|
||||
} else {
|
||||
warehouse_match = !row[warehouse_field];
|
||||
}
|
||||
if (has_warehouse_field && warehouse && row[warehouse_field]) {
|
||||
warehouse_match = row[warehouse_field] === warehouse;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -1006,7 +1006,7 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle
|
||||
this.barcode_scanner = new erpnext.utils.BarcodeScanner({
|
||||
frm: this.frm,
|
||||
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