From 39da92929b03585738509a76147c7cbff78feb03 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 7 Apr 2023 11:21:01 +0530 Subject: [PATCH] fix: serial and batch selector --- erpnext/public/js/controllers/transaction.js | 2 ++ erpnext/public/js/utils/serial_no_batch_selector.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index b10898abbd..2c8e50cd8c 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -524,6 +524,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe if (r.message && (r.message.has_batch_no || r.message.has_serial_no)) { frappe.flags.hide_serial_batch_dialog = false; + } else { + show_batch_dialog = false; } }); }, diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 0e0ef33837..382ae2c964 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -29,6 +29,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { primary_action: () => this.update_ledgers() }); + this.dialog.set_value("qty", this.item.qty); this.dialog.show(); } @@ -127,7 +128,6 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { { fieldtype: 'Float', fieldname: 'qty', - default: this.item.qty || 0, label: __('Qty to Fetch'), onchange: () => this.get_auto_data() },