diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-11 01:17:29 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-11 01:17:29 -0500 |
commit | eb772893b00119ead26d8662d73460651cafe11d (patch) | |
tree | e901434a5079b09cd67ea46e87c6a0bddc7f7ac4 /src/timelog.h | |
parent | b62b03335f33a6a0ae422605b8b6271add849aa6 (diff) | |
download | fork-ledger-eb772893b00119ead26d8662d73460651cafe11d.tar.gz fork-ledger-eb772893b00119ead26d8662d73460651cafe11d.tar.bz2 fork-ledger-eb772893b00119ead26d8662d73460651cafe11d.zip |
Timeclock entries can now have notes
Example of a tagged entry:
i 2009/11/01 12:00:00 Account Payee ; :Foo:
o 2009/11/01 13:00:00
Two spaces or a tab must separate account from payee, and payee from
note.
Diffstat (limited to 'src/timelog.h')
-rw-r--r-- | src/timelog.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/timelog.h b/src/timelog.h index 7d79af3e..d0519ce4 100644 --- a/src/timelog.h +++ b/src/timelog.h @@ -56,19 +56,21 @@ public: datetime_t checkin; account_t * account; string desc; + string note; time_xact_t() : account(NULL) { TRACE_CTOR(time_xact_t, ""); } time_xact_t(const datetime_t& _checkin, - account_t * _account = NULL, - const string& _desc = "") - : checkin(_checkin), account(_account), desc(_desc) { - TRACE_CTOR(time_xact_t, "const datetime_t&, account_t *, const string&"); + account_t * _account = NULL, + const string& _desc = "", + const string& _note = "") + : checkin(_checkin), account(_account), desc(_desc), note(_note) { + TRACE_CTOR(time_xact_t, "const datetime_t&, account_t *, string, string"); } time_xact_t(const time_xact_t& xact) : checkin(xact.checkin), account(xact.account), - desc(xact.desc) { + desc(xact.desc), note(xact.note) { TRACE_CTOR(time_xact_t, "copy"); } ~time_xact_t() throw() { @@ -79,7 +81,7 @@ public: class time_log_t { std::list<time_xact_t> time_xacts; - journal_t& journal; + journal_t& journal; public: time_log_t(journal_t& _journal) : journal(_journal) { @@ -89,11 +91,13 @@ public: void clock_in(const datetime_t& checkin, account_t * account = NULL, - const string& desc = ""); + const string& desc = "", + const string& note = ""); void clock_out(const datetime_t& checkin, account_t * account = NULL, - const string& desc = ""); + const string& desc = "", + const string& note = ""); }; } // namespace ledger |