mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix HBCI date range for statement download.
2005-02-06 Christian Stimming <stimming@tuhh.de> * src/import-export/hbci/gnc-hbci-gettrans.c: Fix HBCI date range for statement download. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10451 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
0221866afe
commit
0083bc59cb
@ -1,3 +1,8 @@
|
||||
2005-02-06 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/import-export/hbci/gnc-hbci-gettrans.c: Fix HBCI date range
|
||||
for statement download.
|
||||
|
||||
2005-02-05 Derek Atkins <derek@ihtfp.com>
|
||||
|
||||
* src/report/locale-specific/us/Makefile.am: make sure the
|
||||
|
@ -123,7 +123,8 @@ gnc_hbci_gettrans (GtkWidget *parent, Account *gnc_acc)
|
||||
gnc_hbci_cleanup_job(api, job);
|
||||
gnc_AB_BANKING_fini (api);
|
||||
GNCInteractor_hide (interactor);
|
||||
GWEN_Time_free (from_date);
|
||||
if (from_date)
|
||||
GWEN_Time_free (from_date);
|
||||
GWEN_Time_free (to_date);
|
||||
}
|
||||
}
|
||||
@ -148,35 +149,36 @@ gettrans_dates(GtkWidget *parent, Account *gnc_acc,
|
||||
last_timespec = gnc_hbci_get_account_trans_retrieval (gnc_acc);
|
||||
if (last_timespec.tv_sec == 0) {
|
||||
use_last_date = FALSE;
|
||||
timespecFromTime_t (&last_timespec, now);
|
||||
}
|
||||
timespecFromTime_t (&until_timespec, now);
|
||||
timespecFromTime_t (&last_timespec, now);
|
||||
}
|
||||
timespecFromTime_t (&until_timespec, now);
|
||||
|
||||
/* Let the user choose the date range of retrieval */
|
||||
if (!gnc_hbci_enter_daterange (parent, NULL,
|
||||
&last_timespec,
|
||||
&use_last_date, &use_earliest_date,
|
||||
&until_timespec, &use_until_now))
|
||||
return FALSE;
|
||||
/* Let the user choose the date range of retrieval */
|
||||
if (!gnc_hbci_enter_daterange (parent, NULL,
|
||||
&last_timespec,
|
||||
&use_last_date, &use_earliest_date,
|
||||
&until_timespec, &use_until_now))
|
||||
return FALSE;
|
||||
|
||||
/*printf("Retrieving transactions from date %s to date %s. \n",
|
||||
ctime(&()))*/
|
||||
/*printf("Retrieving transactions from date %s to date %s. \n",
|
||||
ctime(&()))*/
|
||||
|
||||
/* Now calculate from date */
|
||||
if (use_earliest_date)
|
||||
*from_date = GWEN_Time_fromSeconds(0);
|
||||
else {
|
||||
if (use_last_date)
|
||||
last_timespec = gnc_hbci_get_account_trans_retrieval (gnc_acc);
|
||||
*from_date = GWEN_Time_fromSeconds(timespecToTime_t(last_timespec));
|
||||
}
|
||||
/* Now calculate from date */
|
||||
if (use_earliest_date)
|
||||
*from_date = NULL;
|
||||
/* for an old version this was: from_date = GWEN_Time_fromSeconds(0); */
|
||||
else {
|
||||
if (use_last_date)
|
||||
last_timespec = gnc_hbci_get_account_trans_retrieval (gnc_acc);
|
||||
*from_date = GWEN_Time_fromSeconds(timespecToTime_t(last_timespec));
|
||||
}
|
||||
|
||||
/* Now calculate to date */
|
||||
if (use_until_now)
|
||||
timespecFromTime_t (&until_timespec, now);
|
||||
*to_date = GWEN_Time_fromSeconds(timespecToTime_t (until_timespec));
|
||||
/* Now calculate to date */
|
||||
if (use_until_now)
|
||||
timespecFromTime_t (&until_timespec, now);
|
||||
*to_date = GWEN_Time_fromSeconds(timespecToTime_t (until_timespec));
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@ -193,7 +195,7 @@ gnc_hbci_gettrans_final(GtkWidget *parent,
|
||||
|
||||
trans_list = AB_JobGetTransactions_GetTransactions(trans_job);
|
||||
if (!trans_list) {
|
||||
printf("gnc_hbci_gettrans_final: No transactions section. Response was:\n");
|
||||
/* printf("gnc_hbci_gettrans_final: No transactions section. Response was:\n"); */
|
||||
|
||||
gnome_ok_dialog_parented
|
||||
(_("The HBCI import returned no transactions for the selected time period."),
|
||||
|
Loading…
Reference in New Issue
Block a user