Simpl-Resultat/src/utils
le king fu 37b832e084
All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 1m46s
fix(import): stop a generic bank signature from claiming, and misreading, a richer file
Review finding on #330, two defects with one root cause.

Desjardins' fingerprint is date/description/montant/solde — four labels any
Canadian bank could emit — and MIN_SIGNATURE_LABELS = 4 did not deliver the
property it promised, because matching was by SUBSET. Any
Date;Description;Montant;Solde file was announced 'Format Desjardins reconnu'.
A variant built only from generic labels must now describe the header exactly;
one carrying a discriminating label (chequenumber, categorie, memo) keeps
subset matching, so extra columns stay fine once something identifies the bank.

Worse, a matched signature's single amount column short-circuited the
sparse-complementary scan instead of being arbitrated against it. A
Date;Description;Debit;Credit;Montant;Solde file reads correctly as debit/credit
before #330 and became one unsigned column after, importing every deposit as an
expense. The scan now runs first; a signature's amount column only wins when the
pair contains it — which is what RBC's genuine Cheque Number / CAD$ case needs,
and it still passes.

Refs #330

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 12:03:07 -04:00
..
amountParser.test.ts fix(import): read amounts with an anchored parser and a real debit/credit rule 2026-08-13 13:37:06 -04:00
amountParser.ts fix(import): read amounts with an anchored parser and a real debit/credit rule 2026-08-13 13:37:06 -04:00
bankSignatures.test.ts fix(import): stop a generic bank signature from claiming, and misreading, a richer file 2026-08-14 12:03:07 -04:00
bankSignatures.ts fix(import): stop a generic bank signature from claiming, and misreading, a richer file 2026-08-14 12:03:07 -04:00
chartPatterns.tsx feat: add chart patterns, context menu, and import preview popup (v0.2.3) 2026-02-13 23:55:19 +00:00
collapsibleRows.test.ts feat(reports): collapse category hierarchy at every level (socle + 3 reports) 2026-07-15 20:58:18 -04:00
collapsibleRows.ts feat(reports): collapse category hierarchy at every level (socle + 3 reports) 2026-07-15 20:58:18 -04:00
csvAutoDetect.test.ts feat(import): recognise known bank layouts and report format drift 2026-08-13 14:54:46 -04:00
csvAutoDetect.ts fix(import): veto a labelled description column that behaves like an enum 2026-08-14 12:02:59 -04:00
dateParser.ts fix: reload column headers on config change and add YYYYMMDD date format 2026-02-08 04:08:33 +00:00
dateRange.test.ts test: add unit tests for dateRange.ts utility 2026-03-10 23:05:32 -04:00
dateRange.ts fix: address reviewer feedback (#31) 2026-03-10 18:53:31 -04:00
headerDictionary.test.ts feat(import): detect transaction columns by header label 2026-08-13 13:58:02 -04:00
headerDictionary.ts feat(import): detect transaction columns by header label 2026-08-13 13:58:02 -04:00
importFormat.test.ts fix(import): fail a row whose amount cell is unreadable beside a 0,00 sibling 2026-08-14 12:02:52 -04:00
importFormat.ts fix(import): fail a row whose amount cell is unreadable beside a 0,00 sibling 2026-08-14 12:02:52 -04:00
referencePeriod.test.ts feat(reports/highlights): default reference month to previous month + YTD current year, user-changeable (#106) 2026-04-19 08:28:30 -04:00
referencePeriod.ts feat(reports/highlights): default reference month to previous month + YTD current year, user-changeable (#106) 2026-04-19 08:28:30 -04:00
renderCategoryLabel.test.ts feat(balance): account form vehicle field + category rename via custom_label (#203) 2026-06-01 20:50:40 -04:00
renderCategoryLabel.ts feat(balance): account form vehicle field + category rename via custom_label (#203) 2026-06-01 20:50:40 -04:00
reorderRows.ts feat(reports): hierarchical real-vs-real compare with subtotals 2026-07-04 17:32:38 -04:00
sqlFilters.test.ts feat(reports): plumb accountIds[] account filter into 7 report services 2026-07-11 15:15:37 -04:00
sqlFilters.ts feat(reports): plumb accountIds[] account filter into 7 report services 2026-07-11 15:15:37 -04:00