X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fhomebank;a=blobdiff_plain;f=src%2Fhb-import-qif.c;h=54f458a0e7777f3d2e788215b1b8b6e321d7abc0;hp=98eb0b3d6c18b6fe1e37b16b0d023ae5f121e700;hb=cd13d9691c46c2b2d6d459e9e6a76bed1c21b7a6;hpb=996fa4ab9f6b836001f8ad0eecbfd3821687fea7 diff --git a/src/hb-import-qif.c b/src/hb-import-qif.c index 98eb0b3..54f458a 100644 --- a/src/hb-import-qif.c +++ b/src/hb-import-qif.c @@ -1,5 +1,5 @@ /* HomeBank -- Free, easy, personal accounting for everyone. - * Copyright (C) 1995-2016 Maxime DOYEN + * Copyright (C) 1995-2018 Maxime DOYEN * * This file is part of HomeBank. * @@ -230,9 +230,9 @@ account_qif_get_child_transfer(Transaction *src, GList *list) { Transaction *item; - DB( g_print("([qif] get_child_transfer\n") ); + DB( g_print(" \n[qif] get_child_transfer\n") ); - //DB( g_print(" search: %d %s %f %d=>%d\n", src->date, src->wording, src->amount, src->account, src->kxferacc) ); + DB( g_print(" search: %d %s %f %d=>%d\n", src->date, src->wording, src->amount, src->kacc, src->kxferacc) ); list = g_list_first(list); while (list != NULL) @@ -245,7 +245,7 @@ Transaction *item; src->kxferacc == item->kacc && ABS(src->amount) == ABS(item->amount) ) { - //DB( g_print(" found : %d %s %f %d=>%d\n", item->date, item->wording, item->amount, item->account, item->kxferacc) ); + DB( g_print(" found : %d %s %f %d=>%d\n", item->date, item->wording, item->amount, item->kacc, item->kxferacc) ); return item; } @@ -253,7 +253,7 @@ Transaction *item; list = g_list_next(list); } - //DB( g_print(" not found...\n") ); + DB( g_print(" not found...\n") ); return NULL; } @@ -640,7 +640,7 @@ GList *list = NULL; //isodate = hb_qif_parser_check_iso_date(&ctx); //DB( g_print(" -> date is dd/mm/yy: %d\n", isodate) ); - DB( g_print("\n\n -> transform to hb txn\n") ); + DB( g_print("\n\n -> start transform all qif txn to hb txn\n") ); DB( g_print(" -> %d qif txn\n", g_list_length(ctx.q_tra)) ); @@ -675,7 +675,7 @@ GList *list = NULL; } if( PREFS->dtex_qifmemo ) - newope->wording = g_strdup(tmpmemo); + newope->memo = g_strdup(tmpmemo); newope->info = g_strdup(item->info); newope->amount = item->amount; @@ -789,13 +789,11 @@ GList *list = NULL; if( child != NULL) { //DB( g_print(" -> transaction already exist\n" ) ); - da_transaction_free(newope); } else { //DB( g_print(" -> append trans. acc:'%s', memo:'%s', val:%.2f\n", item->account, item->memo, item->amount ) ); - list = g_list_append(list, newope); } @@ -808,10 +806,6 @@ GList *list = NULL; DB( g_print(" -> %d txn converted\n", g_list_length(list)) ); DB( g_print(" -> %d errors\n", ictx->cnt_err_date) ); - - - return list; } -