fix: do not reset the basic rate for the material receipt stock entry (#38896) (cherry picked from commit 98bfcc4c758b61f714c53ea0f00246731a30fdaf) Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
parent
135aced98e
commit
f6eb2b521d
@ -512,7 +512,12 @@ frappe.ui.form.on('Stock Entry', {
|
|||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if (!r.exc) {
|
if (!r.exc) {
|
||||||
["actual_qty", "basic_rate"].forEach((field) => {
|
let fields = ["actual_qty", "basic_rate"];
|
||||||
|
if (frm.doc.purpose == "Material Receipt") {
|
||||||
|
fields = ["actual_qty"];
|
||||||
|
}
|
||||||
|
|
||||||
|
fields.forEach((field) => {
|
||||||
frappe.model.set_value(cdt, cdn, field, (r.message[field] || 0.0));
|
frappe.model.set_value(cdt, cdn, field, (r.message[field] || 0.0));
|
||||||
});
|
});
|
||||||
frm.events.calculate_basic_amount(frm, child);
|
frm.events.calculate_basic_amount(frm, child);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user