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.
* Option 3: value is always *inclusive* of sub-accounts, although potentially in a different commodity. Pro: allows top-down entry; no auto value update. Con: ? [ This option was selected. ]
Definition in file gnc-budget.h.
#include <glib.h>
#include "qof.h"
#include "Account.h"
#include "Recurrence.h"
Go to the source code of this file.
Defines | |
| #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 budget_s | GncBudget |
| typedef _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) |
| const GUID * | gnc_budget_get_guid (GncBudget *budget) |
| void | gnc_budget_set_name (GncBudget *budget, const gchar *name) |
| const gchar * | gnc_budget_get_name (GncBudget *budget) |
| void | gnc_budget_set_description (GncBudget *budget, const gchar *description) |
| const gchar * | gnc_budget_get_description (GncBudget *budget) |
| void | gnc_budget_set_num_periods (GncBudget *budget, guint num_periods) |
| guint | gnc_budget_get_num_periods (GncBudget *budget) |
| void | gnc_budget_set_recurrence (GncBudget *budget, const Recurrence *r) |
| const Recurrence * | gnc_budget_get_recurrence (GncBudget *budget) |
| Timespec | gnc_budget_get_period_start_date (GncBudget *budget, guint period_num) |
| void | gnc_budget_set_account_period_value (GncBudget *budget, Account *account, guint period_num, gnc_numeric val) |
| void | gnc_budget_unset_account_period_value (GncBudget *budget, Account *account, guint period_num) |
| gboolean | gnc_budget_is_account_period_value_set (GncBudget *budget, Account *account, guint period_num) |
| gnc_numeric | gnc_budget_get_account_period_value (GncBudget *budget, Account *account, guint period_num) |
| gnc_numeric | gnc_budget_get_account_period_actual_value (GncBudget *budget, Account *account, guint period_num) |
| QofBook * | gnc_budget_get_book (GncBudget *budget) |
| GncBudget * | gnc_budget_get_default (QofBook *book) |
| GncBudget * | gnc_budget_lookup (const GUID *guid, QofBook *book) |
1.5.2