mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Further openhbci2 work -- getBalance and singleTransfer now works. yeah.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9820 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -468,8 +468,12 @@ hbci_trans_fill_values(const gnc_HBCI_Account *h_acc, HBCITransDialog *td)
|
||||
|
||||
/* If this is a direct debit, a textkey/ "Textschluessel"/
|
||||
transactionCode different from the default has to be set. */
|
||||
if (td->trans_type == SINGLE_DEBITNOTE)
|
||||
switch(td->trans_type) {
|
||||
case SINGLE_DEBITNOTE:
|
||||
HBCI_Transaction_setTransactionCode (trans, 05);
|
||||
default:
|
||||
HBCI_Transaction_setTransactionCode (trans, 51);
|
||||
}
|
||||
|
||||
return trans;
|
||||
}
|
||||
|
||||
@@ -82,9 +82,9 @@ accounts_save_kvp_cb (gpointer key, gpointer value, gpointer user_data)
|
||||
static gpointer accounts_clear_kvp (Account *gnc_acc, gpointer user_data)
|
||||
{
|
||||
if (gnc_hbci_get_account_accountid(gnc_acc))
|
||||
gnc_hbci_set_account_accountid (gnc_acc, NULL);
|
||||
gnc_hbci_set_account_accountid (gnc_acc, "");
|
||||
if (gnc_hbci_get_account_bankcode(gnc_acc))
|
||||
gnc_hbci_set_account_bankcode (gnc_acc, NULL);
|
||||
gnc_hbci_set_account_bankcode (gnc_acc, "");
|
||||
if (gnc_hbci_get_account_countrycode(gnc_acc))
|
||||
gnc_hbci_set_account_countrycode (gnc_acc, 0);
|
||||
return NULL;
|
||||
|
||||
@@ -97,6 +97,7 @@ gnc_hbci_getbalance (GtkWidget *parent, Account *gnc_acc)
|
||||
|
||||
job = HBCI_OutboxJob_new("JobGetBalance", (HBCI_Customer *)customer,
|
||||
gnc_HBCI_Account_accountId(h_acc));
|
||||
HBCI_Job_setProperty(HBCI_OutboxJob_Job(job), "allAccounts", "N");
|
||||
|
||||
/* Add job to API queue */
|
||||
outbox = HBCI_Outbox_new();
|
||||
@@ -218,9 +219,14 @@ gnc_hbci_getbalance_finish (GtkWidget *parent,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
noted_grp = GWEN_DB_GetGroup(response, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "noted");
|
||||
booked_grp = GWEN_DB_GetGroup(response, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "booked");
|
||||
noted_grp = GWEN_DB_GetGroup(acc_bal, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "noted");
|
||||
booked_grp = GWEN_DB_GetGroup(acc_bal, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "booked");
|
||||
|
||||
if (!booked_grp || !noted_grp) {
|
||||
printf("gnc_hbci_getbalance_finish: Oops, booked_grp or noted_grp == NULL. Response was:\n");
|
||||
GWEN_DB_Dump(response, stdout, 1);
|
||||
return TRUE;
|
||||
}
|
||||
booked_val = HBCI_Value_new(GWEN_DB_GetCharValue(booked_grp, "value", 0, "0"),
|
||||
GWEN_DB_GetCharValue(booked_grp, "currency", 0, "EUR"));
|
||||
booked_debit = (strcasecmp(GWEN_DB_GetCharValue(booked_grp, "debitmark", 0, "C"),"D")==0);
|
||||
|
||||
@@ -670,8 +670,8 @@ static void closeConnection(TransportType t, void *user_data)
|
||||
g_assert(data);
|
||||
data->current_act++;
|
||||
gtk_entry_set_text (GTK_ENTRY (data->action_entry), _("Done"));
|
||||
gtk_progress_set_percentage (GTK_PROGRESS (data->action_progress),
|
||||
1.0);
|
||||
/*gtk_progress_set_percentage (GTK_PROGRESS (data->action_progress),
|
||||
1.0);*/
|
||||
|
||||
if (debug_pmonitor)
|
||||
printf("actFinished-cb: current_job %d, jobs %d, current_act %d, actions %d.\n",
|
||||
@@ -764,6 +764,8 @@ gnc_hbci_new_interactor(GNCInteractor *data)
|
||||
g_assert (data->close_checkbutton =
|
||||
glade_xml_get_widget (xml, "close_checkbutton"));
|
||||
|
||||
/* grey out the progress bar -- its unused at the moment */
|
||||
gtk_widget_set_sensitive (data->action_progress, FALSE);
|
||||
gtk_toggle_button_set_active
|
||||
(GTK_TOGGLE_BUTTON (data->close_checkbutton),
|
||||
gnc_lookup_boolean_option("__gui", "hbci_close_on_finish", TRUE));
|
||||
|
||||
Reference in New Issue
Block a user