#include <TransactionsDB.h>
Inheritance diagram for TransactionsDB:
Public Methods | |
void | unpackRecord (transactionStructure *trans, packedTransactionStructure *packed_trans) DB_SECTION2 |
unpacks an Transaction record. More... | |
void | packRecord (transactionStructure *trans, MemHandle db_entry) DB_SECTION2 |
packs an Transaction record. More... | |
void | getDate (UInt16 id, DateType *pDate) DB_SECTION2 |
get the date of the transaction. More... | |
UInt16 | getClearedCategory () DB_SECTION2 |
UInt16 | getClUnclCategory () DB_SECTION2 |
UInt16 | getUnclearedCategory () DB_SECTION2 |
UInt16 | getScheduledCategory () DB_SECTION2 |
Boolean | isBalanced (UInt32 trans_uid) DB_SECTION2 |
determine if the transaction is balanced. More... | |
Int32 | getAmount (UInt32 trans_uid, UInt32 acc_uid) DB_SECTION2 |
get the amount by which the transaction affects the given account. More... | |
UInt32 | getPeerAcc (UInt32 trans_uid, UInt32 acc_uid) DB_SECTION2 |
get the peer account in the given transaction from the point of view of the given account. More... | |
Boolean | isCleared (UInt16 id) DB_SECTION2 |
checks whether a record is cleared or not. More... | |
Boolean | willBeCleared (UInt16 id) DB_SECTION2 |
checks whether a record is to be cleared or not. More... | |
Boolean | isScheduled (UInt16 id) DB_SECTION2 |
checks whether a transaction is scheduled or not by checking the record category. More... | |
void | clearRecord (UInt16 id) DB_SECTION2 |
set a record category to cleared. More... | |
void | unclearRecord (UInt16 id) DB_SECTION2 |
set a record category to uncleared. More... | |
TransactionsDB () DB_SECTION2 | |
initialize the database. More... | |
void | initializeTransactions () DB_SECTION2 |
init the Transactions DB with some default records. More... | |
UInt16 | newRecord (transactionStructure *s, Boolean cleared, Boolean scheduled=false) DB_SECTION2 |
creates a new record and update the balances of the two involved accounts. More... | |
bool | deleteRecord (UInt16 id, Boolean keep_balance=false) DB_SECTION2 |
deletes a record, given its id. More... | |
void | purgeTransactions (DateType last_date) DB_SECTION2 |
This function deletes all the transactions earlier than the given date. More... | |
Boolean | calculateNextDate (UInt16 id) DB_SECTION2 |
records the next date in the associated transaction (in relation to the date already recorded) if we have repeated the record enought times, the record is deleted. More... | |
Boolean | schedule (Boolean force=false) DB_SECTION2 |
scans through all the scheduled transactions, and if there are any due they are recorded and their next occurance date is updated. More... | |
Boolean | scheduleNextRecord () DB_SECTION2 |
schedule the first scheduled record that is due. More... | |
Int32 | getScheduledTotal (UInt32 account_uid) DB_SECTION2 |
returns the total for the scheduled transactions in a given account. More... | |
UInt32 | recordScheduledRecord (UInt32 record_uid, bool mod_date) DB_SECTION2 |
creates a new (unscheduled) record from a scheduled one, leaving the original scheduled transaction unaltered. More... | |
Int32 | getTransactionByPayeeAndAcc (Char *p, UInt16 start_id) DB_SECTION2 |
Returns the first transaction with an id equal or higher than the given one which has a payee string which starts the same (case insensitive) as the given string and has as source account the account which is currently used. More... | |
Int32 | getTransactionByPayee (Char *p, UInt16 start_id=0, Boolean want_cur_acc=false) DB_SECTION2 |
Returns the first transaction with an id equal or higher than the given one which has a payee string which starts the same (case insensitive) as the given string. More... | |
Static Public Methods | |
Int16 | compareRecords (packedTransactionStructure *rec1, packedTransactionStructure *rec2, Int16 other, SortRecordInfoPtr sr1, SortRecordInfoPtr sr2, MemHandle app_info) DB_SECTION2 |
Compares two packed transaction structures. More... |
Definition at line 130 of file TransactionsDB.h.
|
initialize the database.
|
|
records the next date in the associated transaction (in relation to the date already recorded) if we have repeated the record enought times, the record is deleted.
|
|
set a record category to cleared.
|
|
Compares two packed transaction structures. For parameters see the PalmOS reference |
|
deletes a record, given its id.
|
|
get the amount by which the transaction affects the given account.
|
|
|
|
|
|
get the date of the transaction.
|
|
get the peer account in the given transaction from the point of view of the given account. Only makes sense for transactions that are split two ways, i.e. simple transfers.
|
|
|
|
returns the total for the scheduled transactions in a given account.
|
|
Returns the first transaction with an id equal or higher than the given one which has a payee string which starts the same (case insensitive) as the given string.
|
|
Returns the first transaction with an id equal or higher than the given one which has a payee string which starts the same (case insensitive) as the given string and has as source account the account which is currently used.
|
|
|
|
init the Transactions DB with some default records.
|
|
determine if the transaction is balanced.
|
|
checks whether a record is cleared or not.
|
|
checks whether a transaction is scheduled or not by checking the record category.
|
|
creates a new record and update the balances of the two involved accounts.
|
|
packs an Transaction record.
Implements Database< transactionStructure, packedTransactionStructure >. |
|
This function deletes all the transactions earlier than the given date. This should not change the existing balances for the accounts involved. Both cleared and uncleared transactions are removed, but the scheduled ones are kept
|
|
creates a new (unscheduled) record from a scheduled one, leaving the original scheduled transaction unaltered.
|
|
scans through all the scheduled transactions, and if there are any due they are recorded and their next occurance date is updated.
|
|
schedule the first scheduled record that is due.
|
|
set a record category to uncleared.
|
|
unpacks an Transaction record.
Implements Database< transactionStructure, packedTransactionStructure >. |
|
checks whether a record is to be cleared or not.
|