OFX interpretation query

David Reiser dbreiser at icloud.com
Wed Dec 30 21:18:39 EST 2015


> On Dec 30, 2015, at 6:26 PM, A.J. Bonnema <gbonnema at xs4all.nl> wrote:
> 
> Hi all,
> 
> Sorry for the long mail. I need to explain before I can ask the question.
> 
> I created a program to convert downloaded Rabobank csv file to OFX transactions. It works admirably.
> 
> The question is transaction identification. Each OFX transaction has an XML element called FITID, probably to identify the transaction. I assumed Gnucash uses it, but I think I was wrong.
> 
> I create a FITID by constructing the FITID: date + amount + C/D. So, if I would ever have the same amount from the same source on the same date, Gnucash should identify them as duplicate. Or so I thought.
> 
> Now, I usually import data from the 1st of January until year to date. That way I get complete transactions for the current year. Gnucash correctly ignores the transactions that were already imported, so I assumed it was using the FITID from OFX.
> 
> Last september I had two identical transactions as far as date and amount are concerned with identical FITID, so I expected Gnucash to ignore one of the two transactions, but it did not!
> 
> It turns out that Gnucash processes both transactions as different posts correctly and in future imports ignores both transactions correctly.
> 
> How is that possible? Can anyone explain how this mechanism works in Gnucash?
> 
> Kind regards, Guus Bonnema.

Gnucash compares the FITID numbers of the current import batch against FITID numbers from prior batches. Once a transaction is accepted during the import process, GnuCash records internally (not viewable in the program interface) the FITID of each imported transaction.

In your case, the conflicting FITID numbers were both in the same import batch, so comparison against existing FITIDs did not show any conflicts. Gnucash imported both transactions, and presumably you now have two transactions with identical FITID entries. Oops.

You have found a hole in the importer that isn’t possible to reach with a OFX standards-compliant transaction list. One part of the specification states that a Financial Institution must ensure that all FITID’s are unique per account.

Dave
--
Dave Reiser
dbreiser at icloud.com








More information about the gnucash-user mailing list