refactor: better err msg on clearance tool
(cherry picked from commit 092411b54f)
# Conflicts:
# erpnext/accounts/doctype/bank_clearance/bank_clearance.py
This commit is contained in:
@@ -6,7 +6,12 @@ import frappe
|
|||||||
from frappe import _, msgprint
|
from frappe import _, msgprint
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.query_builder.custom import ConstantColumn
|
from frappe.query_builder.custom import ConstantColumn
|
||||||
|
<<<<<<< HEAD
|
||||||
from frappe.utils import flt, fmt_money, getdate
|
from frappe.utils import flt, fmt_money, getdate
|
||||||
|
=======
|
||||||
|
from frappe.utils import flt, fmt_money, get_link_to_form, getdate
|
||||||
|
from pypika import Order
|
||||||
|
>>>>>>> 092411b54f (refactor: better err msg on clearance tool)
|
||||||
|
|
||||||
import erpnext
|
import erpnext
|
||||||
|
|
||||||
@@ -210,8 +215,11 @@ class BankClearance(Document):
|
|||||||
|
|
||||||
if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
|
if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Row #{0}: Clearance date {1} cannot be before Cheque Date {2}").format(
|
_("Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3}").format(
|
||||||
d.idx, d.clearance_date, d.cheque_date
|
d.idx,
|
||||||
|
get_link_to_form(d.payment_document, d.payment_entry),
|
||||||
|
d.clearance_date,
|
||||||
|
d.cheque_date,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user