First round of OFX changes.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7017 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2002-06-24 17:49:39 +00:00
parent 18aea89446
commit 93cbc81065
8 changed files with 58 additions and 2 deletions

View File

@ -1,5 +1,13 @@
2002-06-24 David Hampton <hampton@employees.org>
* src/import-export/ofx/Makefile.am:
* src/import-export/ofx/README:
* src/import-export/ofx/gnc-ofx-import.c:
* src/import-export/ofx/gnc-ofx-import.h:
* src/import-export/ofx/gncmod-ofx-import.c:
* src/import-export/ofx/ofx-import.scm: Benoit Gregoire's changes
to make the OFX import module build its own menu item at runtime.
* src/gnome-utils/gnc-mdi-utils.c:
* src/gnome/dialog-price-edit-db.c:
* src/gnome/window-acct-tree.c:

View File

@ -1 +1 @@
EXTRA_DIST = gettext.m4
EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4 gettext.m4

View File

@ -18,6 +18,11 @@ libgncmod_ofx_la_LIBADD = \
${GLIB_LIBS} \
-lofx -lstdc++
gncscmdir = ${GNC_SCM_INSTALL_DIR}/ofx
gncscm_DATA = \
ofx-import.scm
#gladedir = ${GNC_GLADE_DIR}
#glade_DATA = ofx.glade

View File

@ -0,0 +1,23 @@
This is the new OFX import module. It's still very young, but it is now ready for other people to test.
Note: You should also read src/import-export/generic-import-design.txt
Implemented features (some of these are from the generic import module):
-OFX file selection
-Account matching, using unique OFX account ID
-Account creation
-Transaction duplicate matching, using the unique OFX transaction ID only.
-Saving of ALL transaction data currently supported by LibOFX. When no gnucash equivalent, it is put in the Transaction's Note field. You must have double-line mode enabled to view the notes field.
Unimplemented features:
-Account currency compatibility check
-Automaticaly set sane defaults when creating new account (parent account, sibling, currency, etc.)
-Transaction fuzzy matching and split balancing
To compile:
./autogen.sh --enable-ofx
make
If sucessfull, an item will apear in Gnucash's File/Import submenu.
You must have LibOFX > 0.23 installed. http://step.polymtl.ca/~bock/libofx/
LibOFX depends on OpenSP , read LibOFX's "INSTALL" file. LibOFX needs a recent version (1.5pre5 as of this writing, 1.4 might work).
I suggest you first run your ofx file thru ofxdump before you try it from GnuCash.diff -up 'gnucash_orig/src/import-export/ofx/gnc-ofx-import.c' 'gnucash_test/src/import-export/ofx/gnc-ofx-import.c'

View File

@ -30,6 +30,7 @@
#include <sys/time.h>
#include <glib.h>
#include <guile/gh.h>
#include <gmodule.h>
#include "libofx.h"
@ -44,6 +45,12 @@
* Entry point
\********************************************************************/
SCM scm_gnc_file_ofx_import ()
{
gnc_file_ofx_import();
return SCM_EOL;
}
void gnc_file_ofx_import (void)
{
extern int ofx_PARSER_msg;

View File

@ -30,5 +30,5 @@
* are merged into the existing session (if any). The current
* session continues to remain open for editing. */
void gnc_file_ofx_import (void);
SCM scm_gnc_file_ofx_import (void);
#endif

View File

@ -8,6 +8,7 @@
#include <glib.h>
#include <guile/gh.h>
#include "gnc-ofx-import.h"
#include "gnc-module.h"
#include "gnc-module-api.h"
@ -46,6 +47,8 @@ gnc_module_init(int refcount)
{
return FALSE;
}
gh_eval_str("(load-from-path \"ofx/ofx-import.scm\")");
gh_new_procedure("gnc:ofx-import", scm_gnc_file_ofx_import, 0, 0, 0);
return TRUE;
}

View File

@ -0,0 +1,10 @@
(define (add-ofx-menu-item)
(gnc:add-extension
(gnc:make-menu-item(N_ "Import OFX/QFX")
(N_ "Process an OFX/QFX response file")
(list "File" "Import" "")
(lambda ()
(gnc:ofx-import)))))
(gnc:hook-add-dangler gnc:*ui-startup-hook* add-ofx-menu-item)