fix: Hide serial and batch selector in Stock Entry
This commit is contained in:
parent
f114da2f67
commit
2d86eb3ab1
@ -100,6 +100,13 @@ frappe.ui.form.on('Stock Entry', {
|
||||
|
||||
frm.add_fetch("bom_no", "inspection_required", "inspection_required");
|
||||
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
|
||||
|
||||
frappe.db.get_single_value('Stock Settings', 'disable_serial_no_and_batch_selector')
|
||||
.then((value) => {
|
||||
if (value) {
|
||||
frappe.flags.hide_serial_batch_dialog = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
setup_quality_inspection: function(frm) {
|
||||
@ -721,7 +728,8 @@ frappe.ui.form.on('Stock Entry Detail', {
|
||||
no_batch_serial_number_value = !d.batch_no;
|
||||
}
|
||||
|
||||
if (no_batch_serial_number_value) {
|
||||
console.log(frappe.flags.hide_serial_batch_dialog, "$#$#$#");
|
||||
if (no_batch_serial_number_value && !frappe.flags.hide_serial_batch_dialog) {
|
||||
erpnext.stock.select_batch_and_serial_no(frm, d);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user