Bug 385360

Summary: Incorrect Total Value in the Categories view
Product: [Applications] kmymoney Reporter: alen.siljak
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED NOT A BUG    
Severity: normal CC: ralf.habacker
Priority: NOR    
Version: 4.8.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: test case

Description alen.siljak 2017-10-04 14:18:43 UTC
When categories in a tree use different currencies, the Total Value column is wrong.

Example:
- set up EUR & BAM currencies, updating the exchange rate.
- create Expense:Groceries in EUR
- create Expense:Groceries:BAM in BAM
- enter an expense transaction for 175 BAM with Groceries:BAM category.
- open Categories view
- collapse Groceries category

Expected Result:
The Groceries should display the amount calculated in EUR.

Actual Result:
Groceries category shows Total Value of 175 EUR.
This is wrong as BAM is close to 0.5 EUR.
Comment 1 Ralf Habacker 2017-10-05 18:30:31 UTC
Created attachment 108192 [details]
test case

Opening the appended test case does not show this issues - the expense sum category shows 89,32 € as expected. 

Can you give some more info to reproduce this issue ?
Comment 2 alen.siljak 2017-10-05 21:47:11 UTC
Thanks for the timely reply. Just double-checked and now I see where the problem lies.

I originally reported the wrong currency as I was testing expenses in (too many) multiple currencies. This actually manifests with IRR currency (and the Groceries:IRR expense category), not BAM.
Digging deeper, I see that the reason is the exchange rate. It is originally 1/1 with EUR. However, BAM has the correct exchange rate.
Now I tried another case in HRK and I see that the initial exchange rate is 1/1 when creating a cash account. 
It is very possible that I mixed currencies while testing and then got to the wrong conclusion. I have also updated to 4.8.1 in the meantime.
Comment 3 alen.siljak 2017-10-06 07:11:34 UTC
And now I see why. I was trying this at work and the quote retrieval does not seem to figure out the proxy settings so the new accounts keep the default exchange rate of 1/1.
When working from a PC without proxy, the quotes update normally.
Mistery resolved. Cheers