mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 756416 - CSV data with Posted information will always have last invoice not posted.
When importing the last line of the CSV the gtk_tree_model_get() never happens and the following compare uses the previous value of new_id, which is now = id, so the last invoice is never posted. Set new_id = Null before gtk_tree_model_get() to ensure processing the last line.
This commit is contained in:
@@ -760,10 +760,10 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
|
||||
gncInvoiceAddEntry (invoice, entry);
|
||||
}
|
||||
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter);
|
||||
|
||||
// handle auto posting of invoices
|
||||
|
||||
|
||||
new_id = NULL;
|
||||
|
||||
if (valid)
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, ID, &new_id, -1);
|
||||
if (g_strcmp0 (id, new_id) != 0)
|
||||
@@ -790,6 +790,7 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
|
||||
memo_posted,
|
||||
text2bool (accumulatesplits),
|
||||
auto_pay);
|
||||
DEBUG("Invoice %s posted",id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user