mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2002-12-21 Joshua Sled <jsled@asynchronous.org>
* src/gnome/dialog-sx-from-trans.c (sxftd_compute_sx): Respect the user's Prefs regarding new SXes; fixes Bug#99566. * src/gnome/dialog-scheduledxaction.c (gnc_sxed_check_consistent): Don't ignore fractional currency-amounts; fixes Bug#97062. (gnc_ui_scheduled_xaction_editor_dialog_create): Changed some string-constants to their #defines. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7705 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
380755fb3c
commit
7f52e5cc89
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2002-12-21 Joshua Sled <jsled@asynchronous.org>
|
||||
|
||||
* src/gnome/dialog-sx-from-trans.c (sxftd_compute_sx): Respect the
|
||||
user's Prefs regarding new SXes; fixes Bug#99566.
|
||||
|
||||
* src/gnome/dialog-scheduledxaction.c (gnc_sxed_check_consistent):
|
||||
Don't ignore fractional currency-amounts; fixes Bug#97062.
|
||||
(gnc_ui_scheduled_xaction_editor_dialog_create): Changed some
|
||||
string-constants to their #defines.
|
||||
|
||||
2002-12-20 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/register/ledger-core/gnc-ledger-display.c:
|
||||
|
@ -556,25 +556,25 @@ check_credit_debit_balance( gpointer key,
|
||||
*unbalanced |= !(gnc_numeric_zero_p(
|
||||
gnc_numeric_sub_fixed( tcds->debitSum,
|
||||
tcds->creditSum ) ));
|
||||
#if 0
|
||||
#if GNC_DEBUG
|
||||
|
||||
if ( gnc_numeric_zero_p( gnc_numeric_sub_fixed( tcds->debitSum,
|
||||
tcds->creditSum ) ) ) {
|
||||
DEBUG( "%.8x | true [%s - %s = %s]\n",
|
||||
DEBUG( "%.8x | true [%s - %s = %s]",
|
||||
(unsigned int)key,
|
||||
gnc_numeric_to_string( tcds->debitSum ),
|
||||
gnc_numeric_to_string( tcds->creditSum ),
|
||||
gnc_numeric_to_string(gnc_numeric_sub_fixed( tcds->debitSum,
|
||||
tcds->creditSum )) );
|
||||
} else {
|
||||
DEBUG( "%.8x | false [%s - %s = %s]\n",
|
||||
DEBUG( "%.8x | false [%s - %s = %s]",
|
||||
(unsigned int)key,
|
||||
gnc_numeric_to_string( tcds->debitSum ),
|
||||
gnc_numeric_to_string( tcds->creditSum ),
|
||||
gnc_numeric_to_string(gnc_numeric_sub_fixed( tcds->debitSum,
|
||||
tcds->creditSum )) );
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
#endif /* GNC_DEBUG */
|
||||
}
|
||||
|
||||
/**
|
||||
@ -695,7 +695,7 @@ gnc_sxed_check_consistent( SchedXactionEditorDialog *sxed )
|
||||
return FALSE;
|
||||
}
|
||||
tcds->creditSum =
|
||||
gnc_numeric_add( tcds->creditSum, tmp, 1,
|
||||
gnc_numeric_add( tcds->creditSum, tmp, 100,
|
||||
(GNC_DENOM_AUTO | GNC_DENOM_LCD) );
|
||||
tmp = gnc_numeric_zero();
|
||||
}
|
||||
@ -712,7 +712,7 @@ gnc_sxed_check_consistent( SchedXactionEditorDialog *sxed )
|
||||
xaccSchedXactionGetName( sxed->sx ) );
|
||||
return FALSE;
|
||||
}
|
||||
tcds->debitSum = gnc_numeric_add( tcds->debitSum, tmp, 1,
|
||||
tcds->debitSum = gnc_numeric_add( tcds->debitSum, tmp, 100,
|
||||
(GNC_DENOM_AUTO | GNC_DENOM_LCD) );
|
||||
tmp = gnc_numeric_zero();
|
||||
}
|
||||
@ -1291,9 +1291,9 @@ gnc_ui_scheduled_xaction_editor_dialog_create( SchedXactionDialog *sxd,
|
||||
|
||||
{ REMAIN_ENTRY , "changed", sxed_excal_update_adapt, NULL },
|
||||
|
||||
{ "autocreate_opt", "toggled", autocreate_toggled, NULL },
|
||||
{ "advance_opt", "toggled", advance_toggle, (gpointer)ADVANCE_DAYS_SPIN },
|
||||
{ "remind_opt", "toggled", advance_toggle, (gpointer)REMIND_DAYS_SPIN },
|
||||
{ AUTOCREATE_OPT, "toggled", autocreate_toggled, NULL },
|
||||
{ ADVANCE_OPT, "toggled", advance_toggle, (gpointer)ADVANCE_DAYS_SPIN },
|
||||
{ REMIND_OPT, "toggled", advance_toggle, (gpointer)REMIND_DAYS_SPIN },
|
||||
|
||||
{ NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "dialog-scheduledxaction.h"
|
||||
#include "dialog-sx-from-trans.h"
|
||||
#include "dialog-utils.h"
|
||||
#include "global-options.h"
|
||||
#include "gnc-book.h"
|
||||
#include "gnc-book-p.h"
|
||||
#include "gnc-date-edit.h"
|
||||
@ -56,6 +57,8 @@
|
||||
#define SXFTD_EX_CAL_FRAME "ex_cal_frame"
|
||||
#define SXFTD_END_DATE_BOX "end_date_hbox"
|
||||
|
||||
#define SX_OPT_STR "Scheduled Transactions"
|
||||
|
||||
#define SXFTD_EXCAL_NUM_MONTHS 4
|
||||
#define SXFTD_EXCAL_MONTHS_PER_COL 4
|
||||
|
||||
@ -477,6 +480,37 @@ sxftd_compute_sx(SXFromTransInfo *sxfti)
|
||||
|
||||
gnc_sx_set_instance_count( sx, 1 );
|
||||
|
||||
/* Set the autocreate, days-in-advance and remind-in-advance values from
|
||||
options. */
|
||||
{
|
||||
gboolean autoCreateState, notifyState;
|
||||
gint daysInAdvance;
|
||||
|
||||
autoCreateState =
|
||||
gnc_lookup_boolean_option( SX_OPT_STR,
|
||||
"Auto-Create new Scheduled "
|
||||
"Transactions by default", FALSE );
|
||||
notifyState =
|
||||
gnc_lookup_boolean_option( SX_OPT_STR,
|
||||
"Notify on new, auto-created "
|
||||
"Scheduled Transactions", FALSE );
|
||||
xaccSchedXactionSetAutoCreate( sx,
|
||||
autoCreateState,
|
||||
(autoCreateState & notifyState) );
|
||||
|
||||
daysInAdvance =
|
||||
(int)gnc_lookup_number_option( SX_OPT_STR,
|
||||
"Default number of days in "
|
||||
"advance to create", 0 );
|
||||
xaccSchedXactionSetAdvanceCreation( sx, daysInAdvance );
|
||||
|
||||
daysInAdvance =
|
||||
(int)gnc_lookup_number_option( SX_OPT_STR,
|
||||
"Default number of days in "
|
||||
"advance to remind", 0 );
|
||||
xaccSchedXactionSetAdvanceReminder( sx, daysInAdvance );
|
||||
}
|
||||
|
||||
sxftd_add_template_trans( sxfti );
|
||||
|
||||
return sxftd_errno;
|
||||
|
Loading…
Reference in New Issue
Block a user