Merge branch 'maint-speedup-reconcile-finalize' into maint #1227

This commit is contained in:
Christopher Lam 2021-12-31 08:16:30 +08:00
commit 1094158928

View File

@ -2286,14 +2286,15 @@ recnFinishCB (GtkAction *action, RecnWindow *recnData)
gnc_suspend_gui_refresh (); gnc_suspend_gui_refresh ();
recnData->delete_refresh = TRUE; recnData->delete_refresh = TRUE;
account = recn_get_account (recnData);
xaccAccountBeginEdit (account);
gnc_reconcile_view_commit(GNC_RECONCILE_VIEW(recnData->credit), date); gnc_reconcile_view_commit(GNC_RECONCILE_VIEW(recnData->credit), date);
gnc_reconcile_view_commit(GNC_RECONCILE_VIEW(recnData->debit), date); gnc_reconcile_view_commit(GNC_RECONCILE_VIEW(recnData->debit), date);
xaccAccountCommitEdit (account);
auto_payment = gnc_prefs_get_bool(GNC_PREFS_GROUP_RECONCILE, GNC_PREF_AUTO_CC_PAYMENT); auto_payment = gnc_prefs_get_bool(GNC_PREFS_GROUP_RECONCILE, GNC_PREF_AUTO_CC_PAYMENT);
account = recn_get_account (recnData);
xaccAccountClearReconcilePostpone (account); xaccAccountClearReconcilePostpone (account);
xaccAccountSetReconcileLastDate (account, date); xaccAccountSetReconcileLastDate (account, date);
@ -2341,11 +2342,12 @@ recnPostponeCB (GtkAction *action, gpointer data)
gnc_suspend_gui_refresh (); gnc_suspend_gui_refresh ();
recnData->delete_refresh = TRUE; recnData->delete_refresh = TRUE;
account = recn_get_account (recnData);
xaccAccountBeginEdit (account);
gnc_reconcile_view_postpone (GNC_RECONCILE_VIEW(recnData->credit)); gnc_reconcile_view_postpone (GNC_RECONCILE_VIEW(recnData->credit));
gnc_reconcile_view_postpone (GNC_RECONCILE_VIEW(recnData->debit)); gnc_reconcile_view_postpone (GNC_RECONCILE_VIEW(recnData->debit));
xaccAccountCommitEdit (account);
account = recn_get_account (recnData);
xaccAccountSetReconcilePostponeDate (account, recnData->statement_date); xaccAccountSetReconcilePostponeDate (account, recnData->statement_date);
xaccAccountSetReconcilePostponeBalance (account, recnData->new_ending); xaccAccountSetReconcilePostponeBalance (account, recnData->new_ending);