mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 12:25:09 +00:00
fix(sales_invoice): using msgprint and removed condition checking for is_created_using_pos to refetch payment methods (#53636)
This commit is contained in:
@@ -2745,7 +2745,7 @@ def update_multi_mode_option(doc, pos_profile):
|
|||||||
payment.account = payment_mode.default_account
|
payment.account = payment_mode.default_account
|
||||||
payment.type = payment_mode.type
|
payment.type = payment_mode.type
|
||||||
|
|
||||||
mop_refetched = bool(doc.payments) and not doc.is_created_using_pos
|
mop_refetched = bool(doc.payments)
|
||||||
|
|
||||||
doc.set("payments", [])
|
doc.set("payments", [])
|
||||||
invalid_modes = []
|
invalid_modes = []
|
||||||
@@ -2769,9 +2769,8 @@ def update_multi_mode_option(doc, pos_profile):
|
|||||||
frappe.throw(msg.format(", ".join(invalid_modes)), title=_("Missing Account"))
|
frappe.throw(msg.format(", ".join(invalid_modes)), title=_("Missing Account"))
|
||||||
|
|
||||||
if mop_refetched:
|
if mop_refetched:
|
||||||
frappe.toast(
|
frappe.msgprint(
|
||||||
_("Payment methods refreshed. Please review before proceeding."),
|
_("Payment methods refreshed. Please review before proceeding."), indicator="orange", alert=True
|
||||||
indicator="orange",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user