fix: correctly set 'cannot_add_rows' property on allocations table field

(cherry picked from commit 13ca2700f8)
This commit is contained in:
UmakanthKaspa
2024-11-14 20:15:20 +05:30
committed by Mergify
parent 5452f8ac4a
commit 137ef78d96

View File

@@ -119,11 +119,18 @@ erpnext.accounts.unreconcile_payment = {
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({
title: "UnReconcile Allocations",
fields: unreconcile_dialog_fields,
size: "large",
cannot_add_rows: true,
primary_action_label: "UnReconcile",
primary_action(values) {
let selected_allocations = values.allocations.filter((x) => x.__checked);