32 #include <glib/gi18n.h>
33 #include <gwenhywfar/gwenhywfar.h>
34 #include <aqbanking/banking.h>
36 #include "window-reconcile.h"
49 #include "engine-helpers.h"
51 #ifdef AQBANKING_VERSION_5_PLUS
52 # include <aqbanking/abgui.h>
59 static AB_BANKING *gnc_AB_BANKING = NULL;
60 static gint gnc_AB_BANKING_refcount = 0;
62 static gpointer join_ab_strings_cb(
const gchar *str, gpointer user_data);
63 static Account *gnc_ab_accinfo_to_gnc_acc(
65 static const AB_TRANSACTION *txn_transaction_cb(
66 const AB_TRANSACTION *element, gpointer user_data);
67 static AB_IMEXPORTER_ACCOUNTINFO *txn_accountinfo_cb(
68 AB_IMEXPORTER_ACCOUNTINFO *element, gpointer user_data);
69 static AB_IMEXPORTER_ACCOUNTINFO *bal_accountinfo_cb(
70 AB_IMEXPORTER_ACCOUNTINFO *element, gpointer user_data);
78 gboolean execute_txns;
81 AB_JOB_LIST2 *job_list;
89 gchar* gwen_logging = g_strdup(g_getenv(
"GWEN_LOGLEVEL"));
90 gchar* aqb_logging = g_strdup(g_getenv(
"AQBANKING_LOGLEVEL"));
100 GWEN_Logger_SetLevel(NULL, GWEN_LoggerLevel_Info);
101 GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevel_Info);
104 GWEN_Logger_SetLevel(AQBANKING_LOGDOMAIN, GWEN_LoggerLevel_Debug);
110 GWEN_Logger_SetLevel(NULL, GWEN_LoggerLevel_Error);
111 GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevel_Error);
114 GWEN_Logger_SetLevel(AQBANKING_LOGDOMAIN, GWEN_LoggerLevel_Warning);
116 g_free(gwen_logging);
126 GWEN_Logger_SetLevel(NULL, GWEN_LoggerLevel_Error);
127 GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevel_Warning);
128 GWEN_Logger_SetLevel(AQBANKING_LOGDOMAIN, GWEN_LoggerLevel_Warning);
134 static GWEN_GUI *gnc_gwengui_extended_by_ABBanking;
144 api = gnc_AB_BANKING;
147 if (gnc_AB_BANKING_refcount == 0)
148 g_return_val_if_fail(AB_Banking_Init(api) == 0, NULL);
153 api = AB_Banking_new(
"gnucash", NULL, 0);
154 g_return_val_if_fail(api, NULL);
156 #ifdef AQBANKING_VERSION_4_PLUS
158 if (AB_Banking_HasConf4(api
159 # ifndef AQBANKING_VERSION_5_PLUS
164 if (AB_Banking_HasConf3(api
165 # ifndef AQBANKING_VERSION_5_PLUS
170 g_message(
"gnc_AB_BANKING_new: importing aqbanking3 configuration\n");
171 if (AB_Banking_ImportConf3(api
172 # ifndef AQBANKING_VERSION_5_PLUS
177 g_message(
"gnc_AB_BANKING_new: unable to import aqbanking3 configuration\n");
180 else if (AB_Banking_HasConf2(api
181 # ifndef AQBANKING_VERSION_5_PLUS
186 g_message(
"gnc_AB_BANKING_new: importing aqbanking2 configuration\n");
187 if (AB_Banking_ImportConf2(api
188 # ifndef AQBANKING_VERSION_5_PLUS
193 g_message(
"gnc_AB_BANKING_new: unable to import aqbanking2 configuration\n");
200 g_return_val_if_fail(AB_Banking_Init(api) == 0, NULL);
202 #ifdef AQBANKING_VERSION_5_PLUS
203 gnc_gwengui_extended_by_ABBanking = GWEN_Gui_GetGui();
204 AB_Gui_Extend(gnc_gwengui_extended_by_ABBanking, api);
208 gnc_AB_BANKING = api;
209 gnc_AB_BANKING_refcount = 0;
212 gnc_AB_BANKING_refcount++;
221 api = gnc_AB_BANKING;
225 if (api == gnc_AB_BANKING)
227 gnc_AB_BANKING = NULL;
231 AB_Banking_free(api);
239 if (api == gnc_AB_BANKING)
241 if (--gnc_AB_BANKING_refcount == 0)
243 #ifdef AQBANKING_VERSION_5_PLUS
244 if (gnc_gwengui_extended_by_ABBanking)
245 AB_Gui_Unextend(gnc_gwengui_extended_by_ABBanking);
246 gnc_gwengui_extended_by_ABBanking = NULL;
248 return AB_Banking_Fini(api);
253 #ifdef AQBANKING_VERSION_5_PLUS
254 if (gnc_gwengui_extended_by_ABBanking)
255 AB_Gui_Unextend(gnc_gwengui_extended_by_ABBanking);
256 gnc_gwengui_extended_by_ABBanking = NULL;
258 return AB_Banking_Fini(api);
266 AB_ACCOUNT *ab_account = NULL;
267 const gchar *bankcode = NULL;
268 const gchar *accountid = NULL;
269 guint32 account_uid = 0;
277 ab_account = AB_Banking_GetAccount(api, account_uid);
279 if (!ab_account && bankcode && *bankcode && accountid && *accountid)
281 g_message(
"gnc_ab_get_ab_account: No AB_ACCOUNT found for UID %d, "
282 "trying bank code\n", account_uid);
283 ab_account = AB_Banking_GetAccountByCodeAndNumber(api, bankcode,
289 else if (bankcode && *bankcode && accountid && *accountid)
291 ab_account = AB_Banking_GetAccountByCodeAndNumber(api, bankcode,
303 return g_strdup_printf(
"%.2f %s",
304 AB_Value_GetValueAsDouble(value),
305 AB_Value_GetCurrency(value));
307 return g_strdup_printf(
"%.2f", 0.0);
315 join_ab_strings_cb(
const gchar *str, gpointer user_data)
317 gchar **acc = user_data;
329 gchar *join = g_strjoin(
" ", *acc, tmp, (gchar*) NULL);
344 const GWEN_STRINGLIST *ab_remote_name;
345 gchar *gnc_other_name = NULL;
347 g_return_val_if_fail(ab_trans, NULL);
349 ab_remote_name = AB_Transaction_GetRemoteName(ab_trans);
351 GWEN_StringList_ForEach(ab_remote_name, join_ab_strings_cb,
354 if (!gnc_other_name || !*gnc_other_name)
356 g_free(gnc_other_name);
357 gnc_other_name = NULL;
360 return gnc_other_name;
366 const GWEN_STRINGLIST *ab_purpose;
367 gchar *gnc_description = NULL;
369 g_return_val_if_fail(ab_trans, g_strdup(
""));
371 ab_purpose = AB_Transaction_GetPurpose(ab_trans);
373 GWEN_StringList_ForEach(ab_purpose, join_ab_strings_cb,
376 if (!gnc_description)
377 gnc_description = g_strdup(
"");
379 return gnc_description;
392 if (description && *description)
394 retval = g_strdup_printf(
"%s; %s", description, other_name);
398 retval = g_strdup(other_name);
403 if (description && *description)
405 retval = g_strdup(description);
409 retval = g_strdup(_(
"Unspecified"));
421 const gchar *ab_remote_accountnumber =
422 AB_Transaction_GetRemoteAccountNumber(ab_trans);
423 const gchar *ab_remote_bankcode =
424 AB_Transaction_GetRemoteBankCode(ab_trans);
426 gchar *ab_other_accountid;
427 gchar *ab_other_bankcode;
429 gboolean have_accountid;
430 gboolean have_bankcode;
435 if (!ab_remote_accountnumber)
436 ab_remote_accountnumber = AB_Transaction_GetRemoteIban(ab_trans);
437 if (!ab_remote_bankcode)
438 ab_remote_bankcode = AB_Transaction_GetRemoteBic(ab_trans);
440 ab_other_accountid = g_strdup(ab_remote_accountnumber ? ab_remote_accountnumber :
"");
441 ab_other_bankcode = g_strdup(ab_remote_bankcode ? ab_remote_bankcode :
"");
448 g_strstrip(ab_other_accountid);
449 g_strstrip(ab_other_bankcode);
452 have_accountid = ab_other_accountid && *ab_other_accountid;
453 have_bankcode = ab_other_bankcode && *ab_other_bankcode;
455 if ( have_accountid || have_bankcode )
457 retval = g_strdup_printf(
"%s %s %s %s",
458 have_accountid ? _(
"Account") :
"",
459 have_accountid ? ab_other_accountid :
"",
460 have_bankcode ? _(
"Bank") :
"",
461 have_bankcode ? ab_other_bankcode :
""
467 retval = g_strdup(
"");
470 g_free(ab_other_accountid);
471 g_free(ab_other_bankcode);
482 const GWEN_TIME *valuta_date;
489 g_return_val_if_fail(ab_trans && gnc_acc, NULL);
492 book = gnc_account_get_book(gnc_acc);
497 valuta_date = AB_Transaction_GetValutaDate(ab_trans);
500 const GWEN_TIME *normal_date = AB_Transaction_GetDate(ab_trans);
502 valuta_date = normal_date;
507 g_warning(
"transaction_cb: Oops, date 'valuta_date' was NULL");
528 xaccSplitSetParent(split, gnc_trans);
529 xaccSplitSetAccount(split, gnc_acc);
533 custref = AB_Transaction_GetCustomerReference(ab_trans);
534 if (custref && *custref
535 && g_ascii_strncasecmp(custref,
"NONREF", 6) != 0)
536 gnc_set_num_action (gnc_trans, split, custref, NULL);
539 fitid = AB_Transaction_GetFiId(ab_trans);
541 gnc_import_set_split_online_id(split, fitid);
545 const AB_VALUE *ab_value = AB_Transaction_GetValue(ab_trans);
546 double d_value = ab_value ? AB_Value_GetValueAsDouble (ab_value) : 0.0;
547 AB_TRANSACTION_TYPE ab_type = AB_Transaction_GetType (ab_trans);
554 if (d_value > 0.0 && ab_type == AB_Transaction_TypeTransfer)
562 g_warning(
"transaction_cb: Oops, value was NULL. Using 0");
582 gnc_ab_accinfo_to_gnc_acc(AB_IMEXPORTER_ACCOUNTINFO *acc_info)
584 const gchar *bankcode, *accountnumber;
588 g_return_val_if_fail(acc_info, NULL);
590 bankcode = AB_ImExporterAccountInfo_GetBankCode(acc_info);
591 accountnumber = AB_ImExporterAccountInfo_GetAccountNumber(acc_info);
592 online_id = g_strconcat(bankcode ? bankcode :
"",
593 accountnumber ? accountnumber :
"",
596 NULL, online_id, 1, AB_ImExporterAccountInfo_GetAccountName(acc_info),
600 g_warning(
"gnc_ab_accinfo_to_gnc_acc: Could not determine source account"
601 " for online_id %s", online_id);
608 static const AB_TRANSACTION *
609 txn_transaction_cb(
const AB_TRANSACTION *element, gpointer user_data)
613 GncABTransType trans_type;
615 g_return_val_if_fail(element && data, NULL);
620 if (data->execute_txns && data->ab_acc)
622 AB_TRANSACTION *ab_trans = AB_Transaction_dup(element);
627 AB_Transaction_SetLocalBankCode(
628 ab_trans, AB_Account_GetBankCode(data->ab_acc));
629 AB_Transaction_SetLocalAccountNumber(
630 ab_trans, AB_Account_GetAccountNumber(data->ab_acc));
631 AB_Transaction_SetLocalCountry(ab_trans,
"DE");
634 switch (AB_Transaction_GetType(ab_trans))
636 case AB_Transaction_TypeDebitNote:
637 trans_type = SINGLE_DEBITNOTE;
639 case AB_Transaction_TypeEuTransfer:
640 trans_type = SEPA_TRANSFER;
642 case AB_Transaction_TypeTransaction:
645 case AB_Transaction_TypeTransfer:
647 trans_type = SINGLE_TRANSFER;
653 if (!job || AB_Job_CheckAvailability(job
654 #ifndef AQBANKING_VERSION_5_PLUS
660 if (gnc_verify_dialog(
662 _(
"The backend found an error during the preparation "
663 "of the job. It is not possible to execute this job. \n"
665 "Most probably the bank does not support your chosen "
666 "job or your Online Banking account does not have the permission "
667 "to execute this job. More error messages might be "
668 "visible on your console log.\n"
670 "Do you want to enter the job again?")))
672 gnc_error_dialog(NULL,
"Sorry, not implemented yet. Please check the console or trace file logs to see which job was rejected.");
682 AB_Transaction_free(ab_trans);
699 AB_JOB *job = g_datalist_get_data(&data->tmp_job_list, jobname);
703 AB_Job_List2_PushBack(data->job_list, job);
710 g_datalist_remove_data(&data->tmp_job_list, jobname);
728 return g_strdup_printf(
"job_%lu", job_id);
733 static AB_IMEXPORTER_ACCOUNTINFO *
734 txn_accountinfo_cb(AB_IMEXPORTER_ACCOUNTINFO *element, gpointer user_data)
739 g_return_val_if_fail(element && data, NULL);
741 if (data->awaiting & IGNORE_TRANSACTIONS)
745 if (!AB_ImExporterAccountInfo_GetFirstTransaction(element))
749 data->awaiting |= FOUND_TRANSACTIONS;
751 if (!(data->awaiting & AWAIT_TRANSACTIONS))
753 if (gnc_verify_dialog(data->parent, TRUE,
"%s",
754 _(
"The bank has sent transaction information "
757 "Do you want to import it?")))
759 data->awaiting |= AWAIT_TRANSACTIONS;
763 data->awaiting |= IGNORE_TRANSACTIONS;
769 gnc_acc = gnc_ab_accinfo_to_gnc_acc(element);
770 if (!gnc_acc)
return NULL;
771 data->gnc_acc = gnc_acc;
773 if (data->execute_txns)
780 gnc_error_dialog(NULL,
"%s",
781 _(
"No Online Banking account found for this "
782 "gnucash account. These transactions will "
783 "not be executed by Online Banking."));
791 if (!data->generic_importer)
795 if (data->execute_txns)
798 gnc_ab_trans_processed_cb, data);
803 AB_ImExporterAccountInfo_TransactionsForEach(element, txn_transaction_cb,
809 static AB_IMEXPORTER_ACCOUNTINFO *
810 bal_accountinfo_cb(AB_IMEXPORTER_ACCOUNTINFO *element, gpointer user_data)
814 AB_ACCOUNT_STATUS *item, *best = NULL;
815 const GWEN_TIME *best_time = NULL;
816 const AB_BALANCE *booked_bal, *noted_bal;
817 const AB_VALUE *booked_val = NULL, *noted_val = NULL;
818 gdouble booked_value, noted_value;
822 gboolean show_recn_window = FALSE;
824 g_return_val_if_fail(element && data, NULL);
826 if (data->awaiting & IGNORE_BALANCES)
830 if (!AB_ImExporterAccountInfo_GetFirstAccountStatus(element))
834 data->awaiting |= FOUND_BALANCES;
837 item = AB_ImExporterAccountInfo_GetFirstAccountStatus(element);
840 const GWEN_TIME *item_time = AB_AccountStatus_GetTime(item);
841 if (!best || GWEN_Time_Diff(best_time, item_time) < 0.0)
844 best_time = item_time;
846 item = AB_ImExporterAccountInfo_GetNextAccountStatus(element);
849 booked_bal = AB_AccountStatus_GetBookedBalance(best);
850 if (!(data->awaiting & AWAIT_BALANCES))
853 if (!booked_bal || AB_Value_IsZero(AB_Balance_GetValue(booked_bal)))
857 if (gnc_verify_dialog(data->parent, TRUE,
"%s",
858 _(
"The bank has sent balance information "
861 "Do you want to import it?")))
863 data->awaiting |= AWAIT_BALANCES;
867 data->awaiting |= IGNORE_BALANCES;
873 gnc_acc = gnc_ab_accinfo_to_gnc_acc(element);
874 if (!gnc_acc)
return NULL;
875 data->gnc_acc = gnc_acc;
880 const GWEN_TIME *ti = AB_Balance_GetTime(booked_bal);
883 booked_tt = GWEN_Time_toTime_t(ti);
891 booked_val = AB_Balance_GetValue(booked_bal);
894 booked_value = AB_Value_GetValueAsDouble(booked_val);
898 g_warning(
"bal_accountinfo_cb: booked_val == NULL. Assuming 0");
904 g_warning(
"bal_accountinfo_cb: booked_bal == NULL. Assuming 0");
910 noted_bal = AB_AccountStatus_GetNotedBalance(best);
913 noted_val = AB_Balance_GetValue(noted_bal);
915 noted_value = AB_Value_GetValueAsDouble(noted_val);
918 g_warning(
"bal_accountinfo_cb: noted_val == NULL. Assuming 0");
924 g_warning(
"bal_accountinfo_cb: noted_bal == NULL. Assuming 0");
931 if (noted_value == 0.0 && booked_value == 0.0)
933 dialog = gtk_message_dialog_new(
934 GTK_WINDOW(data->parent),
935 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
946 _(
"The downloaded Online Banking Balance was zero.\n\n"
947 "Either this is the correct balance, or your bank does not "
948 "support Balance download in this Online Banking version. "
949 "In the latter case you should choose a different "
950 "Online Banking version number in the Online Banking "
951 "(AqBanking or HBCI) Setup. After that, try again to "
952 "download the Online Banking Balance."));
953 gtk_dialog_run(GTK_DIALOG(dialog));
954 gtk_widget_destroy(dialog);
962 gchar *message1 = g_strdup_printf(
963 _(
"Result of Online Banking job: \n"
964 "Account booked balance is %s"),
967 (noted_value == 0.0) ?
969 g_strdup_printf(_(
"For your information: This account also "
970 "has a noted balance of %s\n"),
975 const gchar *message3 =
976 _(
"The booked balance is identical to the current "
977 "reconciled balance of the account.");
978 dialog = gtk_message_dialog_new(
979 GTK_WINDOW(data->parent),
980 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
984 message1, message2, message3);
985 gtk_dialog_run(GTK_DIALOG(dialog));
986 gtk_widget_destroy(GTK_WIDGET(dialog));
991 const char *message3 = _(
"Reconcile account now?");
993 show_recn_window = gnc_verify_dialog(data->parent, TRUE,
"%s\n%s\n%s",
994 message1, message2, message3);
1002 if (show_recn_window)
1003 recnWindowWithBalance(data->parent, gnc_acc, value, booked_tt);
1010 guint awaiting, gboolean execute_txns,
1011 AB_BANKING *api, GtkWidget *parent)
1015 g_return_val_if_fail(context, NULL);
1017 g_return_val_if_fail(!(awaiting & AWAIT_BALANCES)
1018 || !(awaiting & IGNORE_BALANCES),
1020 g_return_val_if_fail(!(awaiting & AWAIT_TRANSACTIONS)
1021 || !(awaiting & IGNORE_TRANSACTIONS),
1024 g_return_val_if_fail(awaiting & AWAIT_TRANSACTIONS || !execute_txns, NULL);
1026 g_return_val_if_fail(!execute_txns || api, NULL);
1028 data->awaiting = awaiting;
1029 data->txn_found = FALSE;
1030 data->execute_txns = execute_txns;
1032 data->parent = parent;
1033 data->job_list = AB_Job_List2_new();
1034 data->tmp_job_list = NULL;
1035 data->generic_importer = NULL;
1037 g_datalist_init(&data->tmp_job_list);
1040 if (!(awaiting & IGNORE_TRANSACTIONS))
1041 AB_ImExporterContext_AccountInfoForEach(context, txn_accountinfo_cb,
1045 if (!(awaiting & IGNORE_BALANCES))
1046 AB_ImExporterContext_AccountInfoForEach(context, bal_accountinfo_cb,
1055 g_return_val_if_fail(ieci, 0);
1057 return ieci->awaiting;
1063 g_return_val_if_fail(ieci, NULL);
1065 return ieci->job_list;
1071 g_return_val_if_fail(ieci, FALSE);
1080 GWEN_DB_NODE *perm_certs = NULL;
1083 g_return_val_if_fail(banking, NULL);
1084 #ifdef AQBANKING_VERSION_4_PLUS
1085 rv = AB_Banking_LoadSharedConfig(banking,
"certs", &perm_certs
1086 # ifndef AQBANKING_VERSION_5_PLUS
1097 g_return_val_if_fail(rv >= 0, NULL);
Dialog for AqBanking transaction data.
guint32 gnc_ab_get_account_uid(const Account *a)
gchar * gnc_ab_get_remote_name(const AB_TRANSACTION *ab_trans)
Transaction * xaccMallocTransaction(QofBook *book)
gboolean gnc_numeric_equal(gnc_numeric a, gnc_numeric b)
void xaccSplitSetBaseValue(Split *s, gnc_numeric value, const gnc_commodity *base_currency)
void xaccTransSetDatePostedSecsNormalized(Transaction *trans, time64 time)
gchar * gnc_AB_JOB_to_readable_string(const AB_JOB *job)
gnc_numeric double_to_gnc_numeric(double n, gint64 denom, gint how)
void gnc_GWEN_Gui_shutdown(void)
#define G_LOG_DOMAIN
Functions providing the SX List as a plugin page.
AB_JOB_LIST2 * gnc_ab_ieci_get_job_list(GncABImExContextImport *ieci)
int xaccAccountGetCommoditySCU(const Account *acc)
gchar * gnc_ab_get_purpose(const AB_TRANSACTION *ab_trans)
gchar * gnc_ab_description_to_gnc(const AB_TRANSACTION *ab_trans)
gchar * gnc_AB_VALUE_to_readable_string(const AB_VALUE *value)
void xaccTransSetDescription(Transaction *trans, const char *desc)
gchar * gnc_AB_JOB_ID_to_string(gulong job_id)
Account * gnc_import_select_account(GtkWidget *parent, const gchar *account_online_id_value, gboolean auto_create, const gchar *account_human_description, const gnc_commodity *new_account_default_commodity, GNCAccountType new_account_default_type, Account *default_selection, gboolean *ok_pressed)
Transaction matcher main window.
gchar * gnc_ab_memo_to_gnc(const AB_TRANSACTION *ab_trans)
gboolean gnc_ab_ieci_run_matcher(GncABImExContextImport *ieci)
void gnc_gen_trans_list_add_tp_cb(GNCImportMainMatcher *info, GNCTransactionProcessedCB trans_processed_cb, gpointer user_data)
Generic and very flexible account matcher/picker.
guint32 gnc_import_TransInfo_get_ref_id(const GNCImportTransInfo *info)
const gchar * gnc_ab_get_account_bankcode(const Account *a)
GNCImportMainMatcher * gnc_gen_trans_list_new(GtkWidget *parent, const gchar *heading, gboolean all_from_same_account, gint match_date_hardlimit)
void gnc_gen_trans_list_add_trans(GNCImportMainMatcher *gui, Transaction *trans)
gboolean gnc_gen_trans_list_run(GNCImportMainMatcher *info)
GWEN_DB_NODE * gnc_ab_get_permanent_certs(void)
void xaccTransSetCurrency(Transaction *trans, gnc_commodity *curr)
Transaction * gnc_ab_trans_to_gnc(const AB_TRANSACTION *ab_trans, Account *gnc_acc)
void xaccSplitSetMemo(Split *split, const char *memo)
AB_BANKING * gnc_AB_BANKING_new(void)
void gnc_utf8_strip_invalid(gchar *str)
void xaccTransBeginEdit(Transaction *trans)
gnc_numeric xaccAccountGetReconciledBalance(const Account *acc)
gint gnc_AB_BANKING_fini(AB_BANKING *api)
Split * xaccMallocSplit(QofBook *book)
Generic api to store and retrieve preferences.
void gnc_gen_trans_list_add_trans_with_ref_id(GNCImportMainMatcher *gui, Transaction *trans, guint32 ref_id)
void gnc_AB_BANKING_delete(AB_BANKING *api)
time64 gnc_time64_get_day_start(time64 time_val)
AB_ACCOUNT * gnc_ab_get_ab_account(const AB_BANKING *api, Account *gnc_acc)
GncABImExContextImport * gnc_ab_import_context(AB_IMEXPORTER_CONTEXT *context, guint awaiting, gboolean execute_txns, AB_BANKING *api, GtkWidget *parent)
gnc_commodity * xaccAccountGetCommodity(const Account *acc)
time64 gnc_time_utc(time64 *tbuf)
get the current utc time
gboolean gnc_prefs_get_bool(const gchar *group, const gchar *pref_name)
Utility functions for writing import modules.
AB_JOB * gnc_ab_get_trans_job(AB_ACCOUNT *ab_acc, const AB_TRANSACTION *ab_trans, GncABTransType trans_type)
time64 gnc_time(time64 *tbuf)
get the current local time
const gchar * gnc_ab_get_account_accountid(const Account *a)
void xaccTransSetDateEnteredSecs(Transaction *trans, time64 secs)
GUI callbacks for AqBanking.
guint gnc_ab_ieci_get_found(GncABImExContextImport *ieci)
API for Transactions and Splits (journal entries)
void gnc_GWEN_Gui_log_init(void)
AqBanking utility functions.
const gchar * QofLogModule