Skip to content

Commit

Permalink
refactor: better err msg on clearance tool
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Aug 26, 2024
1 parent 930286e commit 092411b
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 092411b

Please sign in to comment.