diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index f15ac1257b..6367e3cb6a 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -454,12 +454,12 @@ def check_credit_limit(customer, company, ignore_outstanding_sales_order=False,
customer_outstanding += flt(extra_amount)
if credit_limit > 0 and flt(customer_outstanding) > credit_limit:
- msgprint(
- _("Credit limit has been crossed for customer {0} ({1}/{2})").format(
- customer, customer_outstanding, credit_limit
- )
+ message = _("Credit limit has been crossed for customer {0} ({1}/{2})").format(
+ customer, customer_outstanding, credit_limit
)
+ message += "
"
+
# If not authorized person raise exception
credit_controller_role = frappe.db.get_single_value("Accounts Settings", "credit_controller")
if not credit_controller_role or credit_controller_role not in frappe.get_roles():
@@ -480,7 +480,7 @@ def check_credit_limit(customer, company, ignore_outstanding_sales_order=False,
"