GnuCash
2.6.99
|
Modules | |
AqBanking | |
Files | |
file | import-account-matcher.h |
Generic and very flexible account matcher/picker. | |
file | import-backend.h |
Generic importer backend interface. | |
file | import-commodity-matcher.h |
A Generic commodity matcher/picker. | |
file | import-main-matcher.h |
Transaction matcher main window. | |
file | import-match-picker.h |
The transaction match picker dialog interface. | |
file | import-settings.h |
Import preference handling. User preference interface for transaction matching (for both the gui and the backend) | |
file | import-utilities.h |
Utility functions for writing import modules. | |
Data Structures | |
struct | AccountPickerDialog |
struct | _transactioninfo |
struct | _matchinfo |
struct | _main_matcher_info |
struct | _transpickerdialog |
struct | _genimportsettings |
struct | _split_record |
Macros | |
#define | STATE_SECTION "dialogs/import/generic_matcher/account_matcher" |
#define | GNCIMPORT_DESC "desc" |
#define | GNCIMPORT_MEMO "memo" |
#define | GNCIMPORT_PAYEE "payee" |
#define | GNC_PREFS_GROUP "dialogs.import.generic.transaction-list" |
#define | COLOR_RED "brown1" |
#define | COLOR_YELLOW "gold" |
#define | COLOR_GREEN "DarkSeaGreen1" |
#define | GNC_PREFS_GROUP "dialogs.import.generic.match-picker" |
#define | GNC_PREFS_GROUP_IMPORT "dialogs.import.generic" |
#define | GNC_PREF_ENABLE_SKIP "enable-skip" |
#define | GNC_PREF_ENABLE_UPDATE "enable-update" |
#define | GNC_PREF_USE_BAYES "use-bayes" |
#define | GNC_PREF_ATM_FEE_THRESHOLD "atm-fee-threshold" |
#define | GNC_PREF_AUTO_CLEAR_THRESHOLD "auto-clear-threshold" |
#define | GNC_PREF_AUTO_ADD_THRESHOLD "auto-add-threshold" |
#define | GNC_PREF_MATCH_THRESHOLD "match-threshold" |
#define | GNC_PREFS_GROUP "dialogs.log-replay" |
#define | STRING_FIELD_SIZE 256 |
#define | GNC_PREFS_GROUP "dialogs.import.ofx" |
#define | GNC_PREF_AUTO_COMMODITY "auto-create-commodity" |
Typedefs | |
typedef struct _transactioninfo | GNCImportTransInfo |
typedef struct _matchinfo | GNCImportMatchInfo |
typedef struct _GncImportMatchMap | GncImportMatchMap |
typedef enum _action | GNCImportAction |
typedef struct _main_matcher_info | GNCImportMainMatcher |
typedef void(* | GNCTransactionProcessedCB )(GNCImportTransInfo *trans_info, gboolean imported, gpointer user_data) |
typedef struct _transpickerdialog | GNCImportMatchPicker |
typedef struct _genimportsettings | GNCImportSettings |
typedef struct _split_record | split_record |
Functions | |
char * | libgncmod_csv_export_gnc_module_path (void) |
char * | libgncmod_csv_export_gnc_module_description (void) |
int | libgncmod_csv_export_gnc_module_init (int refcount) |
int | libgncmod_csv_export_gnc_module_end (int refcount) |
char * | libgncmod_csv_import_gnc_module_path (void) |
char * | libgncmod_csv_import_gnc_module_description (void) |
int | libgncmod_csv_import_gnc_module_init (int refcount) |
int | libgncmod_csv_import_gnc_module_end (int refcount) |
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) |
AccountPickerDialog * | gnc_import_account_assist_setup (GtkWidget *parent) |
Account * | gnc_import_account_assist_update (AccountPickerDialog *picker) |
GncImportMatchMap * | gnc_account_create_imap (Account *acc) |
Account * | gnc_imap_find_account (GncImportMatchMap *imap, const char *category, const char *key) |
void | gnc_imap_add_account (GncImportMatchMap *imap, const char *category, const char *key, Account *acc) |
Account * | gnc_imap_find_account_bayes (GncImportMatchMap *imap, GList *tokens) |
void | gnc_imap_add_account_bayes (GncImportMatchMap *imap, GList *tokens, Account *acc) |
gnc_commodity * | gnc_import_select_commodity (const char *cusip, gboolean ask_on_unknown, const char *default_fullname, const char *default_mnemonic) |
void | on_matcher_ok_clicked (GtkButton *button, GNCImportMainMatcher *info) |
void | on_matcher_cancel_clicked (GtkButton *button, gpointer user_data) |
void | on_matcher_help_clicked (GtkButton *button, gpointer user_data) |
void | on_matcher_help_close_clicked (GtkButton *button, gpointer user_data) |
void | gnc_gen_trans_list_delete (GNCImportMainMatcher *info) |
GNCImportMainMatcher * | gnc_gen_trans_list_new (GtkWidget *parent, const gchar *heading, gboolean all_from_same_account, gint match_date_hardlimit) |
GNCImportMainMatcher * | gnc_gen_trans_assist_new (GtkWidget *parent, const gchar *heading, gboolean all_from_same_account, gint match_date_hardlimit) |
void | gnc_gen_trans_assist_start (GNCImportMainMatcher *info) |
void | gnc_gen_trans_list_add_tp_cb (GNCImportMainMatcher *info, GNCTransactionProcessedCB trans_processed_cb, gpointer user_data) |
gboolean | gnc_gen_trans_list_run (GNCImportMainMatcher *info) |
void | gnc_gen_trans_list_add_trans (GNCImportMainMatcher *gui, Transaction *trans) |
void | gnc_gen_trans_list_add_trans_with_ref_id (GNCImportMainMatcher *gui, Transaction *trans, guint32 ref_id) |
GtkWidget * | gnc_gen_trans_list_widget (GNCImportMainMatcher *info) |
void | gnc_import_match_picker_run_and_close (GNCImportTransInfo *transaction_info) |
GNCImportSettings * | gnc_import_Settings_new (void) |
void | gnc_import_Settings_delete (GNCImportSettings *settings) |
gboolean | gnc_import_trans_has_online_id (Transaction *transaction) |
gboolean | gnc_import_split_has_online_id (Split *split) |
void | qof_instance_set_guid (gpointer inst, const GncGUID *guid) |
void | gnc_file_log_replay (void) |
char * | libgncmod_log_replay_gnc_module_path (void) |
char * | libgncmod_log_replay_gnc_module_description (void) |
int | libgncmod_log_replay_gnc_module_init (int refcount) |
int | libgncmod_log_replay_gnc_module_end (int refcount) |
int | ofx_proc_security_cb (const struct OfxSecurityData data, void *security_user_data) |
int | ofx_proc_transaction_cb (struct OfxTransactionData data, void *transaction_user_data) |
int | ofx_proc_account_cb (struct OfxAccountData data, void *account_user_data) |
void | gnc_file_ofx_import (void) |
char * | libgncmod_ofx_gnc_module_path (void) |
char * | libgncmod_ofx_gnc_module_description (void) |
int | libgncmod_ofx_gnc_module_init (int refcount) |
int | libgncmod_ofx_gnc_module_end (int refcount) |
Variables | |
int | libgncmod_csv_export_gnc_module_system_interface = 0 |
int | libgncmod_csv_export_gnc_module_current = 0 |
int | libgncmod_csv_export_gnc_module_revision = 0 |
int | libgncmod_csv_export_gnc_module_age = 0 |
int | libgncmod_csv_import_gnc_module_system_interface = 0 |
int | libgncmod_csv_import_gnc_module_current = 0 |
int | libgncmod_csv_import_gnc_module_revision = 0 |
int | libgncmod_csv_import_gnc_module_age = 0 |
int | libgncmod_log_replay_gnc_module_system_interface = 0 |
int | libgncmod_log_replay_gnc_module_current = 0 |
int | libgncmod_log_replay_gnc_module_revision = 0 |
int | libgncmod_log_replay_gnc_module_age = 0 |
GNCImportMainMatcher * | gnc_ofx_importer_gui = NULL |
GList * | ofx_created_commodites = NULL |
int | libgncmod_ofx_gnc_module_system_interface = 0 |
int | libgncmod_ofx_gnc_module_current = 0 |
int | libgncmod_ofx_gnc_module_revision = 0 |
int | libgncmod_ofx_gnc_module_age = 0 |
Non-GUI Functions | |
GdkPixbuf * | gen_probability_pixbuf (gint score_original, GNCImportSettings *settings, GtkWidget *widget) |
void | gnc_import_find_split_matches (GNCImportTransInfo *trans_info, gint process_threshold, double fuzzy_amount_difference, gint match_date_hardlimit) |
gboolean | gnc_import_process_trans_item (GncImportMatchMap *matchmap, GNCImportTransInfo *trans_info) |
gboolean | gnc_import_exists_online_id (Transaction *trans) |
void | gnc_import_TransInfo_init_matches (GNCImportTransInfo *trans_info, GNCImportSettings *settings) |
Getters/Setters for GNCImportMatchInfo | |
Split * | gnc_import_MatchInfo_get_split (const GNCImportMatchInfo *info) |
gint | gnc_import_MatchInfo_get_probability (const GNCImportMatchInfo *info) |
Getters/Setters for GNCImportSettings | |
double | gnc_import_Settings_get_fuzzy_amount (GNCImportSettings *settings) |
gboolean | gnc_import_Settings_get_action_skip_enabled (GNCImportSettings *settings) |
gboolean | gnc_import_Settings_get_action_add_enabled (GNCImportSettings *settings) |
gboolean | gnc_import_Settings_get_action_update_enabled (GNCImportSettings *settings) |
gboolean | gnc_import_Settings_get_action_clear_enabled (GNCImportSettings *settings) |
gint | gnc_import_Settings_get_clear_threshold (GNCImportSettings *settings) |
gint | gnc_import_Settings_get_add_threshold (GNCImportSettings *settings) |
gint | gnc_import_Settings_get_display_threshold (GNCImportSettings *settings) |
void | gnc_import_Settings_set_match_date_hardlimit (GNCImportSettings *s, gint m) |
gint | gnc_import_Settings_get_match_date_hardlimit (const GNCImportSettings *s) |
Setter-getters | |
Setter and getter functions for the online_id kvp_frame for Splits. | |
const gchar * | gnc_import_get_acc_online_id (Account *account) |
void | gnc_import_set_acc_online_id (Account *account, const gchar *id) |
const gchar * | gnc_import_get_trans_online_id (Transaction *transaction) |
void | gnc_import_set_trans_online_id (Transaction *transaction, const gchar *id) |
const gchar * | gnc_import_get_split_online_id (Split *split) |
void | gnc_import_set_split_online_id (Split *split, const gchar *id) |
#define GNC_PREFS_GROUP_IMPORT "dialogs.import.generic" |
The preferences used by the importer
Definition at line 30 of file import-utilities.h.
GdkPixbuf * gen_probability_pixbuf | ( | gint | score, |
GNCImportSettings * | settings, | ||
GtkWidget * | widget | ||
) |
This function generates a new pixmap representing a match score. It is a series of vertical bars of different colors. -Below or at the add_threshold the bars are red -Above or at the clear_threshold the bars are green -Between the two threshold the bars are yellow
score | The score for which to generate a pixmap. |
settings | The user settings from which to get the threshold |
widget | The parent widget in which the pixmap will eventually be added. Will be used to generate the colormap. |
Definition at line 313 of file import-backend.c.
GncImportMatchMap* gnc_account_create_imap | ( | Account * | acc | ) |
Obtain an ImportMatchMap object from an Account
Definition at line 5035 of file Account.c.
void gnc_file_log_replay | ( | void | ) |
The gnc_file_log_replay() routine will pop up a standard file selection dialogue asking the user to pick a log file to replay. If one is selected the the .log file is opened and read. It's contents are then silently merged in the current log file.
Definition at line 547 of file gnc-log-replay.c.
void gnc_file_ofx_import | ( | void | ) |
The gnc_file_ofx_import() routine will pop up a standard file selection dialogue asking the user to pick a OFX/QFX file. If one is selected the the OFX file is opened and read. It's contents are merged into the existing session (if any). The current session continues to remain open for editing.
Definition at line 950 of file gnc-ofx-import.c.
GNCImportMainMatcher * gnc_gen_trans_assist_new | ( | GtkWidget * | parent, |
const gchar * | heading, | ||
gboolean | all_from_same_account, | ||
gint | match_date_hardlimit | ||
) |
Add the Transaction matcher to an existing page of an assistant. Must be called with the parent widget, ie. a vbox that the transaction matcher will be packed into. The data structure GNCImportMainMatcher is returned.
parent | The parent widget. This is the place the transaction matcher will be packed into. |
heading | The heading label in the Importer window. May be NULL. |
all_from_same_account | Set this to TRUE if ALL the transaction that will be added with gnc_gen_trans_list_add_trans are from the same source account. This will cause the account column to be hidden. |
match_date_hardlimit | The number of days that a matching split may differ from the given transaction before it is discarded immediately. In other words, any split that is more distant from the given transaction than this match_date_hardlimit days will be ignored altogether. For use cases without paper checks (e.g. HBCI), values like 14 (days) might be appropriate, whereas for use cases with paper checks (e.g. OFX, QIF), values like 42 (days) seem more appropriate. |
Definition at line 593 of file import-main-matcher.c.
void gnc_gen_trans_assist_start | ( | GNCImportMainMatcher * | info | ) |
This starts the import process for transaction from an assistant. assistant button callback.
info. | A pointer to a the GNCImportMainMatcher structure. |
Definition at line 648 of file import-main-matcher.c.
void gnc_gen_trans_list_add_tp_cb | ( | GNCImportMainMatcher * | info, |
GNCTransactionProcessedCB | trans_processed_cb, | ||
gpointer | user_data | ||
) |
Add transaction processed callback to the transaction importer.
info | The Transaction Importer to use. |
trans_processed_cb | The callback function. |
Definition at line 657 of file import-main-matcher.c.
void gnc_gen_trans_list_add_trans | ( | GNCImportMainMatcher * | gui, |
Transaction * | trans | ||
) |
Add a newly imported Transaction to the Transaction Importer. The Importer takes over ownership of the passed transaction.
gui | The Transaction Importer to use. |
trans | The Transaction to add. The must contain at least one split, and this split must have been associated with an account Only the first split will be used for matching. The transaction must NOT be commited. The Importer takes over ownership of the passed transaction. |
Definition at line 892 of file import-main-matcher.c.
void gnc_gen_trans_list_add_trans_with_ref_id | ( | GNCImportMainMatcher * | gui, |
Transaction * | trans, | ||
guint32 | ref_id | ||
) |
Add a newly imported Transaction to the Transaction Importer and provide an external reference id for it. The Importer takes over ownership of the passed transaction.
gui | The Transaction Importer to use. |
trans | The Transaction to add. The must contain at least one split, and this split must have been associated with an account Only the first split will be used for matching. The transaction must NOT be commited. The Importer takes over ownership of the passed transaction. |
ref_id | Reference id which links an external object to the transaction. |
Definition at line 898 of file import-main-matcher.c.
void gnc_gen_trans_list_delete | ( | GNCImportMainMatcher * | info | ) |
Deletes the given object.
Definition at line 106 of file import-main-matcher.c.
GNCImportMainMatcher * gnc_gen_trans_list_new | ( | GtkWidget * | parent, |
const gchar * | heading, | ||
gboolean | all_from_same_account, | ||
gint | match_date_hardlimit | ||
) |
Create a new generic transaction dialog window and return it.
parent | The parent GtkWidget. May be NULL. |
heading | The heading label in the Importer window. May be NULL. |
all_from_same_account | Set this to TRUE if ALL the transaction that will be added with gnc_gen_trans_list_add_trans are from the same source account. This will cause the account column to be hidden. |
match_date_hardlimit | The number of days that a matching split may differ from the given transaction before it is discarded immediately. In other words, any split that is more distant from the given transaction than this match_date_hardlimit days will be ignored altogether. For use cases without paper checks (e.g. HBCI), values like 14 (days) might be appropriate, whereas for use cases with paper checks (e.g. OFX, QIF), values like 42 (days) seem more appropriate. |
Definition at line 526 of file import-main-matcher.c.
gboolean gnc_gen_trans_list_run | ( | GNCImportMainMatcher * | info | ) |
Run this dialog and return only after the user pressed Ok, Cancel, or closed the window. This means that all actual importing will have been finished upon returning.
Definition at line 665 of file import-main-matcher.c.
GtkWidget * gnc_gen_trans_list_widget | ( | GNCImportMainMatcher * | info | ) |
Returns the widget of this dialog.
Definition at line 938 of file import-main-matcher.c.
void gnc_imap_add_account_bayes | ( | GncImportMatchMap * | imap, |
GList * | tokens, | ||
Account * | acc | ||
) |
Updates the imap for a given account using a list of tokens
Definition at line 5418 of file Account.c.
Account* gnc_imap_find_account_bayes | ( | GncImportMatchMap * | imap, |
GList * | tokens | ||
) |
Look up an Account in the map
< holds the accounts and total token count for a single token
< pointer to the current token from the input GList tokens
< pointer to the struct account_token_count
< an account name and the number of times a token has appeared for the account
< intermediate storage of values to compute the bayes probability of an account
Definition at line 5238 of file Account.c.
AccountPickerDialog * gnc_import_account_assist_setup | ( | GtkWidget * | parent | ) |
Must be called with the parent widget, ie. a vbox that the account picker dialog will be packed into. The data structure AccountPickerDialog is initialised and default values populated.
parent | The parent widget. This is the place the account picker dialog will be packed into. |
Definition at line 411 of file import-account-matcher.c.
Account * gnc_import_account_assist_update | ( | AccountPickerDialog * | picker | ) |
Must be called with an AccountPickerDialog structure allready setup. If an account with a matching online_id kvp_frame is found, which is allready present in the dialog structure, the function returns with a pointer to that account or NULL if not found.
Account | picker Dialog structure, AccountPickerDialog |
Definition at line 462 of file import-account-matcher.c.
gboolean gnc_import_exists_online_id | ( | Transaction * | trans | ) |
Checks whether the given transaction's online_id already exists in its parent account.
Checks whether the given transaction's online_id already exists in its parent account. The given transaction has to be open for editing. If a matching online_id exists, the transaction is destroyed (!) and TRUE is returned, otherwise FALSE is returned.
trans | The transaction for which to check for an existing online_id. |
Definition at line 1161 of file import-backend.c.
void gnc_import_find_split_matches | ( | GNCImportTransInfo * | trans_info, |
gint | process_threshold, | ||
double | fuzzy_amount_difference, | ||
gint | match_date_hardlimit | ||
) |
/brief Iterate through all splits of the originating account of the given transaction, and find all matching splits there.
Iterate through all splits of the originating account of the given transaction, find all matching splits there, and store them in the GNCImportTransInfo structure.
trans_info | The TransInfo for which the corresponding matching existing transactions should be found. |
process_threshold | Each match whose heuristics are smaller than this value is totally ignored. |
fuzzy_amount_difference | For fuzzy amount matching, a certain fuzzyness in the matching amount is allowed up to this value. May be e.g. 3.00 dollars for ATM fees, or 0.0 if you only want to allow exact matches. |
match_date_hardlimit | The number of days that a matching split may differ from the given transaction before it is discarded immediately. In other words, any split that is more distant from the given transaction than this match_date_hardlimit days will be ignored altogether. For use cases without paper checks (e.g. HBCI), values like 14 (days) might be appropriate, whereas for use cases with paper checks (e.g. OFX, QIF), values like 42 (days) seem more appropriate. |
Definition at line 842 of file import-backend.c.
void gnc_import_match_picker_run_and_close | ( | GNCImportTransInfo * | transaction_info | ) |
Run a match_picker dialog so that the selected-MatchInfo in the given trans_info is updated accordingly. This functions will only return after the user clicked Ok, Cancel, or Window-Close.
Run a match_picker dialog where the user should pick the best match for 'one' given transaction, so that the selected-MatchInfo in the given trans_info is updated accordingly. This functions will only return after the user clicked Ok, Cancel, or Window-Close.
The dialog uses the same functionality as the one created through gnc_import_add_trans(), except that its two listviews are shown above one another, and the listview of downloaded transactions shows only one transaction, namely, the given trans_info.
This function is used from the gnc-gen-transaction code.
transaction_info | The TransInfo for which the user is supposed to pick a matching transaction. |
Definition at line 443 of file import-match-picker.c.
gint gnc_import_MatchInfo_get_probability | ( | const GNCImportMatchInfo * | info | ) |
Get the probability (confidence level) of this MatchInfo.
info | Can be NULL, in which case the function returns 0 |
Definition at line 277 of file import-backend.c.
Split * gnc_import_MatchInfo_get_split | ( | const GNCImportMatchInfo * | info | ) |
Get the split ('this-side split') of this MatchInfo.
Definition at line 270 of file import-backend.c.
gboolean gnc_import_process_trans_item | ( | GncImportMatchMap * | matchmap, |
GNCImportTransInfo * | trans_info | ||
) |
/brief – Processes one match according to its selected action.
This function is intended to be called when the importer dialog is finished. It should be called once for each imported transaction and processes each ImportTransInfo according to its selected action: For GNCImport_ADD, the transaction is added etc. etc.
Each succesful match is also stored in the given ImportMatchMap, or, if that argument is NULL, in the ImportMatchMap of each originating account.
matchmap | The ImportMatchMap where each match should be stored. May be NULL, in which case the ImportMatchMap of each account will be used. |
trans_info | The ImportTransInfo item to process. |
Definition at line 905 of file import-backend.c.
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 | ||
) |
Must be called with a string containing a unique identifier for the account. If an account with a matching online_id kvp_frame is found, the function immediately returns with a pointer to that account. Otherwise, the user is prompted to select a GnuCash account or create a new one (in both cases, the unique identifier is written to the account's kvp_frame, so the user won't be prompted again). If the user refuses to select or create an account, NULL is returned.
parent | The parent widget. Can be NULL. |
account_online_id_value | The string containing your unique account_id coming from some string of your module. This is the normal mode of operation. Can be NULL. |
If account_online_id_value==NULL, you basically end up with an account selector that allows you to select an account whose GncGUID will be remembered elsewhere. You would fill account_human_description to tell the user what he is looking for. In this mode, the online_id kvp_frame of the found account will not be touched. To use this mode, auto_create must NOT be set to 0.
account_human_description | A human-readable description of the account. Can be NULL. If it is not NULL, it will be shown before the id in the account matching dialog. It will also be used as the default account name if a new account is created. |
new_account_default_commodity | Default commodity of the new account. Can be NULL. If not NULL, it will be the account's commodity if a new account is created. Also, if not NULL, the function will also warn the user if the found or created account's commodity doesn't match. |
new_account_default_type | Default account type of a new account. Can be NULL. If not ACCT_TYPE_NONE, it will be the account's type if a new account is created. If not ACCT_TYPE_NONE, the function will also warn the user if the found or created account's commodity doesn't match. |
auto_create | Only active if no account with the account_online_id_value could be found in gnucash, or if online-id was NULL. In that case, if auto_create is TRUE (nonzero), the user will be asked to create a new account. If auto_create is FALSE (zero), this function will simply return NULL but will neither select nor create any account. |
default_selection | If not NULL, that account will be pre-selected by default. |
ok_pressed | A pointer to gboolean. If non-NULL, whether or not the picker dialog was closed by the user pressing ok will be stored in the parameter. If no dialog was created by the gnc_import_select_account() call, TRUE is always returned. |
Definition at line 224 of file import-account-matcher.c.
gnc_commodity * gnc_import_select_commodity | ( | const char * | cusip, |
gboolean | ask_on_unknown, | ||
const char * | default_fullname, | ||
const char * | default_mnemonic | ||
) |
Must be called with a string containing a unique identifier for the commodity. If an commodity with a matching cusip is found, the function immediately returns with a pointer to that commodity. Otherwise, the user may be prompted to select a GnuCash commodity or create a new one (in both cases, the cusip is written to the commodity's cusip field, overwriting anything that was there before.
cusip | The string containing the code for which you want a matching commodity. A CUISP code or similar UNIQUE code. The stock ticker is NOT appropriate, unless you have no other option. Must be non-NULL. |
ask_on_unknown | If the cusip value is unknown and this parameter is false (zero), the function returns NULL. Otherwise the user will be asked to select an existing or create a new commodity. |
default_fullname | A human-readable description of the commodity, such as the stock name. Can be NULL. If it is not NULL, it will be shown to the user when selecting a commodity. It will also be used as the default if a new commodity is created. |
default_mnemonic | Usually the stock ticker or similar. Can be NULL. If it is not NULL, it will be shown to the user when selecting a commodity. It will also be used as the default if a new commodity is created. |
Definition at line 53 of file import-commodity-matcher.c.
void gnc_import_Settings_delete | ( | GNCImportSettings * | settings | ) |
Destructor
Definition at line 106 of file import-settings.c.
gboolean gnc_import_Settings_get_action_add_enabled | ( | GNCImportSettings * | settings | ) |
Return the selected action is enable state.
Definition at line 127 of file import-settings.c.
gboolean gnc_import_Settings_get_action_clear_enabled | ( | GNCImportSettings * | settings | ) |
Return the selected action is enable state.
Definition at line 139 of file import-settings.c.
gboolean gnc_import_Settings_get_action_skip_enabled | ( | GNCImportSettings * | settings | ) |
Return the selected action is enable state.
Definition at line 121 of file import-settings.c.
gboolean gnc_import_Settings_get_action_update_enabled | ( | GNCImportSettings * | settings | ) |
Return the selected action is enable state.
Definition at line 133 of file import-settings.c.
gint gnc_import_Settings_get_add_threshold | ( | GNCImportSettings * | settings | ) |
gint gnc_import_Settings_get_clear_threshold | ( | GNCImportSettings * | settings | ) |
gint gnc_import_Settings_get_display_threshold | ( | GNCImportSettings * | settings | ) |
double gnc_import_Settings_get_fuzzy_amount | ( | GNCImportSettings * | settings | ) |
Return the allowed amount range for fuzzy amount matching.
Definition at line 115 of file import-settings.c.
gint gnc_import_Settings_get_match_date_hardlimit | ( | const GNCImportSettings * | settings | ) |
Returns the hard-limiting number of days that a matching split may differ.
Definition at line 168 of file import-settings.c.
GNCImportSettings * gnc_import_Settings_new | ( | void | ) |
Allocates a new GNCImportSettings object, and initialize it with the appropriate user prefs.
Definition at line 78 of file import-settings.c.
void gnc_import_Settings_set_match_date_hardlimit | ( | GNCImportSettings * | settings, |
gint | match_date_hardlimit | ||
) |
match_date_hardlimit | The number of days that a matching split may differ from the given transaction before it is discarded immediately. In other words, any split that is more distant from the given transaction than this match_date_hardlimit days will be ignored altogether. For use cases without paper checks (e.g. HBCI), values like 14 (days) might be appropriate, whereas for use cases with paper checks (e.g. OFX, QIF), values like 42 (days) seem more appropriate. |
Definition at line 163 of file import-settings.c.
void gnc_import_TransInfo_delete | ( | GNCImportTransInfo * | info | ) |
GNCImportAction gnc_import_TransInfo_get_action | ( | const GNCImportTransInfo * | info | ) |
Returns the currently selected action for this TransInfo.
Definition at line 207 of file import-backend.c.
Account * gnc_import_TransInfo_get_destacc | ( | const GNCImportTransInfo * | info | ) |
Returns the 'other account' of this transaction. May return NULL.
Definition at line 226 of file import-backend.c.
gboolean gnc_import_TransInfo_get_destacc_selected_manually | ( | const GNCImportTransInfo * | info | ) |
Returns if the currently selected destination account for auto-matching was selected by the user.
Definition at line 247 of file import-backend.c.
Split * gnc_import_TransInfo_get_fsplit | ( | const GNCImportTransInfo * | info | ) |
Returns the first split of the transaction of this TransInfo.
Definition at line 176 of file import-backend.c.
GList * gnc_import_TransInfo_get_match_list | ( | const GNCImportTransInfo * | info | ) |
Returns the stored list of possible matches.
Definition at line 145 of file import-backend.c.
gboolean gnc_import_TransInfo_get_match_selected_manually | ( | const GNCImportTransInfo * | info | ) |
Returns if the currently selected match was selected by the user.
Definition at line 200 of file import-backend.c.
guint32 gnc_import_TransInfo_get_ref_id | ( | const GNCImportTransInfo * | info | ) |
Returns the reference id for this TransInfo.
Definition at line 254 of file import-backend.c.
GNCImportMatchInfo * gnc_import_TransInfo_get_selected_match | ( | const GNCImportTransInfo * | info | ) |
Returns the currently selected match in this TransInfo.
Definition at line 183 of file import-backend.c.
Transaction * gnc_import_TransInfo_get_trans | ( | const GNCImportTransInfo * | info | ) |
Returns the transaction of this TransInfo.
Definition at line 152 of file import-backend.c.
void gnc_import_TransInfo_init_matches | ( | GNCImportTransInfo * | trans_info, |
GNCImportSettings * | settings | ||
) |
Iterates through all splits of the originating account of trans_info. Sorts the resulting list and sets the selected_match and action fields in the trans_info.
Iterates through all splits of the originating account of trans_info. Sorts the resulting list and sets the selected_match and action fields in the trans_info.
trans_info | The TransInfo for which the matches should be found, sorted, and selected. |
settings | The structure that holds all the user preferences. |
Definition at line 1230 of file import-backend.c.
gboolean gnc_import_TransInfo_is_balanced | ( | const GNCImportTransInfo * | info | ) |
Returns if the transaction stored in the TransInfo is currently balanced.
Definition at line 159 of file import-backend.c.
GNCImportTransInfo * gnc_import_TransInfo_new | ( | Transaction * | trans, |
GncImportMatchMap * | matchmap | ||
) |
Create a new object of GNCImportTransInfo here.
Allocates a new TransInfo object, with the Transaction 'trans' already stored in there. Also, this already checks the ImportMatchMap for automated destination account matching. The given MatchMap may be NULL, in which case the ImportMatchMap of the originating account will be used.
trans | The transaction that this TransInfo should work with. |
matchmap | MatchMap used for automated destination account choosing. This may be NULL, in which case the MatchMap of the originating account will be used. |
Definition at line 1194 of file import-backend.c.
gboolean gnc_import_TransInfo_refresh_destacc | ( | GNCImportTransInfo * | transaction_info, |
GncImportMatchMap * | matchmap | ||
) |
Try to automatch a given transaction to a destination account
Definition at line 1296 of file import-backend.c.
void gnc_import_TransInfo_set_action | ( | GNCImportTransInfo * | info, |
GNCImportAction | action | ||
) |
Set the action for this TransInfo. Also sets the previous action.
Definition at line 214 of file import-backend.c.
void gnc_import_TransInfo_set_destacc | ( | GNCImportTransInfo * | info, |
Account * | acc, | ||
gboolean | selected_manually | ||
) |
Set the 'other account' of this transaction (used for auto-balance if needed). May be set to NULL.
selected_manually | TRUE or FALSE; Was this account set as a result of a selection by the user or by an algorithm? |
Definition at line 231 of file import-backend.c.
void gnc_import_TransInfo_set_ref_id | ( | GNCImportTransInfo * | info, |
guint32 | ref_id | ||
) |
Set the reference id for this TransInfo.
Definition at line 261 of file import-backend.c.
void gnc_import_TransInfo_set_selected_match | ( | GNCImportTransInfo * | info, |
GNCImportMatchInfo * | match, | ||
gboolean | selected_manually | ||
) |
Sets the currently selected match in this TransInfo.
selected_manually | TRUE or FALSE; Was this match set as a result of a selection by the user or by an algorithm? |
Definition at line 190 of file import-backend.c.
void on_matcher_help_clicked | ( | GtkButton * | button, |
gpointer | user_data | ||
) |
This allows for the transaction help dialog to be started from the assistant button callback.
button. | The button widget clicked on in the call back. |
user_data. | A pointer to a structure. |
Definition at line 217 of file import-main-matcher.c.