mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 11:13:32 +00:00
fix: add missing stock entry UOM filtering based on item master (#50135)
Co-authored-by: rehansari26 <rehan.ansari@cloverinfotech.com>
(cherry picked from commit 7baf6ec3d6)
This commit is contained in:
@@ -1073,6 +1073,21 @@ erpnext.stock.StockEntry = class StockEntry extends erpnext.stock.StockControlle
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.frm.set_query("uom", "items", function (doc, cdt, cdn) {
|
||||||
|
let row = locals[cdt][cdn];
|
||||||
|
|
||||||
|
if (!row.item_code) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
query: "erpnext.controllers.queries.get_item_uom_query",
|
||||||
|
filters: {
|
||||||
|
item_code: row.item_code,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
this.frm.fields_dict.items.grid.get_field("expense_account").get_query = function () {
|
this.frm.fields_dict.items.grid.get_field("expense_account").get_query = function () {
|
||||||
if (erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) {
|
if (erpnext.is_perpetual_inventory_enabled(me.frm.doc.company)) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user