Bug 456086

Summary: Statement date of imported statement is in the future
Product: [Applications] kmymoney Reporter: Thomas Baumgart <tbaumgart>
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.2
Sentry Crash Report:

Description Thomas Baumgart 2022-06-28 15:25:27 UTC
In case a statement does not provide a statement date and a transaction is included that has a post date in the future (some banks do that occasionally) the statement date is falsely set to that date.

STEPS TO REPRODUCE
1. Import statement without statement date but transaction in the future

OBSERVED RESULT
Statement date is set to be in the future

EXPECTED RESULT
Statement date is taken from the newest transaction not being in the future
Comment 1 Thomas Baumgart 2022-06-28 15:34:18 UTC
Git commit 76c861ca244045bf2b55a31a193def7d95d8b142 by Thomas Baumgart.
Committed on 28/06/2022 at 15:33.
Pushed by tbaumgart into branch '5.1'.

Don't treat post dates in the future as statement date

In case an imported statement does not provide a statement date it is
derived by using the newest post date of the transactions. It should not
be used though if that is in the future.
FIXED-IN 5.1.3

(cherry picked from commit 47d100b4cd841b999539db1d78ef9a3afe1141fa)

M  +5    -1    kmymoney/mymoney/mymoneystatement.cpp

https://invent.kde.org/office/kmymoney/commit/76c861ca244045bf2b55a31a193def7d95d8b142