Skip to content

Commit

Permalink
Merge pull request #39950 from frappe/mergify/bp/version-15-hotfix/pr…
Browse files Browse the repository at this point in the history
…-39943

refactor: use popup to inform on additional reconciliation step for Cr/Dr Notes (backport #39943)
  • Loading branch information
ruthra-kumar authored Feb 19, 2024
2 parents 0b7a953 + ce11180 commit a2a5b34
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,18 @@ def validate(self):
)
)

if self.get("is_return") and self.get("return_against"):
document_type = "Credit Note" if self.doctype == "Sales Invoice" else "Debit Note"
frappe.msgprint(
_(
"{0} will be treated as a standalone {0}. Post creation use {1} tool to reconcile against {2}."
).format(
document_type,
get_link_to_form("Payment Reconciliation", "Payment Reconciliation"),
get_link_to_form(self.doctype, self.get("return_against")),
)
)

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)):
self.set_advances()
Expand Down

0 comments on commit a2a5b34

Please sign in to comment.