gnucash maint: Use correct column for entry date.

Mike Evans mikee at code.gnucash.org
Thu May 18 14:29:50 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/5df97ba2 (commit)
	from  https://github.com/Gnucash/gnucash/commit/178013bf (commit)



commit 5df97ba2a5aa61183a3d6fb03c512f57f9841257
Author: Mike Evans <mikee at saxicola.co.uk>
Date:   Thu May 18 19:27:47 2017 +0100

    Use correct column for entry date.
    
    The date opened will be set to today if that column is blank.

diff --git a/src/plugins/bi_import/dialog-bi-import.c b/src/plugins/bi_import/dialog-bi-import.c
index 1a84e26..a0a5074 100644
--- a/src/plugins/bi_import/dialog-bi-import.c
+++ b/src/plugins/bi_import/dialog-bi-import.c
@@ -224,7 +224,7 @@ gnc_bi_import_read_file (const gchar * filename, const gchar * parser_regexp,
 
 //! \brief try to fix some common errors in the csv representation of invoices
 //! * corrects the date format
-//! * corrects ambiguous values in multi line invoices
+//! * corrects ambigous values in multi line invoices
 //! * ensures customer exists
 //! * if quantity is unset, set to 1
 //! * if price is unset, delete row
@@ -704,15 +704,15 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
             g_date_free (date);
         }
         timespecFromTime64 (&today, gnc_time (NULL));	// set today to the current date
-        if (strlen (date_opened) != 0)	// If a date is specified in CSV
+        if (strlen (date) != 0)	// If a date is specified in CSV
         {
-            qof_scan_date (date_opened, &day, &month, &year); // FIXME: Must check for the return value of qof_scan_date!
+            qof_scan_date (date, &day, &month, &year); // FIXME: Must check for the return value of qof_scan_date!
             gncEntrySetDate(entry, gnc_dmy2timespec (day, month, year));
             gncEntrySetDateEntered(entry, gnc_dmy2timespec (day, month, year));
         }
         else
         {
-            gncEntrySetDate(entry, today);
+            gncEntrySetDate(entry, today); // TODO: DEPRECATED - use gncEntrySetDateGDate() instead!
             gncEntrySetDateEntered(entry, today);
         }
         // Remove escaped quotes



Summary of changes:
 src/plugins/bi_import/dialog-bi-import.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)



More information about the gnucash-changes mailing list