mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2002-12-14 Christian Stimming <stimming@tuhh.de>
* src/import-export/import-backend.c (matchmap_store_destination): Fix error messages when memo or description is empty. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7683 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
ef48c2edd5
commit
a17b9305e7
@ -1,5 +1,8 @@
|
||||
2002-12-14 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/import-export/import-backend.c (matchmap_store_destination):
|
||||
Fix error messages when memo or description is empty.
|
||||
|
||||
* src/import-export/hbci/gnc-hbci-gettrans.c: Switch to always
|
||||
using the import-main-matcher.
|
||||
|
||||
|
@ -364,6 +364,7 @@ matchmap_store_destination (GncImportMatchMap *matchmap,
|
||||
{
|
||||
GncImportMatchMap *tmp_matchmap = NULL;
|
||||
Account *dest;
|
||||
char *descr, *memo;
|
||||
g_assert (trans_info);
|
||||
|
||||
/* This will store the destination account of the selected match if
|
||||
@ -384,15 +385,19 @@ matchmap_store_destination (GncImportMatchMap *matchmap,
|
||||
(xaccSplitGetAccount
|
||||
(gnc_import_TransInfo_get_fsplit (trans_info))));
|
||||
|
||||
descr = xaccTransGetDescription
|
||||
(gnc_import_TransInfo_get_trans (trans_info));
|
||||
if (descr && (strlen (descr) > 0))
|
||||
gnc_imap_add_account (tmp_matchmap,
|
||||
GNCIMPORT_DESC,
|
||||
xaccTransGetDescription
|
||||
(gnc_import_TransInfo_get_trans (trans_info)),
|
||||
descr,
|
||||
dest);
|
||||
memo = xaccSplitGetMemo
|
||||
(gnc_import_TransInfo_get_fsplit (trans_info));
|
||||
if (memo && (strlen (memo) > 0))
|
||||
gnc_imap_add_account (tmp_matchmap,
|
||||
GNCIMPORT_MEMO,
|
||||
xaccSplitGetMemo
|
||||
(gnc_import_TransInfo_get_fsplit (trans_info)),
|
||||
memo,
|
||||
dest);
|
||||
|
||||
if (matchmap == NULL)
|
||||
@ -701,7 +706,7 @@ gnc_import_process_trans_clist (GtkCList *clist,
|
||||
|
||||
/* Erase the downloaded transaction */
|
||||
xaccTransDestroy(trans_info->trans);
|
||||
DEBUG("CommitEdit trans")
|
||||
/*DEBUG("CommitEdit trans")*/
|
||||
xaccTransCommitEdit(trans_info->trans);
|
||||
}
|
||||
break;
|
||||
|
@ -127,7 +127,7 @@ void gnc_imap_add_account (GncImportMatchMap *imap, const char *category,
|
||||
{
|
||||
kvp_value *value;
|
||||
|
||||
if (!imap || !key || !acc) return;
|
||||
if (!imap || !key || !acc || (strlen (key) == 0)) return;
|
||||
if (!category) {
|
||||
category = key;
|
||||
key = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user