fix: batch based item price not working (#43172)
This commit is contained in:
@@ -1512,6 +1512,31 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
}
|
||||
}
|
||||
|
||||
batch_no(frm, cdt, cdn) {
|
||||
let row = locals[cdt][cdn];
|
||||
if (row.use_serial_batch_fields && row.batch_no) {
|
||||
var params = this._get_args(row);
|
||||
params.batch_no = row.batch_no;
|
||||
params.uom = row.uom;
|
||||
|
||||
frappe.call({
|
||||
method: "erpnext.stock.get_item_details.get_batch_based_item_price",
|
||||
args: {
|
||||
params: params,
|
||||
item_code: row.item_code,
|
||||
},
|
||||
callback: function(r) {
|
||||
if (!r.exc && r.message) {
|
||||
row.price_list_rate = r.message;
|
||||
row.rate = r.message;
|
||||
refresh_field("rate", row.name, row.parentfield);
|
||||
refresh_field("price_list_rate", row.name, row.parentfield);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
toggle_item_grid_columns(company_currency) {
|
||||
const me = this;
|
||||
// toggle columns
|
||||
|
||||
Reference in New Issue
Block a user