[Patch] Add a reversing transaction to the one(s) currently selected

Dawid Wrobel me at dawidwrobel.com
Tue Mar 24 01:05:33 GMT 2020


On Sat, Mar 21, 2020 at 1:41 PM Thomas Baumgart <thb at net-bembel.de> wrote:

> Eventually we will do that. Guess I have to learn how to work with those
> pull requests then.

I am looking forward to this.

Why do you use
>
>         d->m_value = d->m_value * MyMoneyMoney::MINUS_ONE;
> instead of
>         d->m_value = -d->m_value;
>

I saw it used in a similar fashion in a number of places, e.g. in
mymoneyforecast.cpp, so I assumed it was the "KMyMoney" way to do it.


> Also, make sure to invert the sign of the MyMoneySplit::m_shares member as
> well. Otherwise, your book-keeping is off ;)
>

Indeed, I missed that one. Thank you. Fixed and tested with an investment
account.

Regards,
Dawid Wrobel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20200323/02ea7f7a/attachment.html>


More information about the KMyMoney-devel mailing list