GnuCash
2.6.99
|
GnuCash Budgets. More...
Go to the source code of this file.
Macros | |
#define | GNC_TYPE_BUDGET (gnc_budget_get_type ()) |
#define | GNC_BUDGET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_BUDGET, GncBudget)) |
#define | GNC_BUDGET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_BUDGET, GncBudgetClass)) |
#define | GNC_IS_BUDGET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_BUDGET)) |
#define | GNC_IS_BUDGET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_BUDGET)) |
#define | GNC_BUDGET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_BUDGET, GncBudgetClass)) |
#define | GNC_BUDGET_MAX_NUM_PERIODS_DIGITS 3 |
#define | gnc_budget_return_guid(X) (X ? *(qof_entity_get_guid(QOF_INSTANCE(X))) : *(guid_null())) |
#define | gnc_budget_lookup_direct(g, b) gnc_budget_lookup(&(g),(b)) |
Typedefs | |
typedef struct budget_s | GncBudget |
typedef struct _GncBudgetClass | GncBudgetClass |
Functions | |
GType | gnc_budget_get_type (void) |
gboolean | gnc_budget_register (void) |
GncBudget * | gnc_budget_new (QofBook *book) |
void | gnc_budget_destroy (GncBudget *budget) |
void | gnc_budget_begin_edit (GncBudget *bgt) |
void | gnc_budget_commit_edit (GncBudget *bgt) |
GncBudget * | gnc_budget_clone (const GncBudget *budget) |
const GncGUID * | gnc_budget_get_guid (const GncBudget *budget) |
void | gnc_budget_set_name (GncBudget *budget, const gchar *name) |
const gchar * | gnc_budget_get_name (const GncBudget *budget) |
void | gnc_budget_set_description (GncBudget *budget, const gchar *description) |
const gchar * | gnc_budget_get_description (const GncBudget *budget) |
void | gnc_budget_set_num_periods (GncBudget *budget, guint num_periods) |
guint | gnc_budget_get_num_periods (const GncBudget *budget) |
void | gnc_budget_set_recurrence (GncBudget *budget, const Recurrence *r) |
const Recurrence * | gnc_budget_get_recurrence (const GncBudget *budget) |
Timespec | gnc_budget_get_period_start_date (const GncBudget *budget, guint period_num) |
Timespec | gnc_budget_get_period_end_date (const GncBudget *budget, guint period_num) |
void | gnc_budget_set_account_period_value (GncBudget *budget, const Account *account, guint period_num, gnc_numeric val) |
void | gnc_budget_unset_account_period_value (GncBudget *budget, const Account *account, guint period_num) |
gboolean | gnc_budget_is_account_period_value_set (const GncBudget *budget, const Account *account, guint period_num) |
gnc_numeric | gnc_budget_get_account_period_value (const GncBudget *budget, const Account *account, guint period_num) |
gnc_numeric | gnc_budget_get_account_period_actual_value (const GncBudget *budget, Account *account, guint period_num) |
GncBudget * | gnc_budget_get_default (QofBook *book) |
GncBudget * | gnc_budget_lookup (const GncGUID *guid, const QofBook *book) |
GnuCash Budgets.
Design decisions:
Accounts with sub-accounts can have a value budgeted. For those accounts,
Option 1: when setting or getting budgeted values, the value is always exclusive of sub-account values. Pro: consistent values in all contexts. Con: no summary behavior.
Option 2: make setting only for account proper, but always report summaries. Con: value can change as soon as it is entered; forces entry from bottom-up.
Definition in file gnc-budget.h.