Bug 118729 - kmymoney reports duplicate transactions
Summary: kmymoney reports duplicate transactions
Status: RESOLVED FIXED
Alias: None
Product: kmymoney2
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Development Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-20 17:42 UTC by Michael Sims
Modified: 2008-10-30 20:49 UTC (History)
0 users

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 Michael Sims 2005-12-20 17:42:26 UTC
Version:            (using KDE KDE 3.4.3)
Installed from:    Debian testing/unstable Packages

Kmymoney does not handle reports of split transactions very well.  Reports involving such transactions show bogus, non-existent transactions.

Reproduce:  Create a new file.  Create five accounts, A, B, C, D, and E.  Create one transaction with several splits, like so:

Debit A $10,000
Credit B $4,000
Credit C $3,000
Credit D $2,000
Credit E $1,000

This is a legal, balanced transaction.  Now A shows a balance of -$10,000, and B, C, D, and E show balances of 4, 3, 2, and $1,000.  Fair enough?

Now, run some reports.  Transactions By Account shows this for Account A:

A
  2005-12-20  Test  Transfer to B   (4,000.00)
  2005-12-20  Test  Transfer to C   (3,000.00)
  2005-12-20  Test  Transfer to D   (2,000.00)
  2005-12-20  Test  Transfer to E   (1,000.00)
  Total A  (10,000.00)

That's correct.  But B, C, D and E are completely wrong:

B
  2005-12-20  [Empty Payee]  Transfer from A   10,000.00
  2005-12-20  [Empty Payee]  Transfer to C   (3,000.00)
  2005-12-20  [Empty Payee]  Transfer to D   (2,000.00)
  2005-12-20  [Empty Payee]  Transfer to E   (1,000.00)

There's no transfer from B to C, D, or E.  B should show one and only one transaction: a $4,000 credit from A.  (And get the payee right!)  The above listing is just the flip side of A's transactions... in effect you're showing the inverse of what you need to show.  You need to show the flip side of the one part of the split transaction that affects B, not the flip sides of all the parts of the split that don't affect B.

B should look like:

B
  2005-12-20  Test  Transfer from A   4,000.00

instead of the above.

I'm not going to go through them all, but this affects all reports, as far as I can tell.
Comment 1 ace jones 2005-12-20 19:44:10 UTC
"Kmymoney does not handle reports of split transactions very well."

This is a fact.  So since you seem to be interested in this area, let me
pose this to you...  What if your example looked like the following?

Debit A1 $5,000
Debit A2 $5,000
Credit B $4,000
Credit C $3,000
Credit D $2,000
Credit E $1,000

THEN what should the B transaction look like in the report?  Finding no
easy answers to questions like this (there are more), I left it with
printing out the entire other side of the transaction from whatever is
being reported on.

"Reports involving such transactions show bogus, non-existent transactions."

This part is not true.  The report shows the entire transaction, you
would like it to only show part of the transaction.

On Tue, Dec 20, 2005 at 04:42:27PM -0000, Michael Sims wrote:
[bugs.kde.org quoted mail]
Comment 2 Michael Sims 2005-12-20 20:57:09 UTC
Actually, I want to revise the initial bug; the transaction report for A is not correct.  It should look like:

A
  2005-12-20  Test  Split   (10,000.00)
  Total A  (10,000.00)

instead of:

A
  2005-12-20  Test  Transfer to B   (4,000.00)
  2005-12-20  Test  Transfer to C   (3,000.00)
  2005-12-20  Test  Transfer to D   (2,000.00)
  2005-12-20  Test  Transfer to E   (1,000.00)
  Total A  (10,000.00)

The transactions listed for each account or category should be only what directly affects that account or category - the money that came in or went out of THAT category.  Account A got a $10,000 debit.  B got a $4,000 credit.  And so on.

For your example above with accounts A1 and A2, account A1 should have a $5,000 debit (other side of the transaction: "Split") and account A2 should have a $5,000 debit (other side of the transaction: "Split").  You can't specify the other side of a split transaction since it isn't really defined - who knows whether the money in B came from A1 or A2?  It isn't specified, and doesn't matter.

Nutshell: each account should never get more than one transaction entry per actual transaction.  This is actually simpler than what you have now...  If it's a one-to-one transaction with only two accounts, you can show the opposite account name.  If there are more than two accounts, just show "Split" for the opposite account name.

I don't know whether this is an easy answer or not.  Accounting is not an easy thing.  But this is the correct, by-the-book accounting answer.  A split is one transaction and it should show as one transaction in a report.

B
  2005-12-20  [Empty Payee]  Transfer from A   10,000.00
  2005-12-20  [Empty Payee]  Transfer to C   (3,000.00)
  2005-12-20  [Empty Payee]  Transfer to D   (2,000.00)
  2005-12-20  [Empty Payee]  Transfer to E   (1,000.00)

A report like this, which shows four transactions for account B when only one transaction has occurred at all, is terribly confusing and wrong, even though it happens to add up to the correct credit amount, $4,000.

I just entered my original test transaction in Gnucash and printed a transaction report - here it is:

Transaction Report
From 01/01/05 To 12/20/05
Date	Num	Description	Memo	Amount		
A
December 2005
12/20/05		Test		-CAD 10,000.00		
Total For December 2005	-CAD 10,000.00
Total For A	-CAD 10,000.00
B
December 2005
12/20/05		Test		CAD 4,000.00		
Total For December 2005	CAD 4,000.00
Total For B	CAD 4,000.00
C
December 2005
12/20/05		Test		CAD 3,000.00		
Total For December 2005	CAD 3,000.00
Total For C	CAD 3,000.00
D
December 2005
12/20/05		Test		CAD 2,000.00		
Total For December 2005	CAD 2,000.00
Total For D	CAD 2,000.00
E
December 2005
12/20/05		Test		CAD 1,000.00		
Total For December 2005	CAD 1,000.00
Total For E	CAD 1,000.00
Grand Total	CAD 0.00


Each account shows one and only transaction.  Gnucash doesn't even show the opposing account(s), which is fine, since it's hard to define for a split anyway.
Comment 3 Thomas Baumgart 2005-12-20 21:13:46 UTC
Michael Sims <jellicle@gmail.com> wrote:

Nutshell: each account should never get more than one transaction entry
per actual transaction.  This is actually simpler than what you have
now...



I have to disagree here: It is currently not perfectly supported (the 
ledger view has a problem to deal with this kind of transaction) but it is 
needed (I need it and that's why I will build it in ;-)

The problem is my paycheck: Most of the time the gross salary is the same 
except twice a year when the gross salary is different. This results in 
tax deductions which are separately printed on the (employers) statement. 
Since I don't want to open a separate account for it, I have two splits 
for taxes. Otherwise I would have no idea what the exact values were at 
the end of the year w/o going back to the statement somewhere in the 
drawer.
Comment 4 ace jones 2005-12-21 02:49:56 UTC
This is an interesting idea, and definitely worth considering, thanks.

"Accounting is not an easy thing.  But this is the correct, by-the-book
accounting answer.  A split is one transaction and it should show as one
transaction in a report."

I'm not sure what accounting book says you can't have a report with all
the splits listed, though.  As Tom noted previously, some users would
like to see all the splits.  We'll make it an option.

"Gnucash doesn't even show the opposing account(s), which is fine, since
it's hard to define for a split anyway."

Again, fine for you, but probably not fine for all.

MS Money gives you the option to turn on and off "Show Splits".  With it
off, we get basically what you're asking for.  With it ON, we get
something similar to what's implemented now, albeit nicer:

This is ultimately how we'll do it.

--------------------------------------------------------------
Account Transactions
A1

7/1/2005 through 12/20/2005


Num	Date	Payee	Category	Amount	Running Balance

Month Ending 12/31/2005
	12/20/2005	All	Split/Multiple Categories	(5,000.00)	(5,000.00)
Total Month Ending 12/31/2005				(5,000.00)	

Grand Total				(5,000.00)	(5,000.00)

--------------------------------------------------------------
Account Transactions
A1

7/1/2005 through 12/20/2005

Num	Date	Payee	Category	Amount	Running Balance

Month Ending 12/31/2005
	12/20/2005	All	Split/Multiple Categories	(5,000.00)	(5,000.00)
			    Transfer From : A2	5,000.00	
			    B	(4000.00)	
			    C	(3000.00)	
			    D	(2000.00)	
			    E	(1000.00)	

Total Month Ending 12/31/2005				(5,000.00)	

Grand Total				(5,000.00)	(5,000.00)

On Tue, 2005-12-20 at 11:57, Michael Sims wrote:
[bugs.kde.org quoted mail]
Comment 5 Thomas Baumgart 2008-10-30 20:49:27 UTC
Transaction reports (at least in KMyMoney 0.9.2+) now have a 'Hide split details' option.