Merge pull request #21389 from marination/stock-entry-qty
fix: Issues on qty trigger in Stock Entry Detail
This commit is contained in:
commit
733b47c5e6
@ -312,10 +312,9 @@ frappe.ui.form.on('Stock Entry', {
|
||||
callback: function(r) {
|
||||
if (!r.exe && r.message){
|
||||
frappe.model.set_value(cdt, cdn, "serial_no", r.message);
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -511,9 +510,10 @@ frappe.ui.form.on('Stock Entry', {
|
||||
item.amount = flt(item.basic_amount + flt(item.additional_cost),
|
||||
precision("amount", item));
|
||||
|
||||
item.valuation_rate = flt(flt(item.basic_rate)
|
||||
+ (flt(item.additional_cost) / flt(item.transfer_qty)),
|
||||
precision("valuation_rate", item));
|
||||
if (flt(item.transfer_qty)) {
|
||||
item.valuation_rate = flt(flt(item.basic_rate) + (flt(item.additional_cost) / flt(item.transfer_qty)),
|
||||
precision("valuation_rate", item));
|
||||
}
|
||||
}
|
||||
|
||||
refresh_field('items');
|
||||
|
Loading…
Reference in New Issue
Block a user