Re: [Kmymoney-devel] Review Request 124115: BUG:349027 Fix transaction classed as a transfer instead of a withdrawal.

2015-08-19 Thread Thomas Baumgart


 On Juni 17, 2015, 4 nachm., 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.

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


- Thomas


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


On Aug. 19, 2015, 12:15 nachm., Allan Anderson wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/124115/
 ---
 
 (Updated Aug. 19, 2015, 12:15 nachm.)
 
 
 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


Re: [Kmymoney-devel] Review Request 124815: BUG:347166 Price/share field on investment transaction entry form is mislabeled

2015-08-19 Thread Allan Anderson


 On Aug. 19, 2015, 11:02 a.m., Thomas Baumgart wrote:
 

Thanks, Thomas.  I know you're busy.
I've attended to both those points.
Do you want to see the revised patch, or am I OK to push?


- Allan


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


On Aug. 19, 2015, 10:14 a.m., Allan Anderson wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/124815/
 ---
 
 (Updated Aug. 19, 2015, 10:14 a.m.)
 
 
 Review request for KMymoney.
 
 
 Repository: kmymoney
 
 
 Description
 ---
 
 Fix for Price/share field on investment transaction entry form is 
 mislabeled.
 
 
 Diffs
 -
 
   kmymoney/dialogs/investactivities.h d2e2a76 
   kmymoney/dialogs/investactivities.cpp 29c7957 
   kmymoney/dialogs/investtransactioneditor.cpp 882e5a0 
 
 Diff: https://git.reviewboard.kde.org/r/124815/diff/
 
 
 Testing
 ---
 
 Create and edit numerous relevant transactions.
 
 
 Thanks,
 
 Allan Anderson
 


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


Re: [Kmymoney-devel] Review Request 124815: BUG:347166 Price/share field on investment transaction entry form is mislabeled

2015-08-19 Thread Thomas Baumgart
Hi Allen,

On Wednesday 19 August 2015 16:45:27 Allan Anderson wrote:

  On Aug. 19, 2015, 11:02 a.m., Thomas Baumgart wrote:
 Thanks, Thomas.  I know you're busy.
 I've attended to both those points.
 Do you want to see the revised patch, or am I OK to push?

Please go ahead and push. I think that is OK.

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-
In a world without walls and fences,
who needs windows and gates?
-


signature.asc
Description: This is a digitally signed message part.
___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


[Kmymoney-devel] [kmymoney4] [Bug 347166] Price/share field on investment transaction entry form is mislabeled. Actually is total buy/sale amount.

2015-08-19 Thread allan
https://bugs.kde.org/show_bug.cgi?id=347166

allan agande...@gmail.com changed:

   What|Removed |Added

 Resolution|LATER   |FIXED
  Latest Commit||http://commits.kde.org/kmym
   ||oney/601bc8c80cfd5d04303f20
   ||be09dda635adea9cd5
 Status|VERIFIED|RESOLVED

--- Comment #10 from allan agande...@gmail.com ---
Git commit 601bc8c80cfd5d04303f20be09dda635adea9cd5 by Allan Anderson.
Committed on 19/08/2015 at 21:10.
Pushed by allananderson into branch 'master'.
Fix Price/share field on investment transaction entry form is
mislabeled.

M  +22   -5kmymoney/dialogs/investactivities.cpp
M  +1-0kmymoney/dialogs/investactivities.h
M  +9-12   kmymoney/dialogs/investtransactioneditor.cpp
M  +2-1kmymoney/dialogs/investtransactioneditor.h

http://commits.kde.org/kmymoney/601bc8c80cfd5d04303f20be09dda635adea9cd5

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


Re: [Kmymoney-devel] Review Request 124815: BUG:347166 Price/share field on investment transaction entry form is mislabeled

2015-08-19 Thread Allan Anderson

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

(Updated Aug. 19, 2015, 10:14 a.m.)


Review request for KMymoney.


Changes
---

BUG:347166 Fix Price/share field on investment transaction entry form is 
mislabeled.


Repository: kmymoney


Description (updated)
---

Fix for Price/share field on investment transaction entry form is mislabeled.


Diffs
-

  kmymoney/dialogs/investactivities.h d2e2a76 
  kmymoney/dialogs/investactivities.cpp 29c7957 
  kmymoney/dialogs/investtransactioneditor.cpp 882e5a0 

Diff: https://git.reviewboard.kde.org/r/124815/diff/


Testing
---

Create and edit numerous relevant transactions.


Thanks,

Allan Anderson

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


Re: [Kmymoney-devel] Review Request 124815: BUG:347166 Price/share field on investment transaction entry form is mislabeled

2015-08-19 Thread Thomas Baumgart

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



kmymoney/dialogs/investactivities.cpp (line 206)
https://git.reviewboard.kde.org/r/124815/#comment58215

Please use the defined constants (PricePerShare, PricePerTransaction, ...) 
here instead of hard coded values.

Zero is not yet defined per constant, but it serves as 'Default', so you 
can also add a definition for it and fix the usage in 
InvestTransactionEditor::priceMode()



kmymoney/dialogs/investtransactioneditor.cpp (line 1144)
https://git.reviewboard.kde.org/r/124815/#comment58214

This check is not needed anymore, as you removed the division by 
sharesEdit-value() in the next statement.


- Thomas Baumgart


On Aug. 19, 2015, 12:14 nachm., Allan Anderson wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/124815/
 ---
 
 (Updated Aug. 19, 2015, 12:14 nachm.)
 
 
 Review request for KMymoney.
 
 
 Repository: kmymoney
 
 
 Description
 ---
 
 Fix for Price/share field on investment transaction entry form is 
 mislabeled.
 
 
 Diffs
 -
 
   kmymoney/dialogs/investactivities.h d2e2a76 
   kmymoney/dialogs/investactivities.cpp 29c7957 
   kmymoney/dialogs/investtransactioneditor.cpp 882e5a0 
 
 Diff: https://git.reviewboard.kde.org/r/124815/diff/
 
 
 Testing
 ---
 
 Create and edit numerous relevant transactions.
 
 
 Thanks,
 
 Allan Anderson
 


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


[Kmymoney-devel] [kmymoney4] [Bug 347166] Price/share field on investment transaction entry form is mislabeled. Actually is total buy/sale amount.

2015-08-19 Thread allan
https://bugs.kde.org/show_bug.cgi?id=347166

--- Comment #9 from allan agande...@gmail.com ---
(In reply to Thomas Baumgart from comment #8)
 @Allan: why don't you (also) post the patch on reviewboard? Makes it a lot
 easier to comment on.

OK.  Some while ago, when I queried this, Cristian said it wasn't necessary
when a bug was involved.  Also, reviewboard submissions seem to 'go to sleep'
sometimes, so, if only a small patch is involved, I try to push it through as I
sometimes have a number of things on the go and it avoids the hassle of having
to collect my thoughts again.

Anyway, will do.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel


[Kmymoney-devel] Review Request 124815: BUG:347166 Price/share field on investment transaction entry form is mislabeled

2015-08-19 Thread Allan Anderson

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

Review request for KMymoney.


Repository: kmymoney


Description
---

Fix for Price/share field on investment transaction entry form is mislabeled


Diffs
-

  kmymoney/dialogs/investactivities.h d2e2a76 
  kmymoney/dialogs/investactivities.cpp 29c7957 
  kmymoney/dialogs/investtransactioneditor.cpp 882e5a0 

Diff: https://git.reviewboard.kde.org/r/124815/diff/


Testing
---

Create and edit numerous relevant transactions.


Thanks,

Allan Anderson

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


[Kmymoney-devel] [kmymoney4] [Bug 347166] Price/share field on investment transaction entry form is mislabeled. Actually is total buy/sale amount.

2015-08-19 Thread Thomas Baumgart
https://bugs.kde.org/show_bug.cgi?id=347166

--- Comment #8 from Thomas Baumgart ipwiz...@users.sourceforge.net ---
@Allan: why don't you (also) post the patch on reviewboard? Makes it a lot
easier to comment on.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
KMyMoney-devel mailing list
KMyMoney-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmymoney-devel