> On June 17, 2015, 2 p.m., Thomas Baumgart wrote:
> > 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?
> > 
> > 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.
> 
> Allan Anderson wrote:
>     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.
>     
>     So, I concentrated on the mis-classification of a "transfer" as a 
> "withdrawal".
>     
>     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.
>     
>     Similarly, an imported transaction with no category will show as a 
> transfer, and one with a category will show as either withdrawal or deposit.
> 
> Allan Anderson wrote:
>     Do I need to be doing anything with this?  I'm thinking of the upcoming 
> 4.8.
> 
> Thomas Baumgart wrote:
>     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.
>     
>     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.
>     
>     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.
>     
>     
>         KMyMoneyRegister::Action StdTransaction::actionType() const
>         {
>           KMyMoneyRegister::Action action = ActionNone;
>     
>           if(m_transaction.splitCount() > 1) {
>           
>             // keep the current logic as is
>             
>           } else {
>             action = m_split.shares().isNegative() ? ActionWithdrawal : 
> ActionDeposit;
>           }
>           return action;
>         }

I'm missing something here.

Without your proposed patch, I still don't see the withdrawal and deposit 
fields being disabled.

If I import a simple QIF file, like -
!Type:Bank
D01-06-08
PADDED NET INT
T80.07
^

initially the Transfer tab is enabled, although clicking on any of them moves 
focus to the following empty transaction. If I click Edit, any tab may be 
selected.  If I select Withdrawal, and edit the payee and add a category, as 
per the OP, both the Deposit and Withdrawal tabs are enabled.  Clicking Enter, 
the transaction is saved correctly.  If I don't add a category, all three are 
still enabled.  If I enter an asset or liability account, only then are they 
disabled.


- Allan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124115/#review81525
-----------------------------------------------------------


On Aug. 19, 2015, 10:15 a.m., Allan Anderson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124115/
> -----------------------------------------------------------
> 
> (Updated Aug. 19, 2015, 10:15 a.m.)
> 
> 
> Review request for KMymoney and Thomas Baumgart.
> 
> 
> Bugs: 349027
>     http://bugs.kde.org/show_bug.cgi?id=349027
> 
> 
> Repository: kmymoney
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   kmymoney/widgets/transaction.cpp 77bbcb1 
> 
> Diff: https://git.reviewboard.kde.org/r/124115/diff/
> 
> 
> Testing
> -------
> 
> Checked with downloads and also manually edited transactions.
> 
> 
> Thanks,
> 
> Allan Anderson
> 
>

_______________________________________________
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel

Reply via email to