Skip to content

Commit

Permalink
fix: only show serial no batch selector only once
Browse files Browse the repository at this point in the history
(cherry picked from commit 0f87d32)
  • Loading branch information
shariquerik authored and mergify[bot] committed Nov 29, 2022
1 parent e093c32 commit 8d0f715
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion erpnext/stock/doctype/stock_entry/stock_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,8 @@ erpnext.stock.select_batch_and_serial_no = (frm, item) => {
if (frm.doc.purpose === 'Material Receipt') return;

frappe.require("assets/erpnext/js/utils/serial_no_batch_selector.js", function() {
new erpnext.SerialNoBatchSelector({
if (frm.batch_selector?.dialog?.display) return;
frm.batch_selector = new erpnext.SerialNoBatchSelector({
frm: frm,
item: item,
warehouse_details: get_warehouse_type_and_name(item),
Expand Down

0 comments on commit 8d0f715

Please sign in to comment.