I want to chage tha lable of rate to rental in Quotation
you can change this from customize Form,
change the label and then export it
i want to change when item change
what exactly are you saying??
on what change you want to change label??
if you want to change when item change, so on which item, there should be some common factor.
and yes, it is possible to change label through coding
Please check it.
frappe.ui.form.on("Quotation Item", {
item_code: function(frm, cdt, cdn) {
var row = locals[cdt][cdn];
if (row.item_code == "Rental Item") {
setTimeout(() => {
frm.fields_dict['items'].grid.update_docfield_property(
'rate', 'label', 'Rental'
);
}, 50);
}
}
});
You can update the item code based on the scenario. However, if you add an else
condition, it will reset when another item is selected.
1 Like