AUDIT: r16907 - gnucash/trunk/src/import-export/qif-import - Bug#510962: warn the user when encountering a QIF import file without date lines. Patch from Charles Day <cedayiv gmail com>.

Josh Sled jsled at cvs.gnucash.org
Thu Jan 31 19:45:08 EST 2008


Author: jsled
Date: 2008-01-31 19:45:08 -0500 (Thu, 31 Jan 2008)
New Revision: 16907
Trac: http://svn.gnucash.org/trac/changeset/16907

Modified:
   gnucash/trunk/src/import-export/qif-import/qif-file.scm
Log:
Bug#510962: warn the user when encountering a QIF import file without date lines.  Patch from Charles Day <cedayiv gmail com>.
BP


Modified: gnucash/trunk/src/import-export/qif-import/qif-file.scm
===================================================================
--- gnucash/trunk/src/import-export/qif-import/qif-file.scm	2008-02-01 00:44:14 UTC (rev 16906)
+++ gnucash/trunk/src/import-export/qif-import/qif-file.scm	2008-02-01 00:45:08 UTC (rev 16907)
@@ -40,6 +40,7 @@
           (tag #f)
           (value #f)
           (heinous-error #f)
+          (missing-date-warned #f)
           (delimiters (string #\cr #\nl))
           (progress-dialog '())
           (file-stats (stat path))
@@ -238,7 +239,17 @@
                                                 current-account-name) 
                         
                         (if (qif-xtn:date current-xtn)
-                            (qif-file:add-xtn! self current-xtn))
+                            (qif-file:add-xtn! self current-xtn)
+                            ;; The date is missing! Warn the user if they
+                            ;; haven't been warned already.
+                            (if (not missing-date-warned)
+                                (begin
+                                  (set! missing-date-warned #t)
+                                  (gnc-warning-dialog '() (string-append
+                              (_ "One or more transactions is missing a date.")
+                              "\n"
+                              (_ "Some transactions may be discarded."))))))
+
                         ;;(write current-xtn) (newline)
                         (set! current-xtn (make-qif-xtn))
                         (set! current-split #f)



More information about the gnucash-changes mailing list