Files
WYGIWYH/app
Asish Kumar 70be7b3161 fix(import): make QIF deduplication account-aware and keep identical transactions
QIF imports deduplicate each transaction by storing a SHA-256 of its raw
lines as the transaction's internal_id and skipping rows whose hash is
already taken. The hash didn't include the account, which broke two
cases:

- Importing the same file into two accounts (possible since the account
  can be picked per run) skipped every row of the second import.
- Two real transactions with the same date, amount and payee in one file
  hashed to the same ID, so the second one was always dropped.

The internal ID now hashes the account's ID and the transaction's
occurrence (how many identical transactions came before it in the file)
together with the raw lines. Using the occurrence instead of the
position in the file keeps the IDs stable when a later export of the
same statement has more transactions before or between the repeated
ones.

Transactions imported before this change keep their old IDs. So that
re-importing an old file doesn't duplicate them, the first occurrence
of a transaction is also matched against the previous hash, limited to
the account being imported into. Repeats of identical transactions,
which the old hash always skipped, are imported now.

The duplicate check also looks at soft-deleted transactions, like the
CSV/Excel deduplication does. internal_id is unique, so a soft-deleted
transaction with the same ID used to fail the import with an integrity
error instead of being skipped.

Fixes #671
2026-11-12 15:44:27 +05:30
..
2024-09-26 11:00:40 -03:00
2024-09-26 11:00:40 -03:00