GnuCash
5.6-150-g038405b370+
|
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_NOTES_PATH "notes" |
#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)) |
Functions | |
GType | gnc_budget_get_type (void) |
gboolean | gnc_budget_register (void) |
GncBudget * | gnc_budget_new (QofBook *book) |
Creates and initializes a Budget. | |
void | gnc_budget_destroy (GncBudget *budget) |
Deletes the given budget object. More... | |
void | gnc_budget_begin_edit (GncBudget *bgt) |
void | gnc_budget_commit_edit (GncBudget *bgt) |
GncBudget * | gnc_budget_clone (const GncBudget *budget) |
Clones a budget creating a copy. | |
const GncGUID * | gnc_budget_get_guid (const GncBudget *budget) |
void | gnc_budget_set_name (GncBudget *budget, const gchar *name) |
Set/Get the name of the Budget. | |
const gchar * | gnc_budget_get_name (const GncBudget *budget) |
void | gnc_budget_set_description (GncBudget *budget, const gchar *description) |
Set/Get the description of the Budget. | |
const gchar * | gnc_budget_get_description (const GncBudget *budget) |
void | gnc_budget_set_num_periods (GncBudget *budget, guint num_periods) |
Set/Get the number of periods in the Budget. | |
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) |
time64 | gnc_budget_get_period_start_date (const GncBudget *budget, guint period_num) |
Get the starting date of the Budget period. | |
time64 | gnc_budget_get_period_end_date (const GncBudget *budget, guint period_num) |
Get the ending date of the Budget period. | |
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) |
void | gnc_budget_set_account_period_note (GncBudget *budget, const Account *account, guint period_num, const gchar *note) |
const gchar * | gnc_budget_get_account_period_note (const GncBudget *budget, const 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.