mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
refactor: set 'cannot_add_rows' directly in the allocations table field (optimized approach)
This commit is contained in:
@@ -100,6 +100,7 @@ erpnext.accounts.unreconcile_payment = {
|
|||||||
fieldtype: "Table",
|
fieldtype: "Table",
|
||||||
read_only: 1,
|
read_only: 1,
|
||||||
fields: child_table_fields,
|
fields: child_table_fields,
|
||||||
|
cannot_add_rows: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -119,14 +120,6 @@ erpnext.accounts.unreconcile_payment = {
|
|||||||
return r.message;
|
return r.message;
|
||||||
};
|
};
|
||||||
|
|
||||||
const allocationsTableField = unreconcile_dialog_fields.find(
|
|
||||||
(field) => field.fieldname === "allocations"
|
|
||||||
);
|
|
||||||
|
|
||||||
if (allocationsTableField) {
|
|
||||||
allocationsTableField.cannot_add_rows = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
let d = new frappe.ui.Dialog({
|
let d = new frappe.ui.Dialog({
|
||||||
title: "UnReconcile Allocations",
|
title: "UnReconcile Allocations",
|
||||||
fields: unreconcile_dialog_fields,
|
fields: unreconcile_dialog_fields,
|
||||||
|
|||||||
Reference in New Issue
Block a user