diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js
index 9161903ba7f..0f84a84e300 100644
--- a/erpnext/public/js/utils/serial_no_batch_selector.js
+++ b/erpnext/public/js/utils/serial_no_batch_selector.js
@@ -670,6 +670,27 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate {
frappe.throw(__("Rejected Warehouse and Accepted Warehouse cannot be same."));
}
+ let qty_to_fetch = flt(this.dialog.get_value("qty"));
+ let total_qty = entries.reduce((total, row) => total + (flt(row.qty) || 1.0), 0);
+
+ if (flt(total_qty, 6) !== flt(qty_to_fetch, 6)) {
+ const confirm_dialog = frappe.confirm(
+ __(
+ "Total qty of the rows ({0}) does not match the Qty to Fetch ({1}). Qty of the item will be changed to {0}. Are you sure want to proceed?",
+ [format_number(total_qty), format_number(qty_to_fetch)]
+ ),
+ () => this.create_bundle_entries(entries, warehouse)
+ );
+ confirm_dialog.indicator = "blue";
+ confirm_dialog.set_indicator();
+
+ return;
+ }
+
+ this.create_bundle_entries(entries, warehouse);
+ }
+
+ create_bundle_entries(entries, warehouse) {
frappe
.call({
method: "erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle.add_serial_batch_ledgers",