Bug 267990 - NUM shows up in Cash Flow Transactions report when it shouldn't
Summary: NUM shows up in Cash Flow Transactions report when it shouldn't
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 19:06 UTC by Bob Connell
Modified: 2012-05-08 22:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
JPEG showing reports screen with Number being shown. (154.05 KB, image/jpeg)
2011-03-08 19:06 UTC, Bob Connell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Connell 2011-03-08 19:06:20 UTC
Created attachment 57776 [details]
JPEG showing reports screen with Number being shown.

Version:           unspecified (using KDE 4.6.1) 
OS:                Linux

Application version: 4.5.3 (not in dropdown list yet)

Software Distribution: for PcLinuxOS distribution (not in dropdown list)

Problem: When entering transactions, if the "Number" field initially has a value, the entry is entered, and then it is opened and reedited and the number is removed, the number shows up in "Cash Flow Transactions" reports when it shouldn't be there.

Reproducible: Always

Steps to Reproduce:
1. Open a new entry as a withdrawal.
2. Enter information and "Enter" the transaction.
Go back and edit it and change it to a deposit; remove the "Number" as part of this process.
3. Open up "Reports" and do a "Cash Flow Transactions" report.

Actual Results:  
Look at the entry; it will be on the Income side as is correct but the original "Number" will also be listed.
See attachment for sample.

Expected Results:  
The "Number" related to the transaction should not be present.

OS: Linux (i686) release 2.6.33.7-pclos6.bfs
Compiler: gcc
Comment 1 Jack 2011-12-12 23:46:35 UTC
Does this still happen?  It works correctly for me, with 4.6.1.  Can you try upgrading?
Comment 2 Bob Connell 2011-12-13 03:19:59 UTC
Hi Jack,

I am running the new openSUSE 12.1 (with KMyMoney 4.6.0, KDE 4.7.2) and it still shows the same problem.

I did the manipulations as I mentioned and have attached two .jpegs showing the ledger and the cash transactions report.

You can see that they don't agree (the original withdrawal is still showing up (after it has been changed from a withdrawal to a deposit)).

openSUSE doesn't have KMyMoney 4.6.1 yet. What OS/distro are you running where you have 4.6.1 available?

Do you know if the code has changed in this area between 4.6.0 and 4.6.1?

Let me know if you need any other help or verification.

Bob Connell



________________________________
 From: Jack <ostroffjh@users.sourceforge.net>
To: bobbconnell@yahoo.com 
Sent: Monday, December 12, 2011 3:46 PM
Subject: [Bug 267990] NUM shows up in Cash Flow Transactions report when it shouldn't
 
https://bugs.kde.org/show_bug.cgi?id=267990


Jack <ostroffjh@users.sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ostroffjh@users.sourceforge
                   |                            |.net




--- Comment #1 from Jack <ostroffjh users sourceforge net>  2011-12-12 23:46:35 ---
Does this still happen?  It works correctly for me, with 4.6.1.  Can you try
upgrading?
Comment 3 Jack 2011-12-13 16:53:06 UTC
Gentoo and Archlinux both have 4.6.1 (not yet marked stable, though) and I also compile from source.  I don't think anything should have changed in KMM recently to affect this, but my suspicion is that it is not an app issue but something in configuration, window manager, or library.  I'm not a developer, but I doubt the app code specifies the widget placement directly.

Attachments need to be made directly to the bug, they get dropped from emails.  However, in your original screen shot, there are multiple transactions shown with the same number.  I don't think this is relevant to the problem, but who knows?  Just to be compulsive, you might try again using a new check number.

One thing you might try is closing and restarting KMM, to see if it's just a refresh issue in the report, although I went directly between ledger and report, and the report always showed whatever I had just saved in the ledger.
Comment 4 Jack 2011-12-13 16:59:08 UTC
Sorry - some of my comments (widget placement) actually belong to a different bug I was looking at at the same time.  There have been some changes to the report code, but it would be a new bug if a report didn't reflect the most recent state of the data.
Comment 5 Bob Connell 2011-12-13 17:55:44 UTC
Hi Jack,

Thanks for getting back to me.

I noticed that in my proofing exercise yesterday I actually documented the more generic case where a transaction that had its state changed from withdrawal to deposit was keeping the original withdrawal aspect around as a transaction after it had been updated to turn it into a deposit in the ledger portion of the application.

I checked in the "Transactions by Account" report and it correctly does not show the original withdrawal transaction but only shows the updated deposit entry after changing the original withdrawal entry in the ledger.

I took your advice and closed down KMM and restarted it to get any refresh issues out of the way and it still showed the wrong thing in the "Cash Flow Transactions this Month" report.

So it seems like KMM is keeping this original transaction around in its transaction storage even though it shouldn't. Maybe it's marked for a deletion that never happens and some of the reports may look at this state and ignore this transaction while others might gloss over the transaction state and end up reporting it anyway even though it shouldn't.

Of course it depends on what the coder's intent is (like keeping history around for some reason, but none the less results in problems being exposed like this) as to whether this original state is valuable or not.

So this is probably the same original bug, just manifesting itself in a simpler and clearer way.

Let me know if you need any other help or info on this.

           Bob Connell





________________________________
 From: Jack <ostroffjh@users.sourceforge.net>
To: bobbconnell@yahoo.com 
Sent: Tuesday, December 13, 2011 8:59 AM
Subject: [Bug 267990] NUM shows up in Cash Flow Transactions report when it shouldn't
 
https://bugs.kde.org/show_bug.cgi?id=267990





--- Comment #4 from Jack <ostroffjh users sourceforge net>  2011-12-13 16:59:08 ---
Sorry - some of my comments (widget placement) actually belong to a different
bug I was looking at at the same time.  There have been some changes to the
report code, but it would be a new bug if a report didn't reflect the most
recent state of the data.
Comment 6 Jack 2011-12-13 18:11:22 UTC
I do understand what you are seeing, the problem is that I do not see that behavior.  I see what you expect to see.  Any change I make in the ledger (changing from withdrawal to deposit, adding or removing a check number) shows up immediately when I switch to the cash flow report.

I can't imagine why we would see this different behavior.  This type of difference often points to a problem with using different versions of some dependency library, but I can't think of what.  However, given that you have seen this behavior with two different versions of KMM points to something else that has not changed on your machine, but I have no idea what.  In addition, I don't know why two different reports would show this out of sync behavior.

At this point, we wait to see if anyone else sees this, or has any other ideas where to look.
Comment 7 Thomas Baumgart 2011-12-14 19:29:42 UTC
Can you try to create an anonymous version of your file (see the manual at http://kmymoney2.sourceforge.net/kde4/online-manual/details.formats.anonymous.html for details on how to do that) and give us instructions on how to reproduce the problem you see.

Another approach would be to setup a small sample file that shows the problem and attach it to the bug itself (or send it to the developer mailing-list).

To take some speed out of assumptions: there is no history kept about prior transactions. Once you modify it, the old stuff is gone. One thing I am interested in: how do you change a withdrawal into a deposit? Since there are several ways to achieve that I am curious which one you use.
Comment 8 Thomas Baumgart 2011-12-14 19:30:41 UTC
Oh, I forgot to mention the openSUSE build service at https://build.opensuse.org/ which contains a KMyMoney 4.6.1 version somewhere.
Comment 9 Bob Connell 2011-12-22 06:17:39 UTC
Hi Thomas,

Sorry, I've been doing other things and didn't get back to this issue.

I got a 4.6.1 from PCLinuxOS and have tried it.

I think I want to generalize the situation by saying that, when a new file is started and the first entry is a deposit, reports tend to show activities as always an Income (as long as the category is the same). This is weird behavior. KMM will hang onto this philosophy to the extent of showing negative income once withdrawals exceed expenses and refuses to break them out separately.

Its use of minus signs in the individual Income and Expense listings in the Cash Flow Transations this Month to carry the item up to the Asset listing also seems weird.

I guess one good person does the reports, and I don't know if there's a spec related to how it should work, but I just find its conventions non-traditional.

I'd be glad to work with the reports coder if this is indeed an issue for other people.

Just try it yourself; open up a new file and then start making ledger entries and then look at the reports and see if how things are being reported makes sense to you.

I change a deposit to withdrawal or visa-versa by calling up the entry in the ledger, hitting "Edit", and then hitting the appropriate tab.

              Bob Connell





________________________________
 From: Thomas Baumgart <ipwizard@users.sourceforge.net>
To: bobbconnell@yahoo.com 
Sent: Wednesday, December 14, 2011 11:30 AM
Subject: [Bug 267990] NUM shows up in Cash Flow Transactions report when it shouldn't
 
https://bugs.kde.org/show_bug.cgi?id=267990





--- Comment #8 from Thomas Baumgart <ipwizard users sourceforge net>  2011-12-14 19:30:41 ---
Oh, I forgot to mention the openSUSE build service at
https://build.opensuse.org/ which contains a KMyMoney 4.6.1 version somewhere.
Comment 10 Jack 2012-02-27 20:45:37 UTC
Bob,

Your remarks in Comment #9 could be better discussed on the mailing list or in a wish-list rather than in this bug report.  If you are still seeing the original problem, an anonymous file as in Comment #7 would be the best way to track down the cause.

Jack
Comment 11 Alvaro Soliverez 2012-04-27 14:20:01 UTC
In this case, I think the problem is related to how individual splits of a transaction are saved after the transaction is edited.
This might have been fixed already, but we need an anonymized file to verify it.
Comment 12 Alvaro Soliverez 2012-04-29 02:03:33 UTC
There is more than one issue here.
First, numbers are stored per split, so depending on how you edit it, it might not be removed from all splits. Therefore, it might be shown or not, depending on how you view it. A transaction always has splits, 2 at least.

The sign problem was indeed a bug in the Cash Flow report. I thought I'd have spotted that when first creating the report, but it remained unnoticed for, say 2 years or so. Thanks for the report.

I'm filing a patch for this and it will go through the review process for inclusion in the code.

The Good Person Who Did The Cash Flow Report
Comment 13 Alvaro Soliverez 2012-04-30 22:44:13 UTC
Git commit 435fdf0d4fb1d856fe0c475305581c0694b5a32f by Alvaro Soliverez.
Committed on 29/04/2012 at 04:04.
Pushed by asoliverez into branch 'master'.

CashFlow report: Reverse sign of income and expenses to keep consistency
with other reports and views
REVIEW:104776

M  +5    -0    kmymoney/reports/querytable.cpp

http://commits.kde.org/kmymoney/435fdf0d4fb1d856fe0c475305581c0694b5a32f
Comment 14 Alvaro Soliverez 2012-05-08 22:54:43 UTC
Git commit ba12354eaf7e69b1988b51281aca4a7d049fe6c9 by Alvaro Soliverez.
Committed on 29/04/2012 at 04:04.
Pushed by asoliverez into branch '4.6'.

CashFlow report: Reverse sign of income and expenses to keep consistency
with other reports and views
REVIEW:104776

M  +5    -0    kmymoney/reports/querytable.cpp

http://commits.kde.org/kmymoney/ba12354eaf7e69b1988b51281aca4a7d049fe6c9