fix: batch based item price not working (#43172)

This commit is contained in:
rohitwaghchaure
2024-09-13 12:03:36 +05:30
committed by GitHub
parent 2b96e37c34
commit d9e4ed13cb
2 changed files with 47 additions and 3 deletions

View File

@@ -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