From 371c40076cbdf3dd3d30badeb98c0a4d3431e84f Mon Sep 17 00:00:00 2001 From: Derek Atkins Date: Wed, 7 Jan 2004 21:09:05 +0000 Subject: [PATCH] * src/engine/Transaction.h: fix the xaccTransOrder() documentation to be more accurate with the actual implementation. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9760 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 +++++ src/engine/Transaction.h | 15 +++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7d4c3e92f..9a662f8189 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-01-07 Derek Atkins + + * src/engine/Transaction.h: fix the xaccTransOrder() documentation + to be more accurate with the actual implementation. + 2004-01-06 Derek Atkins * src/engine/qofinstance.c: revert fix from 01-01, because it's wrong. diff --git a/src/engine/Transaction.h b/src/engine/Transaction.h index e58d40a427..d5555bb5a8 100644 --- a/src/engine/Transaction.h +++ b/src/engine/Transaction.h @@ -280,10 +280,17 @@ gnc_numeric xaccTransGetAccountValue (const Transaction *trans, /** * The xaccTransOrder(ta,tb) method is useful for sorting. - * return a negative value if transaction ta is dated earlier than tb, - * return a positive value if transaction ta is dated later than tb, - * then compares num and description values, using the strcmp() - * c-library routine, returning what strcmp would return. + * Orders ta and tb + * return <0 if ta sorts before tb + * return >0 if ta sorts after tb + * return 0 if they are absolutely equal + * + * The comparrison uses the following fields, in order: + * date posted (compare as a date) + * num field (compare as an integer) + * date entered (compare as a date) + * description field (comcpare as a string using strcmp()) + * GUID (compare as a guid) * Finally, it returns zero if all of the above match. * Note that it does *NOT* compare its member splits. */