[Kmymoney-devel] Re: Review Request: Illogical message when editing investment
Allan Anderson
agander93 at gmail.com
Wed Jul 6 11:37:45 CEST 2011
> On July 5, 2011, 6:08 p.m., Thomas Baumgart wrote:
> > /trunk/extragear/office/kmymoney/kmymoney/converter/mymoneystatementreader.cpp, line 149
> > <http://svn.reviewboard.kde.org/r/6732/diff/2/?file=46547#file46547line149>
> >
> > 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.
I was expecting this to close automatically when I did the SVN commit 1239913 :BUG:276315 REVIEW:6732 last night, but no go, so still seems to be a residual issue somewhere, although the bug closed.
Closing manually
- Allan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6732/#review10272
-----------------------------------------------------------
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/20110706/f0818e82/attachment.htm
More information about the KMyMoney-devel
mailing list