<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/124115/">https://git.reviewboard.kde.org/r/124115/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On Juni 17th, 2015, 4 nachm. CEST, <b>Thomas Baumgart</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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;">I doubt that this is the solution. I still don't see the problem: withdrawal and deposit are disabled (greyed out) only if the category contains another asset or liability account. it it's empty, all three are accessible. How can I reproduce the problem? Can you attach necessary files to the bug entry?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In case it's a KMyMoney general problem and not related to any import action, one should be capable of entering a transaction via the form to show the problem.</p></pre>
</blockquote>
<p>On Juni 17th, 2015, 8:02 nachm. CEST, <b>Allan Anderson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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;">As I indicated to the OP on the BKO, I don't see, and have never seen, the withdrawal and deposit fields being disabled. He is on, I think, 4.7.1.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">So, I concentrated on the mis-classification of a "transfer" as a "withdrawal".</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Entering manually a new transaction, or editing an existing withdrawal or deposit, with no category, it will show as a transfer. Open it for editing, and it will then switch to either withdrawal or deposit. Close without any change, and it reverts to a transfer. As this seemed similar to the OP's other issue, I investigated that.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Similarly, an imported transaction with no category will show as a transfer, and one with a category will show as either withdrawal or deposit.</p></pre>
</blockquote>
<p>On Juli 23rd, 2015, 2:49 nachm. CEST, <b>Allan Anderson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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;">Do I need to be doing anything with this? I'm thinking of the upcoming 4.8.</p></pre>
</blockquote>
</blockquote>
<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;">I investigated this a bit further. The problem can only exist, if the transaction is not categorized. In that case, the transaction has only a single split. In all other cases, the existing logic works as designed and should not be changed.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The fix should keep the current logic unchanged (it will change it in case of a mixed multi-split transaction and shows different results depending on the order of the splits referencing income/expense or asset/liability accounts). If the first one found is income/expense it shows 'Withdrawal' or 'Deposit' if it is asset/liability it will show 'Transfer'. The current implementation shows 'Deposit/Withdrawal' for any mixed multi-split transaction.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I suggest to enclose the current logic to cover the corner case of a single split transaction and determine withdrawal/deposit solely on the amount of the split in this case, e.g.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">KMyMoneyRegister</span><span style="color: #666666">:</span><span style="color: #AA22FF">:Action</span> <span style="color: #008000; font-weight: bold">StdTransaction</span><span style="color: #666666">:</span><span style="color: #AA22FF">:actionType</span><span style="color: #666666">()</span> <span style="color: #008000; font-weight: bold">const</span>
{
KMyMoneyRegister<span style="color: #666666">::</span>Action action <span style="color: #666666">=</span> ActionNone;
if(m_transaction<span style="color: #666666">.</span>splitCount() <span style="color: #666666">></span> <span style="color: #666666">1</span>) <span style="border: 1px solid #FF0000">{</span>
<span style="color: #666666">//</span> keep the current logic as is
} <span style="color: #008000; font-weight: bold">else</span> {
action <span style="color: #666666">=</span> m_split<span style="color: #666666">.</span>shares()<span style="color: #666666">.</span>isNegative() <span style="color: #666666">?</span> ActionWithdrawal <span style="color: #666666">:</span> ActionDeposit;
}
<span style="color: #008000; font-weight: bold">return</span> <span style="color: #008000; font-weight: bold">action</span><span style="color: #666666">;</span>
<span style="border: 1px solid #FF0000">}</span>
</pre></div>
</p></pre>
<br />
<p>- Thomas</p>
<br />
<p>On August 19th, 2015, 12:15 nachm. CEST, Allan Anderson 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 and Thomas Baumgart.</div>
<div>By Allan Anderson.</div>
<p style="color: grey;"><i>Updated Aug. 19, 2015, 12:15 nachm.</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=349027">349027</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Initially reported as problem with QIF file import incorrectly classing a transaction as a "transfer" instead of a "withdrawal", but also found in CSV importing. In fact, it isn't really an importing problem, but in KMyMoney itself.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Checked with downloads and also manually edited transactions.</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/widgets/transaction.cpp <span style="color: grey">(77bbcb1)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/124115/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>