Perfect duplicate transaction not detected
Some perfect match were not detected on fetching new operations.
All the field seem to be the same.
However in the database (see following picture), the date of transactions have the hour set to 01:00, whereas we try to always set it to
00:00 (this might be due to an exotic localtime configuration, or database setting).
The problem appears in Kresus due to this strict check over the Date in the
perfectMatch function: https://framagit.org/kresusapp/kresus/blob/master/server/lib/diff-operations.js#L15
This call to
aMoment.isSame(otherMoment) will return false if the hour is not the same in both moments. Using
aMoment.isSame(otherMoment, 'day') will avoid this kind of problem, and I think this is enough to detect perfect matches, as banks never provide the hour of a transaction, only its date.