Bug 316111 - Editing of the fee field is being ignored,
Summary: Editing of the fee field is being ignored,
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-04 12:42 UTC by allan
Modified: 2013-06-01 16:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description allan 2013-03-04 12:42:40 UTC
[From users mail list.]
I am having trouble getting some data entered, and have been unable to 
figure it out.

I am running kmy 4.6.3 on Windows 7 using a file data store.

I am trying to enter a dividend for a security. I have done this before 
for the same security, so my usual approach is to duplicate the most 
recent dividend transaction and make changes as necessary. This time, 
however, the amount I enter in the "Fees" box is not saved, so I am 
stuck with the Fee from the duplicated transaction.

If I switch the Activity from Dividend to Interest Income, the Fees 
field disappears. If I resize the kmy window, the Fee field shows up 
again (but if I''m using a transaction form, the "Fees" label does not). 
I can enter the correct fee, but after saving the transaction, it 
reverts to the duplicated fee.

If I enter the transaction from scratch, I need to do the window resize 
trick to get the Fees field to show. I can then enter a fee, but after 
saving the transaction, it is stored as 0.

If I go to a different investment account, I can enter this transaction 
fine, and as I said, I have entered it in the offending investment 
account before. I can't see any differences between the two accounts.

My database does have multiple currencies, but this transaction, and all 
referenced accounts/categories, are all one currency.

Tools==>Consistency Check does not report any problems. 

Reproducible: Always

Steps to Reproduce:
1. Edit the fee field value and accept.
2. The original contents still are present.
3.
Actual Results:  
As Above.

Expected Results:  
Editing of the fee field value should be accepted.
Comment 1 allan 2013-03-05 14:03:08 UTC
A while back, during some tidying in this area, and following some discussion, it was decided that there was no likelihood of fees being charged on dividend transactions.

However unlikely, perhaps it is best left to the user to choose what he wants to do?
Comment 2 toquehead 2013-03-05 23:42:44 UTC
For me, the "fee" is non resident withholding tax.

If your diagnosis is correct, I don't understand why I can enter a fee for this transaction in other accounts. And why I could enter them in the offending account until recently.
Comment 3 allan 2013-03-06 00:42:43 UTC
(In reply to comment #2)
> For me, the "fee" is non resident withholding tax.
> 
> If your diagnosis is correct, I don't understand why I can enter a fee for
> this transaction in other accounts. And why I could enter them in the
> offending account until recently.

How certain are you?  You could go through the motions of adding a fee - might you not have noticed that it hadn't been saved?  Otherwise, I don't think I can explain that, but I do know there was no code to do it, and I've just checked 4.6.1, and it's not present there either.  Also, only Dividends were affected, not Buy, nor Sell nor Reinv.

Either way, it doesn't now work without a patch, so we'll just have to see what transpires later.

See https://bugs.kde.org/show_bug.cgi?id=276322, which is when the present arrangement dates to.
Comment 4 toquehead 2013-03-06 01:58:34 UTC
So you're correct, my dec entries contain the fee value from the nov entries, so they are wrong. I'm not sure how I managed to reconcile the account. I do have dividend entries with fees dated nov 2012, and I would entered those in dec 2012. Not sure what version of kmy i was on at the time, but I would have thought 4.6.2.

I note that similar to Dividend, Interest Income also doesn't accept entered fees.

As noted earlier, if the type is switched to Dividend, the fee field disappears, but resizing the window brings it back, which is probably another bug - but one that will disappear if I get my way here.

Here is some more weirdness: if I enter the dividend as a split and then save it, the second entry in the split (my non-resident withholding tax) shows up in the fee field and the main amount is _not_ split.

I'd really like to be able to enter a fee, but I can work around it by using a split, although editing an existing transaction is a pain because I have to delete the fee and re-enter the split from scratch.
Comment 5 allan 2013-03-06 12:24:02 UTC
(In reply to comment #4)
> So you're correct, my dec entries contain the fee value from the nov
> entries, so they are wrong. I'm not sure how I managed to reconcile the
> account. I do have dividend entries with fees dated nov 2012, and I would
> entered those in dec 2012. Not sure what version of kmy i was on at the
> time, but I would have thought 4.6.2.
> 
The last change to any code in the file concerned was 18 Sep 2011, and unrelated to the code I committed two months earlier.

> I note that similar to Dividend, Interest Income also doesn't accept entered
> fees.
> 
I don't see that.  Here, intinc works as expected.  (Not patched).

> As noted earlier, if the type is switched to Dividend, the fee field
> disappears, but resizing the window brings it back, which is probably
> another bug - but one that will disappear if I get my way here.
> 
Can you be a bit more specific?  
When you switch to Dividend from ??
Do you mean the fee category field disappears? Or the fee amount field?
On opening a new transaction, the fee amount field doesn't show.  On selecting Dividend, it remains hidden until a fee category is selected, when it appears.

> Here is some more weirdness: if I enter the dividend as a split and then
> save it, the second entry in the split (my non-resident withholding tax)
> shows up in the fee field and the main amount is _not_ split.
> 
Sorry, but I'm not sure what exactly you are doing here.  Can you do it step-by-step, please.

> I'd really like to be able to enter a fee, but I can work around it by using
> a split, although editing an existing transaction is a pain because I have
> to delete the fee and re-enter the split from scratch.

Can you double check how int inc performs?  As a get-around, until a patched version for Dividends is available, what I can do here (unpatched), is enter the transaction including the fee as IntInc, save it, then edit it to Dividend.  That seems to keep the fee as entered.  If you subsequently need to edit the fee, you'll need to do that as Int Inc again.
Comment 6 toquehead 2013-03-06 22:11:02 UTC
(In reply to comment #5)

> > I note that similar to Dividend, Interest Income also doesn't accept entered
> > fees.
> > 
> I don't see that.  Here, intinc works as expected.  (Not patched).
> 
> > As noted earlier, if the type is switched to Dividend, the fee field
> > disappears, but resizing the window brings it back, which is probably
> > another bug - but one that will disappear if I get my way here.
> > 
> Can you be a bit more specific?  
> When you switch to Dividend from ??
> Do you mean the fee category field disappears? Or the fee amount field?
> On opening a new transaction, the fee amount field doesn't show.  On
> selecting Dividend, it remains hidden until a fee category is selected, when
> it appears.

Damn users can't even do a decent bug report!

With the kmy main window not maximized:
  1. Open the ledger for an Investment account. 
  2. Create a new transaction.
  3. Select a Security.
  4. Choose Dividend - the fee category becomes hidden.
  5. With the mouse, grab the kmy window edge and resize it - the fee category _and_ the fee amount become visible.

> 
> > Here is some more weirdness: if I enter the dividend as a split and then
> > save it, the second entry in the split (my non-resident withholding tax)
> > shows up in the fee field and the main amount is _not_ split.
> > 
> Sorry, but I'm not sure what exactly you are doing here.  Can you do it
> step-by-step, please.

  1. Open the ledger for an Investment account. 
  2. Create a new transaction.
  3. Select a Security.
  4. Select Dividend.
  5. Select an asset account.
  6. For the income category, click the split transaction button.
  7. In the split editor, enter a income category and  positive number in row one for the dividend.
  8 In the split editor, enter an expense category and a negative number in row two for the fee.
  9. Click OK to close the split editor.
10. Save the transaction.
11. Edit the transaction you just entered - the dividend income is not split, but has the amount you entered in step 7. The fee field has the category and amount you entered for the 2nd row of the split in step 8.

> 
> > I'd really like to be able to enter a fee, but I can work around it by using
> > a split, although editing an existing transaction is a pain because I have
> > to delete the fee and re-enter the split from scratch.
> 
> Can you double check how int inc performs?  As a get-around, until a patched
> version for Dividends is available, what I can do here (unpatched), is enter
> the transaction including the fee as IntInc, save it, then edit it to
> Dividend.  That seems to keep the fee as entered.  If you subsequently need
> to edit the fee, you'll need to do that as Int Inc again.

When I enter a new transaction as Interest Income, the fee field is not displayed unless I do the window resize trick, and in that case it is not saved. I can dig a bit more into this scenario tonight.

Thanks for all your work.
Comment 7 allan 2013-03-07 01:34:28 UTC
Getting a bit bleary-eyed now so will look at this later.

Could you explain a bit about the resizing.  I don't understand where/why that comes into things.
Comment 8 toquehead 2013-03-07 06:32:54 UTC
(In reply to comment #7)
> Could you explain a bit about the resizing.  I don't understand where/why
> that comes into things.

Probably a bit of a distraction. If the transaction type is a Dividend, then kmy hides the fee field. If I resize my window, it triggers a redraw of the window, and the fee field is shown again (still a Dividend).
Comment 9 allan 2013-03-07 12:41:17 UTC
(In reply to comment #6)
> (In reply to comment #5)
> 
> > > I note that similar to Dividend, Interest Income also doesn't accept entered
> > > fees.
> > > 
> > I don't see that.  Here, intinc works as expected.  (Not patched).
> > 
> > > As noted earlier, if the type is switched to Dividend, the fee field
> > > disappears, but resizing the window brings it back, which is probably
> > > another bug - but one that will disappear if I get my way here.
> > > 
> > Can you be a bit more specific?  
> > When you switch to Dividend from ??
> > Do you mean the fee category field disappears? Or the fee amount field?
> > On opening a new transaction, the fee amount field doesn't show.  On
> > selecting Dividend, it remains hidden until a fee category is selected, when
> > it appears.
> 
> Damn users can't even do a decent bug report!
> 
Well, I know you know what you meant!  I think it's this 'Divided by a common language' thing.

> With the kmy main window not maximized:
>   1. Open the ledger for an Investment account. 
>   2. Create a new transaction.
>   3. Select a Security.
>   4. Choose Dividend - the fee category becomes hidden.
>   5. With the mouse, grab the kmy window edge and resize it - the fee
> category _and_ the fee amount become visible.

For me, when the new transaction is first created, the fee category is already visible, but the fee amount is hidden.  The only way I can get the category not to appear is to shrink the KMM window until the whole Details column disappears.  On selecting Dividend, the fee amount remains hidden until a fee category is selected.  It shouldn't really be necessary to resize.

> > 
> > > Here is some more weirdness: if I enter the dividend as a split and then
> > > save it, the second entry in the split (my non-resident withholding tax)
> > > shows up in the fee field and the main amount is _not_ split.
> > > 
> > Sorry, but I'm not sure what exactly you are doing here.  Can you do it
> > step-by-step, please.
> 
>   1. Open the ledger for an Investment account. 
>   2. Create a new transaction.
>   3. Select a Security.
>   4. Select Dividend.
>   5. Select an asset account.
>   6. For the income category, click the split transaction button.
>   7. In the split editor, enter a income category and  positive number in
> row one for the dividend.
>   8 In the split editor, enter an expense category and a negative number in
> row two for the fee.
>   9. Click OK to close the split editor.
> 10. Save the transaction.
> 11. Edit the transaction you just entered - the dividend income is not
> split, but has the amount you entered in step 7. The fee field has the
> category and amount you entered for the 2nd row of the split in step 8.

Yes, I see that, too.  The transaction is split, the dividend amount is the amount you received, and the expense category reflects the amount you assigned.  The total shows the difference.  To me, a non-expert, that seems to be correct.
> > 
> > > I'd really like to be able to enter a fee, but I can work around it by using
> > > a split, although editing an existing transaction is a pain because I have
> > > to delete the fee and re-enter the split from scratch.
> > 
> > Can you double check how int inc performs?  As a get-around, until a patched
> > version for Dividends is available, what I can do here (unpatched), is enter
> > the transaction including the fee as IntInc, save it, then edit it to
> > Dividend.  That seems to keep the fee as entered.  If you subsequently need
> > to edit the fee, you'll need to do that as Int Inc again.
> 
> When I enter a new transaction as Interest Income, the fee field is not
> displayed unless I do the window resize trick, and in that case it is not
> saved. I can dig a bit more into this scenario tonight.

For me, Interest Income behaves the same as above for a Dividend.  The fee amount field appears when a fee category is selected.

So far as your file is concerned, pending obtaining the patched KMM, the work-around I mentioned, changing the type to Int Inc, editing the fee, saving, then re-editing to Dividend, may help you.

> Thanks for all your work.

All part of the service.
Comment 10 toquehead 2013-03-15 23:50:57 UTC
(In reply to comment #9)
> (In reply to comment #6)
> > (In reply to comment #5)

> > With the kmy main window not maximized:
> >   1. Open the ledger for an Investment account. 
> >   2. Create a new transaction.
> >   3. Select a Security.
> >   4. Choose Dividend - the fee category becomes hidden.
> >   5. With the mouse, grab the kmy window edge and resize it - the fee
> > category _and_ the fee amount become visible.
> 
> For me, when the new transaction is first created, the fee category is
> already visible, but the fee amount is hidden.  The only way I can get the
> category not to appear is to shrink the KMM window until the whole Details
> column disappears.  On selecting Dividend, the fee amount remains hidden
> until a fee category is selected.  It shouldn't really be necessary to
> resize.

What I'm seeing is that resizing the window "tricks" kmy into showing the previously hidden fee field. I would consider that a bug.

> Yes, I see that, too.  The transaction is split, the dividend amount is the
> amount you received, and the expense category reflects the amount you
> assigned.  The total shows the difference.  To me, a non-expert, that seems
> to be correct.

I disagree. If I enter the transaction as a split, it should stay split, not take part of the split and stick it in the fee field. What would happen if I entered 3 splits?

> For me, Interest Income behaves the same as above for a Dividend.  The fee
> amount field appears when a fee category is selected.

I don't get it. As soon as I choose "Interest Income", the fee field disappears. After saving the transaction and then editing, the fee field shows up again (bug), but changes are not saved.

The only way I can enter this transaction is to start with a fresh transaction (not a duplicated one) and enter the fee via a split. But once I've done that I can never edit it, because kmy puts the fee part of the split into the fee field, and then will not accept edits to the fee field.
Comment 11 allan 2013-03-16 01:00:18 UTC
> > For me, when the new transaction is first created, the fee category is
> > already visible, but the fee amount is hidden.  The only way I can get the
> > category not to appear is to shrink the KMM window until the whole Details
> > column disappears.  On selecting Dividend, the fee amount remains hidden
> > until a fee category is selected.  It shouldn't really be necessary to
> > resize.
> 
> What I'm seeing is that resizing the window "tricks" kmy into showing the
> previously hidden fee field. I would consider that a bug.
> 

Apologies for being pedantic here, but I'm trying to make a distinction between the fee category field and the fee amount field.  The fee category field should always be visible, but initially, the fee amount field is hidden.  This field is not shown because a fee is not mandatory.  However, if the fee category field is selected, the fee amount field is now shown.  That should happen automatically, without any need to resize.

> > Yes, I see that, too.  The transaction is split, the dividend amount is the
> > amount you received, and the expense category reflects the amount you
> > assigned.  The total shows the difference.  To me, a non-expert, that seems
> > to be correct.
> 
> I disagree. If I enter the transaction as a split, it should stay split, not
> take part of the split and stick it in the fee field. What would happen if I
> entered 3 splits?
> 
> > For me, Interest Income behaves the same as above for a Dividend.  The fee
> > amount field appears when a fee category is selected.
> 
> I don't get it. As soon as I choose "Interest Income", the fee field
> disappears. After saving the transaction and then editing, the fee field
> shows up again (bug), but changes are not saved.
> 

As above, to which fee field do you refer?  The category, or the amount?

> The only way I can enter this transaction is to start with a fresh
> transaction (not a duplicated one) and enter the fee via a split. But once
> I've done that I can never edit it, because kmy puts the fee part of the
> split into the fee field, and then will not accept edits to the fee field.

I can quite definitely enter an Int Inc transaction including a fee amount, which I can save correctly and re-open and change to Dividend, resave, and still the correct fee amount is present.

@ Devs also, please.
As previously indicated, I have submitted a patch for the dividend fee problem, (part of https://git.reviewboard.kde.org/r/109043/diff/2/#2) but it has not yet been reviewed.  There is also a follow-on issue of how an update to git HEAD gets into the Windows release.
Comment 12 toquehead 2013-03-23 02:24:19 UTC
> Apologies for being pedantic here, but I'm trying to make a distinction
> between the fee category field and the fee amount field.  The fee category
> field should always be visible, but initially, the fee amount field is
> hidden.  This field is not shown because a fee is not mandatory.  However,
> if the fee category field is selected, the fee amount field is now shown. 
> That should happen automatically, without any need to resize.

Sorry for disappearing, life has been busy.
I use the "in line" transaction form editor. When I choose "Dividend", the Fee Category dropdown box is hidden. If I resize the window, the Fee Category widget is shown again - this is what I suspect is a bug.

> > > Yes, I see that, too.  The transaction is split, the dividend amount is the
> > > amount you received, and the expense category reflects the amount you
> > > assigned.  The total shows the difference.  To me, a non-expert, that seems
> > > to be correct.
> > 
> > I disagree. If I enter the transaction as a split, it should stay split, not
> > take part of the split and stick it in the fee field. What would happen if I
> > entered 3 splits?
> > 
> > > For me, Interest Income behaves the same as above for a Dividend.  The fee
> > > amount field appears when a fee category is selected.
> > 
> > I don't get it. As soon as I choose "Interest Income", the fee field
> > disappears. After saving the transaction and then editing, the fee field
> > shows up again (bug), but changes are not saved.
> > 
> 
> As above, to which fee field do you refer?  The category, or the amount?

Fee Category.


> I can quite definitely enter an Int Inc transaction including a fee amount,
> which I can save correctly and re-open and change to Dividend, resave, and
> still the correct fee amount is present.

I don't know what you're doing differently, but like Dividend, but as soon as I choose Interest Income, the Fee Category field is hidden.
Comment 13 allan 2013-03-23 11:12:59 UTC
This is indeed strange.  I hadn't asked what size the window is when you encounter the problem, but it probably would be best if you could do a screenshot showing the situation when you've just selected 'Dividend'.

Looking back through this bug report, I noticed "If I go to a different investment account, I can enter this transaction fine, and as I said, I have entered it in the offending investment 
account before. I can't see any differences between the two accounts."  Is that still the same, or is that also as in comment #4, "So you're correct, my dec entries contain the fee value from the nov entries, so they are wrong. I'm not sure how I managed to reconcile the account. I do have dividend entries with fees dated nov 2012, and I would entered those in dec 2012. Not sure what version of kmy i was on at the time, but I would have thought 4.6.2."

I also saw in the bug report for the hang while trying the anon file, that you also have Mint 11 running in a VMWare box.  Have you tried to reproduce this edit problem in that environment?

Otherwise, the main difference is that you encounter this on Windows, so perhaps that is a factor.
Comment 14 allan 2013-03-31 10:46:15 UTC
Waiting on patch submitted  as part of https://git.reviewboard.kde.org/r/109043/ on 8 March, to fix "Editing of the fee field is being ignored."
Waiting feedback from user on resizing issue.
Comment 15 allan 2013-06-01 16:31:42 UTC
Git commit 94935cf78e0135e2bb0cceff3c0dbde8c1c07e6d by Allan Anderson.
Committed on 06/03/2013 at 23:41.
Pushed by allananderson into branch 'master'.
Related: bug 311481, bug 107714, bug 314955
On entering a new tag, allow dialog to appear asking if I want to accept the
 new tag.

M  +3    -0    kmymoney/dialogs/investactivities.cpp
M  +2    -1    kmymoney/dialogs/keditscheduledlg.cpp
M  +44   -10   kmymoney/dialogs/transactioneditor.cpp
M  +39   -7    kmymoney/widgets/kguiutils.cpp
M  +3    -2    kmymoney/widgets/register.cpp

http://commits.kde.org/kmymoney/94935cf78e0135e2bb0cceff3c0dbde8c1c07e6d