[grisbi-cvs] grisbi/src gsb_transactions_list_sort.c,1.17,1.18

Pierre Biava pbiava at users.sourceforge.net
Tue Sep 22 22:58:32 CEST 2009


Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15762

Modified Files:
	gsb_transactions_list_sort.c 
Log Message:
bug fix sorting operations by value date

Index: gsb_transactions_list_sort.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list_sort.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- gsb_transactions_list_sort.c	12 Sep 2009 19:33:40 -0000	1.17
+++ gsb_transactions_list_sort.c	22 Sep 2009 20:58:29 -0000	1.18
@@ -492,7 +492,7 @@
 
     value_date_2 = gsb_data_transaction_get_value_date ( transaction_number_2 );
     if ( ! value_date_2 )
-        value_date_2 = gsb_data_transaction_get_value_date ( transaction_number_2 );
+        value_date_2 = gsb_data_transaction_get_date ( transaction_number_2 );
 
     if ( value_date_1 )
     {
@@ -501,13 +501,18 @@
         else
             return_value = -1;
     }
-    else if (value_date_2)
-        return_value = 1;
+    else 
+    {
+        if (value_date_2)
+            return_value = 1;
+        else
+            return 0;
+    }
 
     if ( return_value )
         return return_value;
     else
-        return gsb_transactions_list_sort_by_transaction_date_and_no (
+        return gsb_transactions_list_sort_by_date (
                         transaction_number_1, transaction_number_2 );
 }
 



More information about the cvs mailing list