chore: better popup message

(cherry picked from commit 445d2acf50)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
This commit is contained in:
ruthra kumar
2024-03-13 11:03:56 +05:30
committed by Mergify
parent b746493830
commit ae6d1c14cb

View File

@@ -203,6 +203,7 @@ class AccountsController(TransactionBase):
)
if self.get("is_return") and self.get("return_against") and not self.get("is_pos"):
<<<<<<< HEAD
document_type = "Credit Note" if self.doctype == "Sales Invoice" else "Debit Note"
frappe.msgprint(
_(
@@ -216,8 +217,20 @@ class AccountsController(TransactionBase):
get_link_to_form(self.doctype, self.get("return_against")),
frappe.bold("Update Outstanding for Self"),
get_link_to_form("Payment Reconciliation"),
=======
if self.get("update_outstanding_for_self"):
document_type = "Credit Note" if self.doctype == "Sales Invoice" else "Debit Note"
frappe.msgprint(
_(
"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."
).format(
frappe.bold(document_type),
get_link_to_form(self.doctype, self.get("return_against")),
frappe.bold("Update Outstanding for Self"),
get_link_to_form("Payment Reconciliation"),
)
>>>>>>> 445d2acf50 (chore: better popup message)
)
)
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)):