Bug 458552 - A matched transaction's splits should not be pre-populated if they don't match the amount of the main transaction
Summary: A matched transaction's splits should not be pre-populated if they don't matc...
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: ux-ui (show other bugs)
Version: git (master)
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-31 14:11 UTC by Dawid Wróbel
Modified: 2022-08-31 14:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dawid Wróbel 2022-08-31 14:11:20 UTC
SUMMARY
For a while now, whenever KMM matches an imported transaction, it also copies the splits. However, this should not be done if the total amount of splits is different than the amount of the transaction.

STEPS TO REPRODUCE
1. Add/import a transaction
2. Edit its splits
3. Import a transaction that matches transaction 1), but has a different amount


OBSERVED RESULT
Notice that the newly-imported transaction's splits are pre-filled with those of the matched 1) transaction, but their sum is off, which is also denoted by the exclamation mark icon.

EXPECTED RESULT
If the amount of transaction differs from that of the matched transaction, splits should not be imported. 
What's worth considering is that if more than a single transaction can be matched against, the logic should match against the one that has a matching amount, if any does. In this case the splits would be copied as the split totals would match. 

This affects stable branch as well, if I remember correctly.