Limit the reconciliation date to the past or today, never the future.

Fixes #343527.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14297 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2006-06-02 21:02:43 +00:00
parent acba90be80
commit 683d667074
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-06-02 David Hampton <hampton@employees.org>
* src/gnome/window-reconcile.c: Limit the reconciliation date to
the past or today, never the future. Fixes #343527.
2006-06-01 Derek Atkins <derek@ihtfp.com>
* configure.in: Don't need to patch libtool for darwin anymore.

View File

@ -1284,6 +1284,7 @@ gnc_get_reconcile_info (Account *account,
gnc_numeric *new_ending,
time_t *statement_date)
{
time_t today;
struct tm tm;
if (xaccAccountGetReconcileLastDate (account, statement_date))
@ -1309,6 +1310,10 @@ gnc_get_reconcile_info (Account *account,
tm.tm_isdst = -1;
gnc_tm_set_day_end (&tm);
*statement_date = mktime (&tm);
today = gnc_timet_get_day_end(time(NULL));
if (*statement_date > today)
*statement_date = today;
}
xaccAccountGetReconcilePostponeDate (account, statement_date);