Merge pull request #21037 from rohitwaghchaure/fixed_batch_selector_popup_develop
fix: batch selection popup not coming for stock entry
This commit is contained in:
commit
b6bb56e9bf
@ -313,11 +313,15 @@ erpnext.SerialNoBatchSelector = Class.extend({
|
|||||||
frappe.throw(__(`Batch ${val} already selected.`));
|
frappe.throw(__(`Batch ${val} already selected.`));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let batch_number = me.item.batch_no ||
|
||||||
|
this.grid_row.on_grid_fields_dict.batch_no.get_value();
|
||||||
|
|
||||||
if (me.warehouse_details.name) {
|
if (me.warehouse_details.name) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: 'erpnext.stock.doctype.batch.batch.get_batch_qty',
|
method: 'erpnext.stock.doctype.batch.batch.get_batch_qty',
|
||||||
args: {
|
args: {
|
||||||
batch_no: me.item.batch_no,
|
batch_no: batch_number,
|
||||||
warehouse: me.warehouse_details.name,
|
warehouse: me.warehouse_details.name,
|
||||||
item_code: me.item_code
|
item_code: me.item_code
|
||||||
},
|
},
|
||||||
|
|||||||
@ -60,7 +60,8 @@ frappe.ui.form.on('Stock Entry', {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(item.s_warehouse) filters["warehouse"] = item.s_warehouse;
|
filters["warehouse"] = item.s_warehouse || item.t_warehouse;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
query : "erpnext.controllers.queries.get_batch_no",
|
query : "erpnext.controllers.queries.get_batch_no",
|
||||||
filters: filters
|
filters: filters
|
||||||
@ -964,7 +965,7 @@ erpnext.stock.select_batch_and_serial_no = (frm, item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(item && !item.has_serial_no && item.has_batch_no) return;
|
if(item && !item.has_serial_no && !item.has_batch_no) return;
|
||||||
if (frm.doc.purpose === 'Material Receipt') return;
|
if (frm.doc.purpose === 'Material Receipt') return;
|
||||||
|
|
||||||
frappe.require("assets/erpnext/js/utils/serial_no_batch_selector.js", function() {
|
frappe.require("assets/erpnext/js/utils/serial_no_batch_selector.js", function() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user