Bug 479451

Summary: net zero split transactions: split values change sign when edited
Product: [Applications] kmymoney Reporter: josephoswald
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.1.2   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: kmymoney-master-3014-linux-gcc
Sentry Crash Report:
Attachments: File showing bad split
CSV format
Split editor in master version showing deposits and payments

Description josephoswald 2024-01-05 23:53:03 UTC
Created attachment 164697 [details]
File showing bad split

SUMMARY

Sometimes my company issues me paychecks which are net zero.
For example: My bonus is completely exhausted by 401(k) contributions.

STEPS TO REPRODUCE

So I enter a Deposit which is something like
Deposit: $0
  Wages&Salary $20
  Retirement contributions -$10
  Taxes:Federal -$5
  Taxes:SS -$5

OBSERVED RESULT

When I later edit the split transaction, the signs of all the values are often reversed:

Wages&Salary -$20
Retirement +10
Taxes:Federal +5
Taxes:SS +5

EXPECTED RESULT

Expected: that the value of the split components stays the same.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  Ubuntu 22.04.3 LTS, 
(available in About System)
KDE Plasma Version:  
KDE Frameworks Version: KDE Frameworks  Version 5.92.0
Qt Version: Version 5.15.3 (built against 5.15.3)

ADDITIONAL INFORMATION
Comment 1 josephoswald 2024-01-05 23:53:59 UTC
Created attachment 164698 [details]
CSV format
Comment 2 Thomas Baumgart 2024-01-06 08:01:54 UTC
Created attachment 164700 [details]
Split editor in master version showing deposits and payments

A cause for this might be the fact, that expenses are represented as positive values and income as negative ones.  The whole problem has been addresses in the current development version (see screenshot) by showing separate columns for deposits and payments.
Comment 3 josephoswald 2024-01-21 22:04:36 UTC
I can confirm that a recent build kmymoney-master-3014-linux-gcc-x86_64.AppImage with the deposit/payment split fixes this issue.