27 #include <glib/gi18n.h>
34 #include "SX-ttinfo.h"
38 #include "engine-helpers.h"
39 #include "qofinstance-p.h"
42 #define G_LOG_DOMAIN "gnc.engine.sx"
51 PROP_LAST_OCCURANCE_DATE,
55 PROP_AUTO_CREATE_NOTIFY,
56 PROP_ADVANCE_CREATION_DAYS,
57 PROP_ADVANCE_REMINDER_DAYS,
63 G_DEFINE_TYPE(
SchedXaction, gnc_schedxaction, QOF_TYPE_INSTANCE);
70 g_date_clear( &sx->last_date, 1 );
71 g_date_clear( &sx->start_date, 1 );
72 g_date_clear( &sx->end_date, 1 );
75 sx->num_occurances_total = 0;
76 sx->autoCreateOption = FALSE;
77 sx->autoCreateNotify = FALSE;
78 sx->advanceCreateDays = 0;
79 sx->advanceRemindDays = 0;
85 gnc_schedxaction_dispose(GObject *sxp)
87 G_OBJECT_CLASS(gnc_schedxaction_parent_class)->dispose(sxp);
91 gnc_schedxaction_finalize(GObject* sxp)
93 G_OBJECT_CLASS(gnc_schedxaction_parent_class)->finalize(sxp);
103 gnc_schedxaction_get_property (GObject *
object,
110 g_return_if_fail(GNC_IS_SCHEDXACTION(
object));
112 sx = GNC_SCHEDXACTION(
object);
116 g_value_set_string(value, sx->name);
119 g_value_set_boolean(value, sx->enabled);
121 case PROP_NUM_OCCURANCE:
122 g_value_set_int(value, sx->num_occurances_total);
124 case PROP_REM_OCCURANCE:
125 g_value_set_int(value, sx->num_occurances_remain);
127 case PROP_AUTO_CREATE:
128 g_value_set_boolean(value, sx->autoCreateOption);
130 case PROP_AUTO_CREATE_NOTIFY:
131 g_value_set_boolean(value, sx->autoCreateNotify);
133 case PROP_ADVANCE_CREATION_DAYS:
134 g_value_set_int(value, sx->advanceCreateDays);
136 case PROP_ADVANCE_REMINDER_DAYS:
137 g_value_set_int(value, sx->advanceRemindDays);
139 case PROP_START_DATE:
140 g_value_set_boxed(value, &sx->start_date);
145 if (g_date_valid (&sx->end_date))
146 g_value_set_boxed(value, &sx->end_date);
148 case PROP_LAST_OCCURANCE_DATE:
151 if (g_date_valid (&sx->last_date))
152 g_value_set_boxed(value, &sx->last_date);
154 case PROP_INSTANCE_COUNT:
155 g_value_set_int(value, sx->instance_num);
157 case PROP_TEMPLATE_ACCOUNT:
158 g_value_take_object(value, sx->template_acct);
161 G_OBJECT_WARN_INVALID_PROPERTY_ID(
object, prop_id, pspec);
167 gnc_schedxaction_set_property (GObject *
object,
174 g_return_if_fail(GNC_IS_SCHEDXACTION(
object));
176 sx = GNC_SCHEDXACTION(
object);
177 g_assert (qof_instance_get_editlevel(sx));
185 xaccSchedXactionSetEnabled(sx, g_value_get_boolean(value));
187 case PROP_NUM_OCCURANCE:
190 case PROP_REM_OCCURANCE:
191 xaccSchedXactionSetRemOccur(sx, g_value_get_int(value));
193 case PROP_AUTO_CREATE:
194 xaccSchedXactionSetAutoCreate(sx, g_value_get_boolean(value), sx->autoCreateNotify);
196 case PROP_AUTO_CREATE_NOTIFY:
197 xaccSchedXactionSetAutoCreate(sx, sx->autoCreateOption, g_value_get_boolean(value));
199 case PROP_ADVANCE_CREATION_DAYS:
200 xaccSchedXactionSetAdvanceCreation(sx, g_value_get_int(value));
202 case PROP_ADVANCE_REMINDER_DAYS:
203 xaccSchedXactionSetAdvanceReminder(sx, g_value_get_int(value));
205 case PROP_START_DATE:
209 xaccSchedXactionSetStartDate(sx, g_value_get_boxed(value));
217 case PROP_LAST_OCCURANCE_DATE:
221 xaccSchedXactionSetLastOccurDate(sx, g_value_get_boxed(value));
223 case PROP_INSTANCE_COUNT:
226 case PROP_TEMPLATE_ACCOUNT:
227 sx_set_template_account(sx, g_value_get_object(value));
230 G_OBJECT_WARN_INVALID_PROPERTY_ID(
object, prop_id, pspec);
238 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
240 gobject_class->dispose = gnc_schedxaction_dispose;
241 gobject_class->finalize = gnc_schedxaction_finalize;
242 gobject_class->set_property = gnc_schedxaction_set_property;
243 gobject_class->get_property = gnc_schedxaction_get_property;
245 g_object_class_install_property
248 g_param_spec_string (
"name",
249 "Scheduled Transaction Name",
250 "The name is an arbitrary string "
251 "assigned by the user. It is intended to "
252 "a short, 5 to 30 character long string "
253 "that is displayed by the GUI.",
257 g_object_class_install_property
260 g_param_spec_boolean (
"enabled",
262 "TRUE if the scheduled transaction is enabled.",
266 g_object_class_install_property
269 g_param_spec_int (
"num-occurance",
270 "Number of occurances",
271 "Total number of occurances for this scheduled transaction.",
277 g_object_class_install_property
280 g_param_spec_int (
"rem-occurance",
281 "Number of occurances remaining",
282 "Remaining number of occurances for this scheduled transaction.",
288 g_object_class_install_property
291 g_param_spec_boolean (
"auto-create",
293 "TRUE if the transaction will be automatically "
294 "created when its time comes.",
298 g_object_class_install_property
300 PROP_AUTO_CREATE_NOTIFY,
301 g_param_spec_boolean (
"auto-create-notify",
302 "Auto-create-notify",
303 "TRUE if the the user will be notified when the transaction "
304 "is automatically created.",
308 g_object_class_install_property
310 PROP_ADVANCE_CREATION_DAYS,
311 g_param_spec_int (
"advance-creation-days",
312 "Days in advance to create",
313 "Number of days in advance to create this scheduled transaction.",
319 g_object_class_install_property
321 PROP_ADVANCE_REMINDER_DAYS,
322 g_param_spec_int (
"advance-reminder-days",
323 "Days in advance to remind",
324 "Number of days in advance to remind about this scheduled transaction.",
330 g_object_class_install_property
333 g_param_spec_boxed(
"start-date",
335 "Date for the first occurence for the scheduled transaction.",
339 g_object_class_install_property
342 g_param_spec_boxed(
"end-date",
344 "Date for the scheduled transaction to end.",
348 g_object_class_install_property
350 PROP_LAST_OCCURANCE_DATE,
351 g_param_spec_boxed(
"last-occurance-date",
352 "Last Occurance Date",
353 "Date for the last occurance of the scheduled transaction.",
357 g_object_class_install_property
360 g_param_spec_int (
"instance-count",
362 "Number of instances of this scheduled transaction.",
368 g_object_class_install_property
370 PROP_TEMPLATE_ACCOUNT,
371 g_param_spec_object(
"template-account",
373 "Account which holds the template transactions.",
396 "template",
"template") );
408 g_return_val_if_fail (book, NULL);
410 sx = g_object_new(GNC_TYPE_SCHEDXACTION, NULL);
411 xaccSchedXactionInit( sx, book );
418 sxprivTransMapDelete( gpointer data, gpointer user_data )
430 GList *templ_acct_splits, *curr_split_listref;
433 GList *templ_acct_transactions = NULL;
438 for (curr_split_listref = templ_acct_splits;
440 curr_split_listref = curr_split_listref->next)
442 curr_split = (
Split *) curr_split_listref->data;
444 if (! (g_list_find(templ_acct_transactions, split_trans)))
446 templ_acct_transactions
447 = g_list_prepend(templ_acct_transactions, split_trans);
451 g_list_foreach(templ_acct_transactions,
452 sxprivTransMapDelete,
463 old = sx->template_acct;
464 sx->template_acct = account;
475 qof_instance_set_destroying( QOF_INSTANCE(sx), TRUE );
476 gnc_sx_commit_edit( sx );
484 if ( sx == NULL )
return;
496 delete_template_trans( sx );
522 g_object_unref( sx );
535 xaccSchedXactionFree( GNC_SX(inst) );
540 g_critical(
"Failed to commit: %d", errcode);
541 gnc_engine_signal_commit_error( errcode );
567 g_return_if_fail(sx);
568 gnc_sx_begin_edit(sx);
569 sx->schedule = schedule;
570 qof_instance_set_dirty(&sx->inst);
571 gnc_sx_commit_edit(sx);
583 g_return_if_fail( newName != NULL );
584 gnc_sx_begin_edit(sx);
585 if ( sx->name != NULL )
590 sx->name = g_strdup( newName );
591 qof_instance_set_dirty(&sx->inst);
592 gnc_sx_commit_edit(sx);
599 return &sx->start_date;
603 xaccSchedXactionSetStartDate(
SchedXaction *sx,
const GDate* newStart )
605 if ( newStart == NULL || !g_date_valid( newStart ))
612 g_critical(
"Invalid Start Date");
615 gnc_sx_begin_edit(sx);
616 sx->start_date = *newStart;
617 qof_instance_set_dirty(&sx->inst);
618 gnc_sx_commit_edit(sx);
624 return sx != NULL && g_date_valid( &sx->end_date );
631 return &sx->end_date;
641 if (newEnd == NULL || g_date_compare( newEnd, &sx->start_date ) < 0 )
648 g_critical(
"Bad End Date: Invalid or before Start Date");
652 gnc_sx_begin_edit(sx);
653 sx->end_date = *newEnd;
654 qof_instance_set_dirty(&sx->inst);
655 gnc_sx_commit_edit(sx);
659 xaccSchedXactionGetLastOccurDate(
const SchedXaction *sx )
661 return &sx->last_date;
665 xaccSchedXactionSetLastOccurDate(
SchedXaction *sx,
const GDate* new_last_occur)
667 g_return_if_fail (new_last_occur != NULL);
668 if (g_date_valid(&sx->last_date)
669 && g_date_compare(&sx->last_date, new_last_occur) == 0)
671 gnc_sx_begin_edit(sx);
672 sx->last_date = *new_last_occur;
673 qof_instance_set_dirty(&sx->inst);
674 gnc_sx_commit_edit(sx);
680 return ( xaccSchedXactionGetNumOccur( sx ) != 0 );
686 return sx->num_occurances_total;
692 if (sx->num_occurances_total == new_num)
694 gnc_sx_begin_edit(sx);
695 sx->num_occurances_remain = sx->num_occurances_total = new_num;
696 qof_instance_set_dirty(&sx->inst);
697 gnc_sx_commit_edit(sx);
703 return sx->num_occurances_remain;
707 xaccSchedXactionSetRemOccur(
SchedXaction *sx, gint num_remain)
710 if (num_remain > sx->num_occurances_total)
712 g_warning(
"number remaining [%d] > total occurrences [%d]",
713 num_remain, sx->num_occurances_total);
717 if (num_remain == sx->num_occurances_remain)
719 gnc_sx_begin_edit(sx);
720 sx->num_occurances_remain = num_remain;
721 qof_instance_set_dirty(&sx->inst);
722 gnc_sx_commit_edit(sx);
730 gboolean countFirstDate;
734 && xaccSchedXactionGetRemOccur(sx) <= 0)
735 || (xaccSchedXactionHasEndDate(sx)
746 countFirstDate = !g_date_valid(&tmpState->last_date)
747 || (g_date_compare(&tmpState->last_date, start_date) < 0);
750 if (!g_date_valid(&tmpState->last_date))
764 while (g_date_compare(&tmpState->last_date, start_date) < 0)
778 while (g_date_valid(&tmpState->last_date)
779 && (g_date_compare(&tmpState->last_date, end_date) <= 0)
780 && (!xaccSchedXactionHasEndDate(sx)
786 || tmpState->num_occur_rem >= 0))
794 if (!countFirstDate && result > 0)
808 xaccSchedXactionSetEnabled(
SchedXaction *sx, gboolean newEnabled)
810 gnc_sx_begin_edit(sx);
811 sx->enabled = newEnabled;
812 qof_instance_set_dirty(&sx->inst);
813 gnc_sx_commit_edit(sx);
818 gboolean *outAutoCreate,
819 gboolean *outNotify )
821 if (outAutoCreate != NULL)
822 *outAutoCreate = sx->autoCreateOption;
823 if (outNotify != NULL)
824 *outNotify = sx->autoCreateNotify;
830 gboolean newAutoCreate,
834 gnc_sx_begin_edit(sx);
835 sx->autoCreateOption = newAutoCreate;
836 sx->autoCreateNotify = newNotify;
837 qof_instance_set_dirty(&sx->inst);
838 gnc_sx_commit_edit(sx);
843 xaccSchedXactionGetAdvanceCreation(
const SchedXaction *sx )
845 return sx->advanceCreateDays;
849 xaccSchedXactionSetAdvanceCreation(
SchedXaction *sx, gint createDays )
851 gnc_sx_begin_edit(sx);
852 sx->advanceCreateDays = createDays;
853 qof_instance_set_dirty(&sx->inst);
854 gnc_sx_commit_edit(sx);
858 xaccSchedXactionGetAdvanceReminder(
const SchedXaction *sx )
860 return sx->advanceRemindDays;
864 xaccSchedXactionSetAdvanceReminder(
SchedXaction *sx, gint reminderDays )
866 gnc_sx_begin_edit(sx);
867 sx->advanceRemindDays = reminderDays;
868 qof_instance_set_dirty(&sx->inst);
869 gnc_sx_commit_edit(sx);
876 GDate last_occur, next_occur, tmpDate;
878 g_date_clear( &last_occur, 1 );
879 g_date_clear( &next_occur, 1 );
880 g_date_clear( &tmpDate, 1 );
882 if ( g_date_valid( &sx->last_date ) )
884 last_occur = sx->last_date;
887 if ( stateData != NULL )
890 last_occur = tsd->last_date;
893 if ( g_date_valid( &sx->start_date ) )
895 if ( g_date_valid(&last_occur) )
898 ( g_date_compare( &last_occur,
899 &sx->start_date ) > 0 ?
900 last_occur : sx->start_date );
911 last_occur = sx->start_date;
912 g_date_subtract_days( &last_occur, 1 );
916 recurrenceListNextInstance(sx->schedule, &last_occur, &next_occur);
919 if ( xaccSchedXactionHasEndDate( sx ) )
922 if ( g_date_compare( &next_occur, end_date ) > 0 )
924 g_debug(
"next_occur past end date");
925 g_date_clear( &next_occur, 1 );
933 if ( tsd->num_occur_rem == 0 )
935 g_debug(
"no more occurances remain");
936 g_date_clear( &next_occur, 1 );
941 if ( sx->num_occurances_remain == 0 )
943 g_date_clear( &next_occur, 1 );
952 xaccSchedXactionGetInstanceAfter(
const SchedXaction *sx,
956 GDate prev_occur, next_occur;
958 g_date_clear( &prev_occur, 1 );
964 if ( stateData != NULL )
967 prev_occur = tsd->last_date;
970 if ( ! g_date_valid( &prev_occur ) )
973 prev_occur = sx->start_date;
974 g_date_subtract_days( &prev_occur, 1 );
977 recurrenceListNextInstance(sx->schedule, &prev_occur, &next_occur);
979 if ( xaccSchedXactionHasEndDate( sx ) )
982 if ( g_date_compare( &next_occur, end_date ) > 0 )
984 g_date_clear( &next_occur, 1 );
992 if ( tsd->num_occur_rem == 0 )
994 g_date_clear( &next_occur, 1 );
999 if ( sx->num_occurances_remain == 0 )
1001 g_date_clear( &next_occur, 1 );
1017 toRet = tsd->num_inst;
1021 toRet = sx->instance_num;
1030 g_return_if_fail(sx);
1031 if (sx->instance_num == instance_num)
1033 gnc_sx_begin_edit(sx);
1034 sx->instance_num = instance_num;
1035 qof_instance_set_dirty(&sx->inst);
1036 gnc_sx_commit_edit(sx);
1042 g_return_val_if_fail( sx, NULL );
1051 const gchar *credit_formula;
1052 const gchar *debit_formula;
1058 gnc_ttsplitinfo_get_memo(s_info));
1062 gnc_set_num_action(NULL, split, NULL,
1063 gnc_ttsplitinfo_get_action(s_info));
1068 credit_formula = gnc_ttsplitinfo_get_credit_formula(s_info);
1069 debit_formula = gnc_ttsplitinfo_get_debit_formula(s_info);
1072 "sx-credit-formula", credit_formula,
1073 "sx-debit-formula", debit_formula,
1074 "sx-account", acc_guid,
1091 g_return_if_fail (book);
1094 delete_template_trans( sx );
1096 for (; t_t_list != NULL; t_t_list = t_t_list->next)
1098 tti = t_t_list->data;
1105 gnc_ttinfo_get_description(tti));
1111 gnc_set_num_action(new_trans, NULL,
1112 gnc_ttinfo_get_num(tti), NULL);
1114 gnc_ttinfo_get_currency(tti) );
1116 for (split_list = gnc_ttinfo_get_template_splits(tti);
1118 split_list = split_list->next)
1120 s_info = split_list->data;
1121 new_split = pack_split_info(s_info, sx->template_acct,
1134 if (g_date_valid (&(sx->last_date)))
1135 toRet->last_date = sx->last_date;
1137 g_date_set_dmy (&(toRet->last_date), 1, 1, 1970);
1138 toRet->num_occur_rem = sx->num_occurances_remain;
1139 toRet->num_inst = sx->instance_num;
1149 g_date_clear( &unused, 1 );
1151 xaccSchedXactionGetInstanceAfter( sx,
1156 tsd->num_occur_rem -= 1;
1178 _temporal_state_data_cmp( gconstpointer a, gconstpointer b )
1184 if ( !tsd_a && !tsd_b )
1192 return g_date_compare( &tsd_a->last_date,
1193 &tsd_b->last_date );
1205 _temporal_state_data_cmp );
1215 GList *found_by_value;
1217 found_by_value = g_list_find_custom(
1218 sx->
deferredList, deferStateData, _temporal_state_data_cmp);
1219 if (found_by_value == NULL)
1221 g_warning(
"unable to find deferred instance");
1245 destroy_sx_on_book_close(
QofInstance *ent, gpointer data)
1249 gnc_sx_begin_edit(sx);
1259 gnc_sx_book_end(
QofBook* book)
1277 DI(.e_type = ) GNC_SX_ID,
1280 DI(.book_begin = ) NULL,
1281 DI(.book_end = ) gnc_sx_book_end,
1285 DI(.printable = ) NULL,
1295 GNC_SX_NAME, QOF_TYPE_STRING, (
QofAccessFunc)xaccSchedXactionGetName,
1299 GNC_SX_START_DATE, QOF_TYPE_DATE, (
QofAccessFunc)xaccSchedXactionGetStartDate,
1303 GNC_SX_LAST_DATE, QOF_TYPE_DATE, (
QofAccessFunc)xaccSchedXactionGetLastOccurDate,
1307 GNC_SX_NUM_OCCUR, QOF_TYPE_INT64, (
QofAccessFunc)xaccSchedXactionGetNumOccur,
1311 GNC_SX_REM_OCCUR, QOF_TYPE_INT64, (
QofAccessFunc)xaccSchedXactionGetRemOccur,
const GDate * xaccSchedXactionGetEndDate(const SchedXaction *sx)
void xaccAccountSetType(Account *acc, GNCAccountType tip)
int qof_instance_version_cmp(const QofInstance *left, const QofInstance *right)
#define xaccTransAppendSplit(t, s)
void gnc_sx_set_schedule(SchedXaction *sx, GList *schedule)
gnc_commodity_table * gnc_commodity_table_get_table(QofBook *book)
Transaction * xaccMallocTransaction(QofBook *book)
void gnc_sx_set_instance_count(SchedXaction *sx, gint instance_num)
void xaccTransSetDatePostedSecsNormalized(Transaction *trans, time64 time)
GList * gnc_sx_get_schedule(const SchedXaction *sx)
void gnc_account_append_child(Account *new_parent, Account *child)
const GncGUID * qof_instance_get_guid(gconstpointer)
SplitList * xaccAccountGetSplitList(const Account *acc)
void gnc_sx_destroy_temporal_state(SXTmpStateData *stateData)
QofBook * qof_instance_get_book(gconstpointer)
gboolean qof_collection_is_dirty(const QofCollection *col)
void xaccSchedXactionSetNumOccur(SchedXaction *sx, gint new_num)
QofBackendError
The errors that can be reported to the GUI & other front-end users.
SXTmpStateData * gnc_sx_create_temporal_state(const SchedXaction *sx)
void qof_instance_set(QofInstance *inst, const gchar *first_param,...)
Wrapper for g_object_set Group setting multiple parameters in a single begin/commit/rollback.
void qof_class_register(QofIdTypeConst obj_name, QofSortFunc default_sort_fcn, const QofParam *params)
void xaccTransSetDescription(Transaction *trans, const char *desc)
Account * gnc_book_get_template_root(const QofBook *book)
Transaction * xaccSplitGetParent(const Split *split)
gchar * guid_to_string_buff(const GncGUID *guid, gchar *buff)
gpointer(* QofAccessFunc)(gpointer object, const QofParam *param)
#define QOF_OBJECT_VERSION
gboolean qof_commit_edit(QofInstance *inst)
void qof_collection_foreach(const QofCollection *, QofInstanceForeachCB, gpointer user_data)
GDate xaccSchedXactionGetNextInstance(const SchedXaction *sx, SXTmpStateData *stateData)
Returns the next occurrence of a scheduled transaction.
void xaccTransSetCurrency(Transaction *trans, gnc_commodity *curr)
void xaccTransDestroy(Transaction *trans)
gboolean SXRegister(void)
QOF registration.
void xaccAccountDestroy(Account *acc)
void qof_instance_init_data(QofInstance *, QofIdType, QofBook *)
gboolean qof_begin_edit(QofInstance *inst)
void gnc_sx_incr_temporal_state(const SchedXaction *sx, SXTmpStateData *stateData)
Account handling public routines.
void xaccSplitSetMemo(Split *split, const char *memo)
#define GUID_ENCODING_LENGTH
void gnc_sx_add_defer_instance(SchedXaction *sx, void *deferStateData)
Adds an instance to the deferred list of the SX.
Anchor Scheduled Transaction info in a book. See src/doc/books.txt for design overview.
gint gnc_sx_get_num_occur_daterange(const SchedXaction *sx, const GDate *start_date, const GDate *end_date)
gboolean qof_commit_edit_part2(QofInstance *inst, void(*on_error)(QofInstance *, QofBackendError), void(*on_done)(QofInstance *), void(*on_free)(QofInstance *))
SXTmpStateData * gnc_sx_clone_temporal_state(SXTmpStateData *stateData)
Allocates and returns a one-by-one copy of the given temporal state.
void qof_collection_mark_clean(QofCollection *)
void xaccTransCommitEdit(Transaction *trans)
void xaccSchedXactionSetTemplateTrans(SchedXaction *sx, GList *t_t_list, QofBook *book)
Set the schedxaction's template transaction.
void xaccTransBeginEdit(Transaction *trans)
All type declarations for the whole Gnucash engine.
const GncGUID * qof_entity_get_guid(gconstpointer)
Split * xaccMallocSplit(QofBook *book)
void xaccSchedXactionSetName(SchedXaction *sx, const gchar *newName)
void xaccAccountBeginEdit(Account *acc)
#define xaccAccountInsertSplit(acc, s)
void(* QofSetterFunc)(gpointer, gpointer)
void gnc_sx_remove_defer_instance(SchedXaction *sx, void *deferStateData)
Removes an instance from the deferred list.
Account * xaccMallocAccount(QofBook *book)
time64 gnc_time(time64 *tbuf)
get the current local time
SchedXaction * xaccSchedXactionMalloc(QofBook *book)
QofCollection * qof_book_get_collection(const QofBook *, QofIdType)
gboolean qof_object_register(const QofObject *object)
gboolean qof_book_shutting_down(const QofBook *book)
void qof_event_gen(QofInstance *entity, QofEventId event_type, gpointer event_data)
Invoke all registered event handlers using the given arguments.
gboolean xaccSchedXactionHasOccurDef(const SchedXaction *sx)
Scheduled Transactions public handling routines.
void xaccSchedXactionSetEndDate(SchedXaction *sx, const GDate *newEnd)
API for Transactions and Splits (journal entries)
void xaccAccountCommitEdit(Account *acc)
void xaccAccountSetName(Account *acc, const char *str)
void xaccSchedXactionDestroy(SchedXaction *sx)
void xaccAccountSetCommodity(Account *acc, gnc_commodity *com)
GList * gnc_sx_get_defer_instances(SchedXaction *sx)
Returns the defer list from the SX.
gint gnc_sx_get_instance_count(const SchedXaction *sx, SXTmpStateData *stateData)
Get the instance count.