chore: better popup message

This commit is contained in:
ruthra kumar
2024-03-13 11:03:56 +05:30
parent ce3b1f09f5
commit 445d2acf50

View File

@@ -218,17 +218,18 @@ class AccountsController(TransactionBase):
) )
if self.get("is_return") and self.get("return_against") and not self.get("is_pos"): if self.get("is_return") and self.get("return_against") and not self.get("is_pos"):
document_type = "Credit Note" if self.doctype == "Sales Invoice" else "Debit Note" if self.get("update_outstanding_for_self"):
frappe.msgprint( document_type = "Credit Note" if self.doctype == "Sales Invoice" else "Debit Note"
_( frappe.msgprint(
"{0} will be treated as a standalone {0}. If you want {1}'s outstanding to be updated, uncheck {2} checkbox. <br><br> Or you can use {3} tool to reconcile against {1} later." _(
).format( "We can see {0} is made against {1}. If you want {1}'s outstanding to be updated, uncheck '{2}' checkbox. <br><br> Or you can use {3} tool to reconcile against {1} later."
document_type, ).format(
get_link_to_form(self.doctype, self.get("return_against")), frappe.bold(document_type),
frappe.bold("Update Outstanding for Self"), get_link_to_form(self.doctype, self.get("return_against")),
get_link_to_form("Payment Reconciliation"), frappe.bold("Update Outstanding for Self"),
get_link_to_form("Payment Reconciliation"),
)
) )
)
pos_check_field = "is_pos" if self.doctype == "Sales Invoice" else "is_paid" pos_check_field = "is_pos" if self.doctype == "Sales Invoice" else "is_paid"
if cint(self.allocate_advances_automatically) and not cint(self.get(pos_check_field)): if cint(self.allocate_advances_automatically) and not cint(self.get(pos_check_field)):