[grisbi-cvs] grisbi/src gsb_file.c,1.40,1.41 import.c,1.260,1.261
Pierre Biava
pbiava at users.sourceforge.net
Tue Feb 17 21:56:59 CET 2009
- Previous message: [grisbi-cvs] grisbi/po de.po,1.61,1.62
- Next message: [grisbi-cvs] grisbi/src gsb_data_transaction.c, 1.55, 1.56 gsb_data_transaction.h, 1.27, 1.28 gsb_file_load.c, 1.150, 1.151 gsb_file_save.c, 1.111, 1.112 gsb_form.c, 1.110, 1.111 gsb_transactions_list.c, 1.153, 1.154 import.c, 1.261, 1.262 transaction_list.c, 1.28, 1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8756/src
Modified Files:
gsb_file.c import.c
Log Message:
correction import of files for bug 417
Index: import.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/import.c,v
retrieving revision 1.260
retrieving revision 1.261
diff -u -d -r1.260 -r1.261
--- import.c 6 Jan 2009 15:21:01 -0000 1.260
+++ import.c 17 Feb 2009 20:56:57 -0000 1.261
@@ -1906,8 +1906,18 @@
/* invert the amount of the transaction if asked */
if (imported_account -> invert_transaction_amount)
- gsb_data_transaction_set_amount ( transaction_number,
- gsb_real_opposite (gsb_data_transaction_get_amount (transaction_number)));
+ {
+ if ( gsb_data_transaction_get_sign (
+ transaction_number ) == GSB_PAYMENT_DEBIT )
+ gsb_data_transaction_set_sign ( transaction_number,
+ GSB_PAYMENT_CREDIT );
+ else
+ gsb_data_transaction_set_sign ( transaction_number,
+ GSB_PAYMENT_DEBIT );
+ gsb_data_transaction_set_amount ( transaction_number,
+ gsb_real_opposite (gsb_data_transaction_get_amount (
+ transaction_number)));
+ }
/* we need to add the transaction now to the tree model here
* to avoid to write again all the account */
@@ -2142,8 +2152,6 @@
else
action_derniere_ventilation = 1;
-
-
if ( ope_import -> bouton
&&
gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON ( ope_import -> bouton )))
@@ -2208,6 +2216,11 @@
/* récupération du montant */
gsb_data_transaction_set_amount ( transaction_number,
imported_transaction -> montant );
+ /* added by pbiava on the 02/17/2009 fix bug 417 */
+ if ( (imported_transaction -> montant).mantissa >= 0)
+ gsb_data_transaction_set_sign ( transaction_number, GSB_PAYMENT_CREDIT );
+ else
+ gsb_data_transaction_set_sign ( transaction_number, GSB_PAYMENT_DEBIT );
/* récupération de la devise */
gsb_data_transaction_set_currency_number ( transaction_number,
Index: gsb_file.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_file.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- gsb_file.c 7 Feb 2009 20:19:14 -0000 1.40
+++ gsb_file.c 17 Feb 2009 20:56:57 -0000 1.41
@@ -35,6 +35,7 @@
#include "./utils.h"
#include "./fenetre_principale.h"
#include "./dialog.h"
+#include "./utils_files.h"
#include "./utils_file_selection.h"
#include "./gsb_assistant_account.h"
#include "./gsb_assistant_file.h"
@@ -310,6 +311,10 @@
void gsb_file_set_backup_path ( const gchar *path )
{
backup_path = my_strdup (path);
+ if ( ! g_file_test ( path, G_FILE_TEST_EXISTS ) )
+ {
+ utils_files_create_XDG_dir ( );
+ }
}
- Previous message: [grisbi-cvs] grisbi/po de.po,1.61,1.62
- Next message: [grisbi-cvs] grisbi/src gsb_data_transaction.c, 1.55, 1.56 gsb_data_transaction.h, 1.27, 1.28 gsb_file_load.c, 1.150, 1.151 gsb_file_save.c, 1.111, 1.112 gsb_form.c, 1.110, 1.111 gsb_transactions_list.c, 1.153, 1.154 import.c, 1.261, 1.262 transaction_list.c, 1.28, 1.29
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list