r21186 - gnucash/trunk/src/app-utils - Owner balances: flip sign

Geert Janssens gjanssens at code.gnucash.org
Wed Aug 17 06:54:41 EDT 2011


Author: gjanssens
Date: 2011-08-17 06:54:41 -0400 (Wed, 17 Aug 2011)
New Revision: 21186
Trac: http://svn.gnucash.org/trac/changeset/21186

Modified:
   gnucash/trunk/src/app-utils/gnc-ui-util.c
Log:
Owner balances: flip sign
Now a positive balance means, amount still due, a negative balance
means overpayment. This aligns with other uses of balances like in the
"Bills Due Reminder" dialog

Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c	2011-08-17 10:54:27 UTC (rev 21185)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c	2011-08-17 10:54:41 UTC (rev 21186)
@@ -483,7 +483,7 @@
     balance = gncOwnerGetBalanceInCurrency (owner, commodity);
 
     /* reverse sign if needed */
-    if ((gncOwnerGetType (owner) == GNC_OWNER_CUSTOMER))
+    if ((gncOwnerGetType (owner) != GNC_OWNER_CUSTOMER))
         balance = gnc_numeric_neg (balance);
 
     /* Record whether the balance is negative. */



More information about the gnucash-changes mailing list