<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://svn.reviewboard.kde.org/r/6732/">http://svn.reviewboard.kde.org/r/6732/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://svn.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for kmymoney.</div>
<div>By Allan Anderson.</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Confirmed that the file that showed the problem, no longer does. Also, no apparent
problem with my live file.</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=276315">276315</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/extragear/office/kmymoney/kmymoney/dialogs/investactivities.cpp <span style="color: grey">(1238152)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/6732/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>