Hi,all I am try an item which has default UOM in bags as it selling in bags and i set the conversion with kg i.e 1bags=25 kg…in Sales Invoice item table i take bags quantity with kg rate
and changed the conversion from bags to kg so its conversion factor calculates its quantity i.e
bags *kg(25)
But the the amount is not getting changed acoording to that conversed quantity.
need help with custom script i tried this.
frappe.ui.form.on(“Sales Invoice”,“validate”, function(frm,cdt,cdn){
conversion_factor: function(frm,cdt,cdn){
d = locals[cdt][cdn]
amount = d.qty * d.conversion_factor*d.rate
frappe.model.set_value(cdt, cdn, “amount”,amount);
}
});