Skip to content

Commit

Permalink
Merge pull request #42905 from ruthra-kumar/better_err_msg_clearance_…
Browse files Browse the repository at this point in the history
…tool

refactor: better err msg on clearance tool
  • Loading branch information
ruthra-kumar authored Aug 26, 2024
2 parents 6721ae7 + 092411b commit 06e5a3f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions erpnext/accounts/doctype/bank_clearance/bank_clearance.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from frappe import _, msgprint
from frappe.model.document import Document
from frappe.query_builder.custom import ConstantColumn
from frappe.utils import flt, fmt_money, getdate
from frappe.utils import flt, fmt_money, get_link_to_form, getdate
from pypika import Order

import erpnext
Expand Down Expand Up @@ -96,8 +96,11 @@ def update_clearance_date(self):

if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
frappe.throw(
_("Row #{0}: Clearance date {1} cannot be before Cheque Date {2}").format(
d.idx, d.clearance_date, d.cheque_date
_("Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3}").format(
d.idx,
get_link_to_form(d.payment_document, d.payment_entry),
d.clearance_date,
d.cheque_date,
)
)

Expand Down

0 comments on commit 06e5a3f

Please sign in to comment.