Sales Invoice MRP Rate Fetch to Rate

Can anyone assist me in providing me a Client Script of Frappe ERPNext based on the below points.

  1. Created a Custom Field in the Sales Invoice Item Child Table of the Sales Invoice Doc Type as “MRP”, field name(“mrp”). This value is getting fetched from the MRP from the Item Master Defined
  2. The Value in the MRP should fetch the same value in the “Rate” (field name “rate”)in the Sales Invoice Item Child Table before saving and it should override the Price List (Field Name:selling_price_list) if any

Hi @jitendra,

That for, please apply the client script.

If the MRP and Price List Rate are not the same then first set the MRP on the Price List Rate to save time.

frappe.ui.form.on('Sales Order', {
    validate: function (frm) {
        $.each(frm.doc.items, function (i, d) {
            if (d.mrp != d.price_list_rate) {
                frappe.model.set_value(d.doctype,, 'price_list_rate', d.mrp);

Then enable the feature in Stock SettingUpdate Existing Price List Rate

When enabled it then when you submit the Sales Order, the Price List Rate will update in Item Price DocType.

Due to some reason currently feature is not working in Version 14.

Once it resolves the issue, your scenario will fulfill that.

Please check your field name and set it script.
I hope this helps.

Thank You!

@NCP. Always ready for Help.
:pray: :pray: :pray: