Skip to content

Commit 8f2002d

Browse files
rehanrehman389rehansari26
authored andcommitted
fix: add missing stock entry UOM filtering based on item master (#50135)
Co-authored-by: rehansari26 <[email protected]> (cherry picked from commit 7baf6ec)
1 parent 5b64343 commit 8f2002d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

erpnext/stock/doctype/stock_entry/stock_entry.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,21 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle
10731073
};
10741074
});
10751075

1076+
this.frm.set_query("uom", "items", function (doc, cdt, cdn) {
1077+
let row = locals[cdt][cdn];
1078+
1079+
if (!row.item_code) {
1080+
return;
1081+
}
1082+
1083+
return {
1084+
query: "erpnext.controllers.queries.get_item_uom_query",
1085+
filters: {
1086+
item_code: row.item_code,
1087+
},
1088+
};
1089+
});
1090+
10761091
this.frm.fields_dict.items.grid.get_field("expense_account").get_query = function () {
10771092
if (erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) {
10781093
return {

0 commit comments

Comments
 (0)