[grisbi-cvs] [git push]Grisbi branch master updated. upstream_version_1_0_0-389-g22b1e57

Pierre Biava noreply at sourceforge.net
Tue Oct 4 09:53:00 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grisbi".

The branch, master has been updated
       via  22b1e574748545c446f4953e0f459a10ebcc7b40 (commit)
       via  3ac15949d804db7e5046f1d26400b4cf3d5bb6d6 (commit)
       via  4fc1215dae6857a337a4356c2c53eebb04b89c8c (commit)
      from  be7ae798025b7bb0b591ad7477e3ae95d6924fa1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://grisbi.git.sourceforge.net/git/gitweb.cgi?p=grisbi/code;a=commitdiff;h=

commit 22b1e574748545c446f4953e0f459a10ebcc7b40
Author: pbiava <pierre.biava at orange.fr>
Date:   Tue Oct 4 08:47:38 2016 +0200

    fixes a bug when importing a category without sub-category

diff --git a/src/import.c b/src/import.c
index db7e265..132c518 100644
--- a/src/import.c
+++ b/src/import.c
@@ -2654,29 +2654,28 @@ gint gsb_import_create_transaction ( struct struct_ope_importation *imported_tra
             }
             else
             {
-            /* it's a normal category */
-
-            gint category_number;
-
-            tab_str = g_strsplit ( imported_transaction -> categ,
-                            ":",
-                            2 );
-
-            /* get the category and create it if doesn't exist */
-            if (tab_str[0])
-                tab_str[0] = g_strstrip (tab_str[0]);
-            category_number = gsb_data_category_get_number_by_name ( tab_str[0],
-                            TRUE,
-                            imported_transaction -> montant.mantissa < 0 );
-            gsb_data_transaction_set_category_number ( transaction_number,
-                            category_number );
-            if (tab_str[1])
-                tab_str[1] = g_strstrip (tab_str[1]);
-            gsb_data_transaction_set_sub_category_number ( transaction_number,
-                            gsb_data_category_get_sub_category_number_by_name ( category_number,
-                            tab_str[1],
-                            TRUE ));
-            g_strfreev(tab_str);
+                /* it's a normal category */
+                gint category_number;
+
+                tab_str = g_strsplit ( imported_transaction -> categ, ":", 2 );
+
+                /* get the category and create it if doesn't exist */
+                if (tab_str[0])
+                    tab_str[0] = g_strstrip (tab_str[0]);
+                category_number = gsb_data_category_get_number_by_name ( tab_str[0],
+                                TRUE,
+                                imported_transaction -> montant.mantissa < 0 );
+                gsb_data_transaction_set_category_number ( transaction_number,
+                                category_number );
+                if (tab_str[1])
+                {
+                    tab_str[1] = g_strstrip (tab_str[1]);
+                    gsb_data_transaction_set_sub_category_number ( transaction_number,
+                                                                  gsb_data_category_get_sub_category_number_by_name ( category_number,
+                                                                  tab_str[1],
+                                                                  TRUE ));
+                }
+                g_strfreev(tab_str);
             }
         }
         else if (payee_number && etat.get_categorie_for_payee &&  !imported_transaction -> cheque )

http://grisbi.git.sourceforge.net/git/gitweb.cgi?p=grisbi/code;a=commitdiff;h=

commit 22b1e574748545c446f4953e0f459a10ebcc7b40
Author: pbiava <pierre.biava at orange.fr>
Date:   Tue Oct 4 08:47:38 2016 +0200

    fixes a bug when importing a category without sub-category

diff --git a/src/import.c b/src/import.c
index db7e265..132c518 100644
--- a/src/import.c
+++ b/src/import.c
@@ -2654,29 +2654,28 @@ gint gsb_import_create_transaction ( struct struct_ope_importation *imported_tra
             }
             else
             {
-            /* it's a normal category */
-
-            gint category_number;
-
-            tab_str = g_strsplit ( imported_transaction -> categ,
-                            ":",
-                            2 );
-
-            /* get the category and create it if doesn't exist */
-            if (tab_str[0])
-                tab_str[0] = g_strstrip (tab_str[0]);
-            category_number = gsb_data_category_get_number_by_name ( tab_str[0],
-                            TRUE,
-                            imported_transaction -> montant.mantissa < 0 );
-            gsb_data_transaction_set_category_number ( transaction_number,
-                            category_number );
-            if (tab_str[1])
-                tab_str[1] = g_strstrip (tab_str[1]);
-            gsb_data_transaction_set_sub_category_number ( transaction_number,
-                            gsb_data_category_get_sub_category_number_by_name ( category_number,
-                            tab_str[1],
-                            TRUE ));
-            g_strfreev(tab_str);
+                /* it's a normal category */
+                gint category_number;
+
+                tab_str = g_strsplit ( imported_transaction -> categ, ":", 2 );
+
+                /* get the category and create it if doesn't exist */
+                if (tab_str[0])
+                    tab_str[0] = g_strstrip (tab_str[0]);
+                category_number = gsb_data_category_get_number_by_name ( tab_str[0],
+                                TRUE,
+                                imported_transaction -> montant.mantissa < 0 );
+                gsb_data_transaction_set_category_number ( transaction_number,
+                                category_number );
+                if (tab_str[1])
+                {
+                    tab_str[1] = g_strstrip (tab_str[1]);
+                    gsb_data_transaction_set_sub_category_number ( transaction_number,
+                                                                  gsb_data_category_get_sub_category_number_by_name ( category_number,
+                                                                  tab_str[1],
+                                                                  TRUE ));
+                }
+                g_strfreev(tab_str);
             }
         }
         else if (payee_number && etat.get_categorie_for_payee &&  !imported_transaction -> cheque )

http://grisbi.git.sourceforge.net/git/gitweb.cgi?p=grisbi/code;a=commitdiff;h=

commit 22b1e574748545c446f4953e0f459a10ebcc7b40
Author: pbiava <pierre.biava at orange.fr>
Date:   Tue Oct 4 08:47:38 2016 +0200

    fixes a bug when importing a category without sub-category

diff --git a/src/import.c b/src/import.c
index db7e265..132c518 100644
--- a/src/import.c
+++ b/src/import.c
@@ -2654,29 +2654,28 @@ gint gsb_import_create_transaction ( struct struct_ope_importation *imported_tra
             }
             else
             {
-            /* it's a normal category */
-
-            gint category_number;
-
-            tab_str = g_strsplit ( imported_transaction -> categ,
-                            ":",
-                            2 );
-
-            /* get the category and create it if doesn't exist */
-            if (tab_str[0])
-                tab_str[0] = g_strstrip (tab_str[0]);
-            category_number = gsb_data_category_get_number_by_name ( tab_str[0],
-                            TRUE,
-                            imported_transaction -> montant.mantissa < 0 );
-            gsb_data_transaction_set_category_number ( transaction_number,
-                            category_number );
-            if (tab_str[1])
-                tab_str[1] = g_strstrip (tab_str[1]);
-            gsb_data_transaction_set_sub_category_number ( transaction_number,
-                            gsb_data_category_get_sub_category_number_by_name ( category_number,
-                            tab_str[1],
-                            TRUE ));
-            g_strfreev(tab_str);
+                /* it's a normal category */
+                gint category_number;
+
+                tab_str = g_strsplit ( imported_transaction -> categ, ":", 2 );
+
+                /* get the category and create it if doesn't exist */
+                if (tab_str[0])
+                    tab_str[0] = g_strstrip (tab_str[0]);
+                category_number = gsb_data_category_get_number_by_name ( tab_str[0],
+                                TRUE,
+                                imported_transaction -> montant.mantissa < 0 );
+                gsb_data_transaction_set_category_number ( transaction_number,
+                                category_number );
+                if (tab_str[1])
+                {
+                    tab_str[1] = g_strstrip (tab_str[1]);
+                    gsb_data_transaction_set_sub_category_number ( transaction_number,
+                                                                  gsb_data_category_get_sub_category_number_by_name ( category_number,
+                                                                  tab_str[1],
+                                                                  TRUE ));
+                }
+                g_strfreev(tab_str);
             }
         }
         else if (payee_number && etat.get_categorie_for_payee &&  !imported_transaction -> cheque )

-----------------------------------------------------------------------

Summary of changes:
 src/gsb_form.c |   35 ++++++++++++++++++++++++-----------
 src/import.c   |   47 +++++++++++++++++++++++------------------------
 2 files changed, 47 insertions(+), 35 deletions(-)


hooks/post-receive
-- 
Grisbi


More information about the cvs mailing list