[kmymoney] [Bug 501815] New: In credit account the "Online Balance" bar is red even when account and online balances are equal
    yzg 
    bugzilla_noreply at kde.org
       
    Fri Mar 21 01:24:24 GMT 2025
    
    
  
https://bugs.kde.org/show_bug.cgi?id=501815
            Bug ID: 501815
           Summary: In credit account the "Online Balance" bar is red even
                    when account and online balances are equal
    Classification: Applications
           Product: kmymoney
           Version: 5.1.92
          Platform: Gentoo Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kmymoney-devel at kde.org
          Reporter: email200202 at yahoo.com
  Target Milestone: ---
SUMMARY
After kmymoney update to 5.1.92, the credit account "Online Balance" bar became
red color (error indication) even the account balance and online balances are
equal.
NOTE: 
This problem affects only the credit account. Other accounts types are behaving
as expected.
Looking at the source code:
file: kmymoney/views/onlinebalancedelegate.cpp
function:  OnlineBalanceDelegate::paint()
I printed the values used in the condition
KColorScheme::BackgroundRole role = (accountBalance == onlineBalanceValue) ?
KColorScheme::PositiveBackground : KColorScheme::NegativeBackground;
qDebug() << "accountBalance    = " << accountBalance << "\n";
qDebug() << "onlineBalanceValue= " << onlineBalanceValue << "\n";
When I opened the credit account, I got the output:
accountBalance    =  -1423.76 "-35594/25" 
onlineBalanceValue=  1423.76 "35594/25" 
The problem is the negative sign of the account balance.
STEPS TO REPRODUCE
1. Update to version 5.1.92
2. Import bank transactions for a credit account using OFX
OBSERVED RESULT
The "Online Balance" bar is red even if the account and online balances are the
same
EXPECTED RESULT
The "Online Balance" bar should be green if the account and online balances are
the same
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 5.116.0
Qt Version: 5.15.16
ADDITIONAL INFORMATION
This function used to work as expected in version 5.1.3 before the update to
5.1.92
-- 
You are receiving this mail because:
You are the assignee for the bug.
    
    
More information about the KMyMoney-devel
mailing list