https://bugs.kde.org/show_bug.cgi?id=333498
--- Comment #5 from Chris <developerch...@rebel.com.au> --- After a little digging I found the correct function to use I believe the following change resolves the issue without unintended consequences. But I may be wrong :) void StdTransactionEditor::slotUpdateCategory(const QString& id) { QLabel *categoryLabel = dynamic_cast<QLabel*>(haveWidget("category-label")); // qDebug("Update category to %s", qPrintable(id)); kMyMoneyEdit* amount = dynamic_cast<kMyMoneyEdit*>(m_editWidgets["amount"]); if (categoryLabel && amount->isValid()) { TabBar* tabbar = dynamic_cast<TabBar*>(haveWidget("tabbar")); MyMoneyMoney val = amount->value(); if (categoryLabel->text() == i18n("Transfer from")) { val = -val; } else { val = val.abs(); } There is still the very serious issue of incorrect tax calculations that most definitely needs to be resolved. Chris On 20/04/2014 10:14 PM, Chris wrote: > Hi Allan > > Unfortunately this is not a solution. You should be able to update the > amount using the bulk edit feature. > > The problem seems to be that the val field is not checked whether it has > changed or not. It is cast to a Mymoneymoney object and as it is an empty > string that object returns a 0 > > The object probably should have a "NaN" test, it does not appear to have > such a test. Failing that the text field should be checked before the > MyMoneymoney object is instantiated and used. > > What is confusing is for some reason > StdTransactionEditor::slotUpdateCategory tests for the existence of the > category label "if (categoryLabel)" and skips updating the value if it > exists. It seems that that may have been a kludge fix for some other > issue. The fact that the two types of editing, inline and using the form, > have two different program paths says to me there are bigger issues. > > Lastly when editing multiple transactions if you select a category that > has a tax auto split on it, it silently fails to add the tax split. That > is pretty crazy. If you rely on this software to do your annual taxes and > it silently discards taxes, then you may have problems with your tax > office. At the very least it should issue a warning. preferably it should > create the split properly. I don't know if I want a stint in jail due to a > software bug. > > > Chris > > > On 17/04/2014 8:38 AM, allan wrote: >> https://bugs.kde.org/show_bug.cgi?id=333498 >> >> --- Comment #3 from allan<agande...@gmail.com> --- >> On 16/04/14 13:01, Chris wrote: >>> https://bugs.kde.org/show_bug.cgi?id=333498 >>> >>> Bug ID: 333498 >>> Summary: bulk edit actions results in amount of transaction >>> being zeroed >> I have a potential fix for this, which appears to do the necessary, >> without any apparent harmful effects. >> >> In void StdTransactionEditor::slotUpdateCategory(const QString& id), >> circa line 1543, there is an updateAmount(val), which now I execute only >> if (!isMultiSelection(). >> >> I don't know if there may be a better way/place to do this. >> >> I notice also, that Buy and Sell activities have a similar problem if a >> fee account is entered. >> >> Allan >> > -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ KMyMoney-devel mailing list KMyMoney-devel@kde.org https://mail.kde.org/mailman/listinfo/kmymoney-devel