[grisbi-cvs] grisbi/src gsb_data_transaction.c, 1.78, 1.79 gsb_file_load.c, 1.203, 1.204

Pierre Biava pbiava at users.sourceforge.net
Wed Jan 13 23:38:23 CET 2010


Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14788/src

Modified Files:
	gsb_data_transaction.c gsb_file_load.c 
Log Message:
initialization of the currency for the payees, categories and budgetary lines in case of need

Index: gsb_data_transaction.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_transaction.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- gsb_data_transaction.c	13 Jan 2010 19:30:14 -0000	1.78
+++ gsb_data_transaction.c	13 Jan 2010 22:38:19 -0000	1.79
@@ -760,7 +760,6 @@
 
     /* if the transaction currency is the same of the account's one,
      * we just return the transaction's amount */
-
     if ( transaction -> currency_number == return_currency_number )
         return gsb_real_adjust_exponent  ( transaction -> transaction_amount,
 					   return_exponent );

Index: gsb_file_load.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file_load.c,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -d -r1.203 -r1.204
--- gsb_file_load.c	10 Jan 2010 20:11:37 -0000	1.203
+++ gsb_file_load.c	13 Jan 2010 22:38:20 -0000	1.204
@@ -2809,6 +2809,36 @@
     i++;
     }
     while ( attribute_names[i] );
+
+    /* initialization of the currency for the payees, categories and
+     * budgetary lines in case of need */
+    if ( no_devise_totaux_tiers == 0 )
+    {
+        GSList *tmp_list;
+
+        tmp_list = gsb_data_currency_get_currency_list ( );
+        if ( g_slist_length ( tmp_list ) > 0 )
+            no_devise_totaux_tiers = gsb_data_currency_get_no_currency (
+                g_slist_nth_data ( tmp_list, 0 ) );
+    }
+    if ( no_devise_totaux_categ == 0 )
+    {
+        GSList *tmp_list;
+
+        tmp_list = gsb_data_currency_get_currency_list ( );
+        if ( g_slist_length ( tmp_list ) > 0 )
+            no_devise_totaux_categ = gsb_data_currency_get_no_currency (
+                g_slist_nth_data ( tmp_list, 0 ) );
+    }
+    if ( no_devise_totaux_ib == 0 )
+    {
+        GSList *tmp_list;
+
+        tmp_list = gsb_data_currency_get_currency_list ( );
+        if ( g_slist_length ( tmp_list ) > 0 )
+            no_devise_totaux_ib = gsb_data_currency_get_no_currency (
+                g_slist_nth_data ( tmp_list, 0 ) );
+    }
 }
 
 



More information about the cvs mailing list