Amount Field in Opportunity Item

We want to add Amount (=Qty x rate) field in Opportunity Item. Kindly advise how can we add this (where to add the formula).

Could someone suggest what would be the custom script.

Thank you in advance.

1 Like

@Daven_Shah, why not use the Quotation?

We want to update Opportunity Value (Custom field). By which we prioritize opportunities.


frappe.ui.form.on("Opportunity Item", "qty", function(frm, cdt, cdn){
    var d = locals[cdt][cdn];
    frappe.model.set_value(cdt, cdn, "amount", d.qty * d.amount);
1 Like

Thank you @max_morais_dmm

Where to put above code?

Setup > Customize > Custom Script > New

Doctype = Opportunity

1 Like