Hi @girumtibebu,
I think you should add one more field like Line Amount.
Because you can’t override the amount field calculation.
So add two the Custom Field Like
- No of days
- Line amount
And calculation for, please apply the client script.
frappe.ui.form.on('Quotation Item', {
no_of_days: function(frm, cdt, cdn) {
var child = locals[cdt][cdn];
var lm = // set your bussiness logic in lm like -> child.qty * child.no_of_days * child.rate;
frappe.model.set_value(cdt, cdn, 'line_amount', lm);
}
});
I hope this helps.
Thank You!