mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge branch 'maint'
* Bug 733283 - [PATCH] Loss of fractions when importing OFX investment transactions * Bug 733506 - (ForwadDisableQIF) The forward button is not active even though a file is selected
This commit is contained in:
commit
9bc5d1a20c
@ -672,8 +672,8 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_u
|
||||
xaccTransAppendSplit(transaction, split);
|
||||
xaccAccountInsertSplit(investment_account, split);
|
||||
|
||||
gnc_amount = gnc_ofx_numeric_from_double (ofx_get_investment_amount(&data),
|
||||
investment_commodity);
|
||||
gnc_amount = gnc_ofx_numeric_from_double_txn (ofx_get_investment_amount(&data),
|
||||
transaction);
|
||||
gnc_units = gnc_ofx_numeric_from_double (data.units, investment_commodity);
|
||||
xaccSplitSetAmount(split, gnc_units);
|
||||
xaccSplitSetValue(split, gnc_amount);
|
||||
|
@ -1543,12 +1543,22 @@ gnc_ui_qif_import_load_file_complete (GtkAssistant *assistant,
|
||||
void
|
||||
gnc_ui_qif_import_load_file_prepare (GtkAssistant *assistant, gpointer user_data)
|
||||
{
|
||||
QIFImportWindow * wind = user_data;
|
||||
const gchar * path_to_load;
|
||||
gboolean page_status = FALSE;
|
||||
|
||||
gint num = gtk_assistant_get_current_page (assistant);
|
||||
GtkWidget *page = gtk_assistant_get_nth_page (assistant, num);
|
||||
|
||||
/* Disable the Assistant Forward Button */
|
||||
gtk_assistant_set_page_complete (assistant, page, FALSE);
|
||||
/* Get the file name. */
|
||||
path_to_load = gtk_entry_get_text(GTK_ENTRY(wind->filename_entry));
|
||||
|
||||
/* Calculate status for the Assistant Forward Button */
|
||||
if (strlen(path_to_load) != 0)
|
||||
{
|
||||
page_status = gnc_ui_qif_import_load_file_complete(assistant, user_data);
|
||||
}
|
||||
gtk_assistant_set_page_complete (assistant, page, page_status);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user