diff options
author | John Wiegley <johnw@newartisans.com> | 2004-07-31 07:42:34 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-07-31 07:42:34 -0400 |
commit | f570e6644fce27b612562282b11d00fd0691873d (patch) | |
tree | cc6da9b59aed82e17f9e946e6e1ac1ac92257280 /ledger.h | |
parent | 2a9e778b7d359a009d7a1f2432bf6d0dcf2fab7d (diff) | |
download | fork-ledger-f570e6644fce27b612562282b11d00fd0691873d.tar.gz fork-ledger-f570e6644fce27b612562282b11d00fd0691873d.tar.bz2 fork-ledger-f570e6644fce27b612562282b11d00fd0691873d.zip |
brought back the "print" and "equity" reports; this time much better!
Diffstat (limited to 'ledger.h')
-rw-r--r-- | ledger.h | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -288,6 +288,7 @@ class commodity_t #define TRANSACTION_NORMAL 0x0 #define TRANSACTION_VIRTUAL 0x1 #define TRANSACTION_BALANCE 0x2 +#define TRANSACTION_AUTO 0x4 class transaction_t { @@ -322,11 +323,13 @@ class entry_t UNCLEARED, CLEARED, PENDING }; - std::time_t date; - enum entry_state_t state; - std::string code; - std::string payee; - transactions_list transactions; + std::time_t date; + entry_state_t state; + std::string code; + std::string payee; + transactions_list transactions; + + entry_t() : date(-1), state(UNCLEARED) {} ~entry_t() { for (transactions_list::iterator i = transactions.begin(); @@ -429,9 +432,14 @@ class ledger_t account_t * find_account(const std::string& name, bool auto_create = true) { return master->find_account(name, auto_create); } + account_t * find_account(const std::string& name) const { + return master->find_account(name, false); + } bool add_entry(entry_t * entry); bool remove_entry(entry_t * entry); + + entry_t * derive_entry(int argc, char **argv) const; }; int parse_ledger_file(char * p, ledger_t * journal); |