فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

fix(A02): fail closed on unsupported canonical mapping keys

davoodmehraban89 committed Oct 18, 2026 at 11:13 UTC 70ec050f895fc25f582c84e2b24630e3f50202e7
1 file changed +3
src/core/HolooDelimitedExportPreflight.mjs
+3
@@ -180,6 +180,9 @@ export function previewHolooDelimitedExport({
180 !validMap(mappings[table])) reject('CSV_TABLE_CONFIGURATION_REQUIRED');
181 const parsed = parseStrictDelimitedRows(item.text, { delimiter: item.delimiter });
182 const mapped = mappings[table];
183 + const allowedFields = new Set(['sourceId', 'name', 'contactId', 'invoiceId', 'productId', ...COLUMNS[table]]);
184 + if (Object.keys(mapped).some(field => !allowedFields.has(field)))
185 + reject('CSV_UNSUPPORTED_CANONICAL_FIELD');
186 const mappedColumns = Object.values(mapped);
187 // Mapping two canonical fields to one source column is ambiguous for
188 // financial reconciliation, even when the source headers are unique.