diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-09 03:42:06 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-09 03:42:35 -0500 |
commit | 6cdb79e2a611d99fa6e13dd224a92dc8badaf2ac (patch) | |
tree | 967464fc8bda9543a108d83d3fc96ecdffb4e04c /src/commodity.h | |
parent | 2c80227339538154ad0869e746f52db805325589 (diff) | |
download | fork-ledger-6cdb79e2a611d99fa6e13dd224a92dc8badaf2ac.tar.gz fork-ledger-6cdb79e2a611d99fa6e13dd224a92dc8badaf2ac.tar.bz2 fork-ledger-6cdb79e2a611d99fa6e13dd224a92dc8badaf2ac.zip |
XML reporting now works via the "xml" command
Diffstat (limited to 'src/commodity.h')
-rw-r--r-- | src/commodity.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/commodity.h b/src/commodity.h index ef9ef5c4..42cc6d8f 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -318,6 +318,11 @@ public: return *base->varied_history; return none; } + optional<const varied_history_t&> varied_history() const { + if (base->varied_history) + return *base->varied_history; + return none; + } optional<history_t&> history(const optional<commodity_t&>& commodity); @@ -418,7 +423,8 @@ struct compare_amount_commodities { bool operator()(const amount_t * left, const amount_t * right) const; }; -void to_xml(std::ostream& out, const commodity_t& comm); +void to_xml(std::ostream& out, const commodity_t& comm, + bool commodity_details = false); } // namespace ledger |