fix: duplicate serial and batch bundle in stock entry and stock reco
This commit is contained in:
@@ -51,38 +51,7 @@ $.extend(erpnext, {
|
||||
},
|
||||
|
||||
setup_serial_or_batch_no: function () {
|
||||
let grid_row = cur_frm.open_grid_row();
|
||||
if (
|
||||
!grid_row ||
|
||||
!grid_row.grid_form.fields_dict.serial_no ||
|
||||
grid_row.grid_form.fields_dict.serial_no.get_status() !== "Write"
|
||||
)
|
||||
return;
|
||||
|
||||
frappe.model.get_value(
|
||||
"Item",
|
||||
{ name: grid_row.doc.item_code },
|
||||
["has_serial_no", "has_batch_no"],
|
||||
({ has_serial_no, has_batch_no }) => {
|
||||
Object.assign(grid_row.doc, { has_serial_no, has_batch_no });
|
||||
|
||||
if (has_serial_no) {
|
||||
attach_selector_button(
|
||||
__("Add Serial No"),
|
||||
grid_row.grid_form.fields_dict.serial_no.$wrapper,
|
||||
this,
|
||||
grid_row
|
||||
);
|
||||
} else if (has_batch_no) {
|
||||
attach_selector_button(
|
||||
__("Pick Batch No"),
|
||||
grid_row.grid_form.fields_dict.batch_no.$wrapper,
|
||||
this,
|
||||
grid_row
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
// Deprecated in v15
|
||||
},
|
||||
|
||||
route_to_adjustment_jv: (args) => {
|
||||
|
||||
Reference in New Issue
Block a user