<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/130143/">https://git.reviewboard.kde.org/r/130143/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 5th, 2017, 6:47 p.m. CEST, <b>Thomas Baumgart</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  


<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="https://git.reviewboard.kde.org/r/130143/diff/2-3/?file=496061#file496061line1134" style="color: black; font-weight: bold; text-decoration: underline;">kmymoney/mymoney/mymoneyfile.cpp</a>
    <span style="font-weight: normal;">

     (Diff revisions 2 - 3)

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



 
 

 <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">1134</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="o">&&</span> <span class="o">!</span><span class="n">it</span><span class="o">-></span><span class="n">name</span><span class="p">().</span><span class="n">contains</span><span class="p">(</span><span class="n">QLatin1Char</span><span class="p">(</span><span class="sc">'('</span><span class="p">)))</span> <span class="p">{</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This will not work once the first time a user adds an open paren to the name of an opening balance account. But I guess it will not hurt because the user can move the new opening balance account around once created anyway. So we don't think further at this point - at least I don't.</p></pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Because curreny codes are always 3 letter upper case ascii characters it would be possible to match them with a regular expression e.g. "([A-Z]{3})</p></pre>
<br />




<p>- Ralf</p>


<br />
<p>On June 5th, 2017, 6:02 p.m. CEST, Ralf Habacker wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KMymoney.</div>
<div>By Ralf Habacker.</div>


<p style="color: grey;"><i>Updated June 5, 2017, 6:02 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=370290">370290</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kmymoney
</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;">With recent implementation kmymoney is not able to use a
dedicated account for opening balances. Instead it (creates)
and uses an opening balance account with the translated name
of "Opening Balances" which may be language specific.

To specify an opening balance account to be used on adding new
accounts one way of operation is to set the "opening balance
account" flag in the account editor for equity accounts.

This is enabled if no other account contains this flag. Also
changing the state of the flag is only possible if no transactions
are assigned to the account having this flag.

Another way to use this support is to flag an opening balance
account in a kmymoney account template file.

On creating a new kmymoney file the "opening balance account"
flag is imported from a template account flag if specified
in the following form:

<account type="16" name="9000 Saldovortragskonten">
   <flag name="OpeningBalanceAccount"/>
</account>

The template admin needs to make sure that only one template account
has this flag set.

Exporting the current kmymoney file to an account template exports
this flag too.

If there is at least one dedicate opening balance account in a kmymoney
file the name will be used as template for adding additional currency
related opening balance accounts in the same hierachy level as the
referenced opening balance account.

BUG:370290</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;"><ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">compiled</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">set/unset "opening balance account" flag in account editor for a given account and save/load kmymoney file -> state is persistent</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">checked if it is possible to set "opening balance account" flag in an additional account -> check box is not visible on editing the second account</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">checked if it is possible to change "opening balance account" flag if transactions are assigned to the opening balance account -> check box is disabled</li>
</ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Note: I choosed the flag name as to be 'OpeningBalanceAccount' in the template file and kmymoney file to have the same name.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kmymoney/converter/mymoneytemplate.cpp <span style="color: grey">(25a343e3fbdd9409ebdbd814bc08122c151a09d9)</span></li>

 <li>kmymoney/dialogs/knewaccountdlg.h <span style="color: grey">(58c8efe08cd03f9e683559f0afb2525b74d36f07)</span></li>

 <li>kmymoney/dialogs/knewaccountdlg.cpp <span style="color: grey">(dfe2967174bf323d9eda4983fd545d0930a9ec43)</span></li>

 <li>kmymoney/dialogs/knewaccountdlgdecl.ui <span style="color: grey">(bee638d2b4f73bc8496c86bbf606bfaa5fa4c913)</span></li>

 <li>kmymoney/kmymoney.cpp <span style="color: grey">(0d7311a34db307a89c55b0e296fbbc13989d8844)</span></li>

 <li>kmymoney/mymoney/mymoneyfile.cpp <span style="color: grey">(692014b21ec8bff4e4c3f3f240d377cd7b9697b3)</span></li>

 <li>kmymoney/mymoney/storage/mymoneystorageanon.cpp <span style="color: grey">(b6d0dc6a7b499aa45498cb76bef836731ff618d4)</span></li>

 <li>kmymoney/reports/objectinfotable.cpp <span style="color: grey">(584a9a378d37d51766e551d8e6b6baffe4fb397d)</span></li>

 <li>kmymoney/reports/reportstestcommon.h <span style="color: grey">(22000165dff793c5d7281072f702e0ca3c40f882)</span></li>

 <li>kmymoney/reports/reportstestcommon.cpp <span style="color: grey">(40b103ca965e0a1973b6fd0a351ddb976aa10471)</span></li>

 <li>kmymoney/templates/de_DE/skr03.kmt <span style="color: grey">(8ab66033ea04f29cd5c50cf567eca654b0a82f57)</span></li>

 <li>kmymoney/templates/de_DE/skr04.kmt <span style="color: grey">(d3b963608369cac50a67dea79349ccf2ec0289f0)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/130143/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>