Builds the imported_id for the Nth identical charge within one batch.
Two genuinely distinct transactions can share date, amount and description
— an ordinary double charge at the same merchant. Hashing content alone
gave both the same id, so Actual Budget rejected the second as a duplicate
and the user silently lost a real transaction.
Occurrence 0 deliberately hashes the bare content key, so every id ever
written stays valid: rows already in a ledger keep matching and no history
is re-imported.
Later copies hash ${hash(contentKey)}|#N rather than ${contentKey}|#N.
Suffixing the raw key would be ambiguous: a charge whose description ends
in |#1 would, at occurrence 0, produce the same seed as its neighbour at
occurrence 1. Hashing first removes that overlap by construction — a
content key always carries the three pipes of its four fields, while the
derived seed carries exactly one.
Builds the
imported_idfor the Nth identical charge within one batch.Two genuinely distinct transactions can share date, amount and description — an ordinary double charge at the same merchant. Hashing content alone gave both the same id, so Actual Budget rejected the second as a duplicate and the user silently lost a real transaction.
Occurrence 0 deliberately hashes the bare content key, so every id ever written stays valid: rows already in a ledger keep matching and no history is re-imported.
Later copies hash
${hash(contentKey)}|#Nrather than${contentKey}|#N. Suffixing the raw key would be ambiguous: a charge whose description ends in|#1would, at occurrence 0, produce the same seed as its neighbour at occurrence 1. Hashing first removes that overlap by construction — a content key always carries the three pipes of its four fields, while the derived seed carries exactly one.