summaryrefslogtreecommitdiff
path: root/src/annotate.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-06 03:18:10 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-06 03:24:06 -0600
commit97d68ebc8cf2bf88feffaedd6873934dc785c411 (patch)
treeb19e73eb8860dda1bbf8358141ddf1afc2060b50 /src/annotate.h
parenteb3591f898e194be0cb6c15107e8e41e9dd67206 (diff)
downloadfork-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.h6
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,