[Kmymoney-devel] Re: Review Request: Illogical message when editing investment
Thomas Baumgart
thb at net-bembel.de
Tue Jul 5 20:08:45 CEST 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6732/#review10272
-----------------------------------------------------------
/trunk/extragear/office/kmymoney/kmymoney/converter/mymoneystatementreader.cpp
<http://svn.reviewboard.kde.org/r/6732/#comment11938>
I simply added these two lines to the engine code where they should be. This change is in SVN trunk.
But you can certainly leave them here for completeness.
- Thomas
On July 4, 2011, 3:12 p.m., Allan Anderson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6732/
> -----------------------------------------------------------
>
> (Updated July 4, 2011, 3:12 p.m.)
>
>
> Review request for kmymoney.
>
>
> Summary
> -------
>
> When manually adding an account to an IntInc record that has been flagged
> during import, on entering the edited transaction, the Exchange Rate/Price
> wizard pops up, asking to convert from GBP to GBP.
> It also shows if an unflagged DivX has its value edited. Apart from the
> illogicality of wishing to convert from GBP to GBP, there is the question of
> why a currency/price editor shows when no price is involved.
>
> I've had a look at this, and what seems to be the problem, is that this
> occurs if the transaction in question has a category which has been
> created during import. If the category is created beforehand, the
> currency wizard doesn't open. It seems to be because, in
> investmementtransactioneditor.cpp, circa line 887,
> acc.currencyId() != t.commodity()) , because t.commodity() = GBP, and
> acc.currencyId() (say, for a Dividend category) is empty.
>
> As this is in the routine InvestTransactionEditor::setupPrice(), eventually I
> decided that the root cause was probably that that routine should not have been
> called.
>
> Eventually I worked back to Activity::createCategorySplits and made the
> following change at line 119 -
> if ((!s1.value().isZero()) && (!s1.actualPrice().isZero())){
> rc = m_parent->setupPrice
> and adding in that test for a zero price appears to fix the problem.
>
> Also, in investactivities.cpp, in Div::createTransaction() and in IntInc::createTransaction(),
> I have commented out -
>
> if (!m_parent->setupPrice(t, assetAccountSplit))
> +/// return false;
>
> as, for the same reason, these routines should have no involvement with prices.
>
>
> This addresses bug 276315.
> https://bugs.kde.org/show_bug.cgi?id=276315
>
>
> Diffs
> -----
>
> /trunk/extragear/office/kmymoney/kmymoney/converter/mymoneystatementreader.cpp 1239271
>
> Diff: http://svn.reviewboard.kde.org/r/6732/diff
>
>
> Testing
> -------
>
> Confirmed that the file that showed the problem, no longer does. Also, no apparent
> problem with my live file.
>
>
> Thanks,
>
> Allan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20110705/b0f8b724/attachment.htm
More information about the KMyMoney-devel
mailing list