GnuCashew ~ GnuCash Enabled Web
GCW
|
Namespaces | |
Children | |
Account Children Namespace. | |
Field | |
Classes | |
struct | ACCOUNTDEF_S |
Account Definition. More... | |
class | Item |
Account Item Class. More... | |
Typedefs | |
typedef struct GCW::Dbo::Accounts::ACCOUNTDEF_S | AccountDef_t |
Account Definition. More... | |
Enumerations | |
enum class | DrCr { NONE = 0x00 , DEBIT = 0x01 , CREDIT = 0x02 } |
Account Debit/Credit Enum. More... | |
enum class | Type { INVALID = -1 , NONE = -1 , BANK = 0 , CASH = 1 , CREDIT = 3 , ASSET = 2 , LIABILITY = 4 , STOCK = 5 , MUTUAL = 6 , CURRENCY = 7 , INCOME = 8 , EXPENSE = 9 , EQUITY = 10 , RECEIVABLE = 11 , PAYABLE = 12 , ROOT = 13 , TRADING = 14 , NUM_ACCOUNT_TYPES = 15 , CHECKING = 15 , SAVINGS = 16 , MONEYMRKT = 17 , CREDITLINE = 18 , LAST } |
Account Type. More... | |
Functions | |
auto | rootAccount () -> Item::Ptr |
Load Root Account. More... | |
auto | load (const std::string &_guid) -> Item::Ptr |
Load Account by GUID. More... | |
auto | byGuid (const std::string &_guid) -> Item::Ptr |
Load Account by GUID. More... | |
auto | byChildName (const std::string &_parentGuid, const std::string &_childName) -> Item::Ptr |
Load Account by 'child name' and 'parent id'. More... | |
auto | byFullName (const std::string &_fullName) -> Item::Ptr |
Load Account by 'full name' with ':' account separator. More... | |
auto | allAccounts () -> Item::Vector |
Load all accounts. More... | |
auto | activeAccounts () -> Item::Vector |
Load accounts as; if( !hidden() && !placeHolder() ) More... | |
auto | fullName (const std::string &_guid) -> std::string |
Account Fullname via GUID. More... | |
auto | fullName (Item::Ptr _item) -> std::string |
Account Fullname via Item. More... | |
Variables | |
const char * | s_tableName = "accounts" |
const std::vector< AccountDef_t > | s_accountDefs |
typedef struct GCW::Dbo::Accounts::ACCOUNTDEF_S GCW::Dbo::Accounts::AccountDef_t |
Account Definition.
This structure provides a set of account-definitions that are used in the various views and balance calculations.
|
strong |
Account Debit/Credit Enum.
This indicates if this account is a 'debit' type account or a 'credit' type account.
Enumerator | |
---|---|
NONE | 0x00 ~ invalid - should not happen |
DEBIT | 0x01 ~ DEBIT type account |
CREDIT | 0x02 ~ CREDIT type account |
Definition at line 23 of file Definition.h.
|
strong |
Account Type.
These are used internally to switch the views depending on the account type. While these codes exactly match the codes in the native gnucash proper, they should not be relied on to match the native gnucash account type codes (those are textual, see; GCW::Dbo::Accounts::Item::accountTypeName). But, these are internal anyhow, and they don't get stored. They're just used to steer the application, especially as it pertains to debit/credit calculations.
The definition-table can be found here: s_accountDefs
Definition at line 50 of file Definition.h.
auto GCW::Dbo::Accounts::activeAccounts | ( | ) | -> Item::Vector |
Load accounts as; if( !hidden() && !placeHolder() )
Definition at line 236 of file Accounts.cpp.
References GCW::app(), GCW::Dbo::Accounts::Field::hidden, and GCW::Dbo::Accounts::Field::placeHolder.
auto GCW::Dbo::Accounts::allAccounts | ( | ) | -> Item::Vector |
Load all accounts.
Definition at line 216 of file Accounts.cpp.
References GCW::app().
Referenced by GCW::Eng::AccountComboModel::AccountComboModel().
auto GCW::Dbo::Accounts::byChildName | ( | const std::string & | _parentGuid, |
const std::string & | _childName | ||
) | -> Item::Ptr |
Load Account by 'child name' and 'parent id'.
Definition at line 169 of file Accounts.cpp.
References GCW::app().
Referenced by byFullName().
auto GCW::Dbo::Accounts::byFullName | ( | const std::string & | _fullName | ) | -> Item::Ptr |
Load Account by 'full name' with ':' account separator.
Definition at line 187 of file Accounts.cpp.
References GCW::app(), byChildName(), GCW::Dbo::Accounts::Field::guid, rootAccount(), split(), and GCW::Core::split().
Referenced by GCW::Eng::AccountRegisterModel::getTransferGuid().
auto GCW::Dbo::Accounts::byGuid | ( | const std::string & | _guid | ) | -> Item::Ptr |
Load Account by GUID.
Definition at line 161 of file Accounts.cpp.
References load().
Referenced by fullName(), GCW::Gui::BillPay::Model::loadData(), GCW::Gui::CentralWidget::open_AccountRegister(), and GCW::Eng::AccountRegisterModel::refreshFromDisk().
auto GCW::Dbo::Accounts::fullName | ( | const std::string & | _accountGuid | ) | -> std::string |
Account Fullname via GUID.
Compute Account Full-Name from Heirarchy.
This function will calculate the "full account name" from the accountGuid up to the root parent.
If the provided account guid is blank, then just return an empty string.
During the building process, even though the "root account" is a valid account, it is ignored and not included in the results.
Recursively, this should generate a name such as; "Assets:2023:Cash:FGB:OLB:2300-LSI"
Definition at line 281 of file Accounts.cpp.
References byGuid(), GCW::Dbo::Accounts::Field::name, GCW::Dbo::Accounts::Field::parent_guid, and rootAccount().
Referenced by GCW::Eng::AccountComboModel::AccountComboModel(), GCW::Gui::AccountEditor::AccountEditor(), GCW::Dbo::Accounts::Item::fullName(), fullName(), GCW::Gui::BillPay::EditWidget::loadData(), GCW::Gui::BillPay::Model::loadData(), GCW::Gui::CentralWidget::open_AccountRegister(), and GCW::Eng::AccountRegisterModel::refreshFromDisk().
auto GCW::Dbo::Accounts::fullName | ( | Item::Ptr | _item | ) | -> std::string |
Account Fullname via Item.
Definition at line 338 of file Accounts.cpp.
References fullName(), and GCW::Dbo::Accounts::Field::guid.
auto GCW::Dbo::Accounts::load | ( | const std::string & | _guid | ) | -> Item::Ptr |
Load Account by GUID.
Definition at line 134 of file Accounts.cpp.
References GCW::app().
Referenced by GCW::Gui::AccountEditor::AccountEditor(), byGuid(), GCW::Dbo::Invoices::byGuid(), GCW::Dbo::Employees::byGuid(), GCW::Dbo::Entries::byGuid(), GCW::Dbo::Transactions::byGuid(), GCW::Gui::MainWidget::load(), GCW::Gui::RawTableWidget< C >::load(), GCW::Eng::AccountsTreeViewModel::load(), GCW::Dbo::Transactions::Manager::newTransaction(), GCW::Gui::AccountsTreeView::setModel(), and GCW::Gui::AccountEditor::Tab1::Tab1().
auto GCW::Dbo::Accounts::rootAccount | ( | ) | -> Item::Ptr |
Load Root Account.
Definition at line 125 of file Accounts.cpp.
Referenced by byFullName(), fullName(), and GCW::Eng::AccountsTreeViewModel::load().
|
extern |
These are the account-types, debit/credit types, and register column labels for said accounts.
Definition at line 20 of file Accounts.cpp.
Referenced by GCW::Dbo::Accounts::Item::accountDef(), GCW::Dbo::Accounts::Item::accountDrCr(), GCW::Dbo::Accounts::Item::accountType(), AccountTypeCombo::AccountTypeCombo(), and GCW::Eng::AccountRegisterModel::refreshFromDisk().
|
extern |
Definition at line 7 of file Accounts.cpp.
Referenced by GCW::Dbo::AbstractSession::open().