[Kmymoney-devel] [Bug 284122] New: The "Balance" field at the bottom of the "Payees" screen adds transactions in different currencies together

ej at rom.eclipse.co.uk ej at rom.eclipse.co.uk
Sat Oct 15 19:01:29 UTC 2011


https://bugs.kde.org/show_bug.cgi?id=284122

           Summary: The "Balance" field at the bottom of the "Payees"
                    screen adds transactions in different currencies
                    together
           Product: kmymoney4
           Version: 4.6.0
          Platform: Unlisted Binaries
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kmymoney-devel at kde.org
        ReportedBy: ej at rom.eclipse.co.uk


Version:           4.6.0 (using KDE 4.7.2) 
OS:                Linux

If a Payee has transactions in different currencies (say GBP and EUR), they are
shown on the "Payees" screen each in their original currency (why not), and the
"Balance" field at the bottom of the screen is the sum of all these
transactions in their original currency. The latter is clearly incorrect, as
it's adding apples and oranges,

This is best examplified by creating a single transaction, a transfer between
two accounts in two different currencies (e.g. GBP and EUR) for a new Payee.
Say I transfer GBP 100.00 from the account in GBP to the account in EUR, which
becomes EUR 114.56 at the other end. The list of Transactions under "Payees"
for that Payee shows two transactions: a Deposit of 114.56 (EUR) and a Payment
of 100.00 (GBP). This is not incorrect per se, although it could be misleading.
What is clearly incorrect is that the "Balance" at the bottom is 14.56. This is
incorrect as it's subtracting a GBP amount from a EUR amount. Given that these
are the two sides of a single transaction, the Balance should be 0, which
KMyMoney should arrive to by applying the Exchange Rate used when the
transaction was created.

Reproducible: Always

Steps to Reproduce:
- Create a new account in GBP (or use an existing one)
- Create a new account in EUR (or use an existing one)
- Create a transaction from the account in GBP:
   . Pay to: <A new Payee> (for clarity's sake)
   . Transfer to: <The account in EUR>
   . Amount: 100.00
- <Enter>
- In the Exchange Rate/Price Editor window:
   . To amount: 114.56
   . Update Price history is ticked
- <OK>
- Go to <Payees>
- Select the new Payee
- Balance at the bottom is: 14.56

NB: I have checked by selecting  Tools > Prices... that the FX has been stored
for that date: GBP -> EUR Price = 1.1456

Actual Results:  
Balance: 14.56

Expected Results:  
Balance: 0

My suggestion is that each individual transaction on the list under "Payees"
should be converted into the Base Currency. This should be done using the
stored Exchange Rates/Prices. If no stored Exchange Rate/Price is found for
this date, then the most recent one going backwards into the past from the
transaction date should be used. If none is found, then a default Exchange Rate
of 1 should be used. This situation would result in the same result as above
(Balance: 14.56), but this would be justified by the absence of any stored FX
value for that pair of currencies.
The Balance field can then safely be calculated by adding/subtracting the
amounts for all these transactions.

OS: Linux (i686) release 3.0.0-12-generic
Compiler: gcc

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list