diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-06 03:18:10 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-06 03:24:06 -0600 |
commit | 97d68ebc8cf2bf88feffaedd6873934dc785c411 (patch) | |
tree | b19e73eb8860dda1bbf8358141ddf1afc2060b50 /src/annotate.h | |
parent | eb3591f898e194be0cb6c15107e8e41e9dd67206 (diff) | |
download | fork-ledger-97d68ebc8cf2bf88feffaedd6873934dc785c411.tar.gz fork-ledger-97d68ebc8cf2bf88feffaedd6873934dc785c411.tar.bz2 fork-ledger-97d68ebc8cf2bf88feffaedd6873934dc785c411.zip |
Added "value" sub-directive for commodity directive
Diffstat (limited to 'src/annotate.h')
-rw-r--r-- | src/annotate.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/annotate.h b/src/annotate.h index f9d62c5b..38553752 100644 --- a/src/annotate.h +++ b/src/annotate.h @@ -247,6 +247,12 @@ public: return *ptr; } + virtual optional<expr_t> value_expr() const { + if (details.value_expr) + return details.value_expr; + return commodity_t::value_expr(); + } + optional<price_point_t> virtual find_price(const optional<commodity_t&>& commodity = none, const optional<datetime_t>& moment = none, |