feat: allow UOMs to select for which converstion rate defined in item master

This commit is contained in:
Rohit Waghchaure
2025-03-31 15:53:55 +05:30
parent 646cf54679
commit b1dfbbe85e
4 changed files with 59 additions and 2 deletions

View File

@@ -150,6 +150,19 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
});
}
if (this.frm.fields_dict["items"].grid.get_field("uom")) {
this.frm.set_query("uom", "items", function(doc, cdt, cdn) {
let row = locals[cdt][cdn];
return {
query: "erpnext.controllers.queries.get_item_uom_query",
filters: {
"item_code": row.item_code
}
};
});
}
if(
this.frm.docstatus < 2
&& this.frm.fields_dict["payment_terms_template"]