From 3f3fd20b31dfba428ad5e9cba40be4bf44cb5982 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 7 Oct 2025 09:49:10 +0530 Subject: [PATCH] fix: warning message if the batch has incorrect qty (cherry picked from commit 870181de87933d3adfc4b5647b91eeaefa491fa3) --- erpnext/stock/serial_batch_bundle.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index 5d3a56fa652..4c30f249ccf 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -1363,11 +1363,12 @@ def get_batch_current_qty(batch): def throw_negative_batch_validation(batch_no, qty): - frappe.throw( - _("The Batch {0} has negative quantity {1}. Please correct the quantity.").format( - bold(batch_no), bold(qty) - ), - title=_("Negative Batch Quantity"), + frappe.msgprint( + _( + "The Batch {0} has negative batch quantity {1}. To fix this, go to the batch and click on Recalculate Batch Qty. If the issue still persists, create an inward entry." + ).format(bold(get_link_to_form("Batch", batch_no)), bold(qty)), + title=_("Warning!"), + indicator="orange", )