mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Factor out importing functions that might be useful for mt940 importer.
2006-01-24 Christian Stimming <stimming@tuhh.de> * src/import-export/hbci/gnc-hbci-gettrans.h: Factor out importing functions that might be useful for mt940 importer. * src/import-export/hbci/gnc-hbci-transfer.c: Fix wrong amount sign. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12972 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2006-01-24 Christian Stimming <stimming@tuhh.de>
|
||||||
|
|
||||||
|
* src/import-export/hbci/gnc-hbci-gettrans.h: Factor out importing
|
||||||
|
functions that might be useful for mt940 importer.
|
||||||
|
|
||||||
|
* src/import-export/hbci/gnc-hbci-transfer.c: Fix wrong amount
|
||||||
|
sign.
|
||||||
|
|
||||||
2006-01-23 Derek Atkins <derek@ihtfp.com>
|
2006-01-23 Derek Atkins <derek@ihtfp.com>
|
||||||
|
|
||||||
* src/engine/test/Makefile.am: add explicit libdep on libcore-utils.la
|
* src/engine/test/Makefile.am: add explicit libdep on libcore-utils.la
|
||||||
|
|||||||
@@ -199,18 +199,8 @@ gnc_hbci_gettrans_final(GtkWidget *parent,
|
|||||||
|
|
||||||
trans_list = AB_JobGetTransactions_GetTransactions(trans_job);
|
trans_list = AB_JobGetTransactions_GetTransactions(trans_job);
|
||||||
if (trans_list && (AB_Transaction_List2_GetSize(trans_list) > 0)) {
|
if (trans_list && (AB_Transaction_List2_GetSize(trans_list) > 0)) {
|
||||||
struct trans_list_data data;
|
/* Final importing part. */
|
||||||
GNCImportMainMatcher *importer_generic_gui =
|
return gnc_hbci_import_final(parent, gnc_acc, trans_list, run_until_done);
|
||||||
gnc_gen_trans_list_new(NULL, NULL, TRUE, 14);
|
|
||||||
|
|
||||||
data.importer_generic = importer_generic_gui;
|
|
||||||
data.gnc_acc = gnc_acc;
|
|
||||||
|
|
||||||
AB_Transaction_List2_ForEach (trans_list, trans_list_cb, &data);
|
|
||||||
|
|
||||||
if (run_until_done)
|
|
||||||
return gnc_gen_trans_list_run (importer_generic_gui);
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog = gtk_message_dialog_new(GTK_WINDOW(parent),
|
dialog = gtk_message_dialog_new(GTK_WINDOW(parent),
|
||||||
@@ -226,6 +216,31 @@ gnc_hbci_gettrans_final(GtkWidget *parent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gnc_hbci_import_final(GtkWidget *parent,
|
||||||
|
Account *gnc_acc,
|
||||||
|
AB_TRANSACTION_LIST2 *trans_list,
|
||||||
|
gboolean run_until_done)
|
||||||
|
{
|
||||||
|
struct trans_list_data data;
|
||||||
|
GNCImportMainMatcher *importer_generic_gui;
|
||||||
|
|
||||||
|
if (!trans_list || (AB_Transaction_List2_GetSize(trans_list) == 0))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
importer_generic_gui = gnc_gen_trans_list_new(parent, NULL, TRUE, 14);
|
||||||
|
|
||||||
|
data.importer_generic = importer_generic_gui;
|
||||||
|
data.gnc_acc = gnc_acc;
|
||||||
|
|
||||||
|
AB_Transaction_List2_ForEach (trans_list, trans_list_cb, &data);
|
||||||
|
|
||||||
|
if (run_until_done)
|
||||||
|
return gnc_gen_trans_list_run (importer_generic_gui);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* list_AB_TRANSACTION_foreach callback. The Conversion from HBCI to
|
/* list_AB_TRANSACTION_foreach callback. The Conversion from HBCI to
|
||||||
GNC transaction is done here, once for each AB_TRANSACTION. */
|
GNC transaction is done here, once for each AB_TRANSACTION. */
|
||||||
static AB_TRANSACTION *trans_list_cb(AB_TRANSACTION *h_trans, void *user_data)
|
static AB_TRANSACTION *trans_list_cb(AB_TRANSACTION *h_trans, void *user_data)
|
||||||
|
|||||||
@@ -38,5 +38,13 @@ gnc_hbci_gettrans_final(GtkWidget *parent,
|
|||||||
const AB_JOB *trans_job,
|
const AB_JOB *trans_job,
|
||||||
gboolean run_until_done);
|
gboolean run_until_done);
|
||||||
|
|
||||||
|
/** Finalize the final importing part of a GetTrans job. Returns true
|
||||||
|
* if everything has been finished succesfully. */
|
||||||
|
gboolean
|
||||||
|
gnc_hbci_import_final(GtkWidget *parent,
|
||||||
|
Account *gnc_acc,
|
||||||
|
AB_TRANSACTION_LIST2 *trans_list,
|
||||||
|
gboolean run_until_done);
|
||||||
|
|
||||||
|
|
||||||
#endif /* GNC_HBCI_GETTRANS_H */
|
#endif /* GNC_HBCI_GETTRANS_H */
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ gnc_hbci_maketrans_final(HBCITransDialog *td, Account *gnc_acc,
|
|||||||
gnc_xfer_dialog_set_amount (transdialog, gnc_numeric_neg (amount));
|
gnc_xfer_dialog_set_amount (transdialog, gnc_numeric_neg (amount));
|
||||||
case SINGLE_TRANSFER:
|
case SINGLE_TRANSFER:
|
||||||
default:*/
|
default:*/
|
||||||
gnc_xfer_dialog_set_amount (transdialog, gnc_numeric_neg (amount));
|
gnc_xfer_dialog_set_amount (transdialog, amount);
|
||||||
/*}*/
|
/*}*/
|
||||||
/* gnc_xfer_dialog_toggle_currency_frame (transdialog, FALSE); */
|
/* gnc_xfer_dialog_toggle_currency_frame (transdialog, FALSE); */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user