<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 />









<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://svn.reviewboard.kde.org/r/6732/diff/2/?file=46547#file46547line149" style="color: black; font-weight: bold; text-decoration: underline;">/trunk/extragear/office/kmymoney/kmymoney/converter/mymoneystatementreader.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">QString MyMoneyStatementReader::Private::nameToId(const QString&amp; name, MyMoneyAccount&amp; parent)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">149</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span> <span class="p">(</span><span class="n">newAccount</span><span class="p">.</span><span class="n">currencyId</span><span class="p">().</span><span class="n">isEmpty</span><span class="p">())</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</div>
<br />



<p>- Thomas</p>


<br />
<p>On July 4th, 2011, 3:12 p.m., Allan Anderson wrote:</p>






<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>


<p style="color: grey;"><i>Updated July 4, 2011, 3:12 p.m.</i></p>




<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&#39;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&#39;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()) &amp;&amp; (!s1.actualPrice().isZero())){
          rc = m_parent-&gt;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-&gt;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/converter/mymoneystatementreader.cpp <span style="color: grey">(1239271)</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>