#include <AccountsDB.h>
Inheritance diagram for AccountsDB:
Public Methods | |
AccountsDB () DB_SECTION1 | |
default constructor opens or creates the database (if created populates it with sample records). More... | |
AccountsDB (DmOpenRef db_open_ref) DB_SECTION1 | |
constructor. More... | |
UInt32 | findAccountByName (char *n, UInt16 categ) DB_SECTION1 |
void | getAccountName (UInt32 acc, Char *buf) DB_SECTION1 |
returns a formated account name in buf. More... | |
UInt32 | getAccountCurrency (UInt32 acc) DB_SECTION1 |
returns the currency used by an account. More... | |
void | getFullNameTruncLeftToFit (UInt32 acc, Int16 width, Char *dest) DB_SECTION1 |
Build the account's full path name, truncating the beginning if necessary to fit the given number of pixels. More... | |
void | unpackRecord (accountStructure *account, packedAccountStructure *packedAccount) DB_SECTION1 |
unpacks an account record. More... | |
void | packRecord (accountStructure *account, MemHandle accountDBEntry) DB_SECTION1 |
packs an account record. More... | |
void | incrementBalance (UInt32 uid, Int32 clr_amt, Int32 amount, Boolean is_parent=false) DB_SECTION1 |
Increment the account's balances by specified amounts, notifying the ancestors about the change as well. More... | |
void | updateBalance (UInt32 uid, Int32 newbal, char *payee=NULL) DB_SECTION1 |
Updates the balance for an account. More... | |
Int32 | getBalance (UInt32 uid) DB_SECTION1 |
fetch the balance of a given account. More... | |
Int32 | getClearedBalance (UInt32 uid) DB_SECTION1 |
fetch the cleared balance of a given account. More... | |
Boolean | isDisplayable (UInt16 acc) DB_SECTION1 |
checks if a parent of the current account is collapsed @acc account id. More... | |
UInt16 | newRecord (accountStructure *s) DB_SECTION1 |
packs and writes the data from s into the database. More... | |
bool | deleteRecord (UInt16 id) DB_SECTION1 |
Deletes an account given by its id The function scans through all the transactions and removes the ones which have as source/destinations the account to be deleted and as dest/src an account in the Income or Expense categories. More... | |
void | updateVisibility (void) |
recategorize accounts as visible/invisible depending on user's choice. More... | |
Static Public Methods | |
Int16 | compareRecords (packedAccountStructure *rec1, packedAccountStructure *rec2, Int16 other, SortRecordInfoPtr sr1, SortRecordInfoPtr sr2, MemHandle app_info) DB_SECTION1 |
Compares two records (by the account name). More... | |
Public Attributes | |
totalsStruct | totals |
structure containing the totals. More... | |
Private Methods | |
UInt32 | createAccount (char *name, UInt32 parent_uid, AccountType acc_type) |
creates a new account. More... |
The category field is used to split the accounts into visible and invisible. Onely the visible accounts will be displayed by AccountsTable
Definition at line 126 of file AccountsDB.h.
|
default constructor opens or creates the database (if created populates it with sample records).
|
|
constructor.
|
|
Compares two records (by the account name).
|
|
creates a new account.
|
|
Deletes an account given by its id The function scans through all the transactions and removes the ones which have as source/destinations the account to be deleted and as dest/src an account in the Income or Expense categories. All the transaction involving user defined account will be updated so that the reference to the account to be deleted is replaced with a reference to a Income/Expense account
Reimplemented from GenericDB. |
|
|
|
returns the currency used by an account.
|
|
returns a formated account name in buf.
|
|
fetch the balance of a given account.
|
|
fetch the cleared balance of a given account.
|
|
Build the account's full path name, truncating the beginning if necessary to fit the given number of pixels.
|
|
Increment the account's balances by specified amounts, notifying the ancestors about the change as well. This is a 'lowlevel' function that modifies the account balance directly.
|
|
checks if a parent of the current account is collapsed @acc account id.
|
|
packs and writes the data from s into the database. @note: after calling this function the record has to be released
Reimplemented from Database< accountStructure, packedAccountStructure >. |
|
packs an account record.
Implements Database< accountStructure, packedAccountStructure >. |
|
unpacks an account record.
Implements Database< accountStructure, packedAccountStructure >. |
|
Updates the balance for an account. This is a 'highlevel' function that affects the balance by inserting a cleared balance adjustment transaction.
|
|
recategorize accounts as visible/invisible depending on user's choice.
|
|
structure containing the totals.
Definition at line 137 of file AccountsDB.h. |