mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
7a2deb024a
commit
82dd0da42d
@ -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);
|
||||
|
||||
statement_date = time(NULL);
|
||||
/* 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);
|
||||
|
Loading…
Reference in New Issue
Block a user