Kevin Finn's patch to make the reconcile window re-use the

last statement date.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3036 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-10-09 07:45:18 +00:00
parent 7a2deb024a
commit 82dd0da42d

View File

@ -1267,6 +1267,7 @@ recnWindow(GtkWidget *parent, Account *account)
GtkWidget *dock;
double new_ending;
time_t statement_date;
static time_t last_statement_date = 0;
GNCAccountType type;
if (account == NULL)
@ -1283,7 +1284,20 @@ recnWindow(GtkWidget *parent, Account *account)
else
new_ending = xaccAccountGetBalance(account);
/* The last time reconciliation was attempted during the current
* execution of gnucash, the date was stored. Use that date if
* possible. This helps with balancing multiple accounts for
* which statements are issued at the same time, like multiple
* bank accounts on a single statement.
*/
if( !last_statement_date )
{
statement_date = time(NULL);
}
else
{
statement_date = last_statement_date;
}
/* Popup a little window to prompt the user to enter the
* ending balance for his/her bank statement */
@ -1294,6 +1308,8 @@ recnWindow(GtkWidget *parent, Account *account)
return NULL;
}
last_statement_date = statement_date;
recnData->new_ending = new_ending;
recnData->statement_date = statement_date;
recnData->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);