[kmymoney] [Bug 494072] New: Foreign Dividends - Exchange Rates Incorrectly Recorded on Duplicates

JAH bugzilla_noreply at kde.org
Fri Oct 4 00:14:39 BST 2024


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

            Bug ID: 494072
           Summary: Foreign Dividends - Exchange Rates Incorrectly
                    Recorded on Duplicates
    Classification: Applications
           Product: kmymoney
           Version: 5.1.3
          Platform: Appimage
                OS: Linux
            Status: REPORTED
          Severity: major
          Priority: NOR
         Component: database
          Assignee: kmymoney-devel at kde.org
          Reporter: vanquestor at gmail.com
  Target Milestone: ---

Thank you for an excellent, very capable product and continuing to support it!
Much appreciated.

SUMMARY
When DUPLICATING an existing Foreign Currency Dividend entry the exchange rates
applicable to the new (duplicated) transaction are not correctly recorded.

STEPS TO REPRODUCE
1. Create a Foreign Dividend with Exchange Rate = X
2. Duplicate that Foreign Dividend but with NEW Exchange Rate = Y

OBSERVED RESULT
Existing exchange rates in kmmSplits.sharesFormatted are NOT overwritten with
the duplicate's NEW exchange rates
Existing kmmSplits.price & kmmSplits.priceFormatted values are NEITHER
overwritten NOR set to "NULL""

As a result I have a database with many foreign dividend split records with the
Correct values in:
    kmmSplits.value
    kmmSplits.valueFormatted
    kmmSplits.shares

but INCORRECT  values in:
    kmmSplits.sharesFormatted       (which should I believe = kmmSplits.value /
kmmSplits.shares)

Even when the Foreign Exchange Rate is correctly recorded for fresh new
transactions, the value posted to kmmSplits.sharesFormatted is TRIMMED to only
2 decimal places. Originally (some years ago) it seems the exchange rate was
posted as a fraction in kmmSplits.price and rounded to 4 decimal places in
kmmSplits.priceFormatted - providing an accurate record of foreign transactions
which is now absent.

I have many records where kmmSplits.price & kmmSplits.priceFormatted have
neither been reset to "NULL" nor updated with the new exchange rates after
duplication. Those fields remain populated with specious old rates that have
been duplicated again and again from the original instance of the dividend
transaction.

EXPECTED RESULT
When creating a fresh NEW FOREIGN CURRENCY DIVIDEND entry I believe:
   A)  The relevant split exchange rates are posted in
kmmSplits.sharesFormatted trimmed to 2 decimal places
   B) "NULL" is posted to kmmSplits.price & kmmSplits.priceFormatted

Ideally the practice of recoding the accurate rate in kmmSplits.price &
kmmSplits.priceFormatted would be re-introduced.

Presumably exactly the same should happen when duplicating a previous
transaction as when creating a new one.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: opensuse 15.5 
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.103.0
Qt Version: 2.15.8

ADDITIONAL INFORMATION
Data maintained in XML file but saved and examined in SQLite database

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list