fix: Document Name link validation in Bank Reconciliation Tool (#36495)
fix: format_row broke Document Name link validation #35540 broke Voucher Matching, leading to an invalid link exception on submission. This is because the format_row() function overwrites the row data instead of just providing a formatter on the DataTable column, and therefore passes through the formatted (linked) column data instead of the Document Name only. This patch moves the appropriate frappe.form.formatters.Link function to a dedicated format hook on the DataTable columns definition, both fixing the error and retaining the functionality of #35540.
This commit is contained in:
parent
670d9e5556
commit
7ab55b1bb2
@ -104,6 +104,9 @@ erpnext.accounts.bank_reconciliation.DialogManager = class DialogManager {
|
||||
name: __("Document Name"),
|
||||
editable: false,
|
||||
width: 1,
|
||||
format: (value, row) => {
|
||||
return frappe.form.formatters.Link(value, {options: row[2].content});
|
||||
},
|
||||
},
|
||||
{
|
||||
name: __("Reference Date"),
|
||||
@ -132,7 +135,7 @@ erpnext.accounts.bank_reconciliation.DialogManager = class DialogManager {
|
||||
format_row(row) {
|
||||
return [
|
||||
row[1], // Document Type
|
||||
frappe.form.formatters.Link(row[2], {options: row[1]}), // Document Name
|
||||
row[2], // Document Name
|
||||
row[5] || row[8], // Reference Date
|
||||
format_currency(row[3], row[9]), // Remaining
|
||||
row[4], // Reference Number
|
||||
|
Loading…
x
Reference in New Issue
Block a user