summaryrefslogtreecommitdiff
path: root/src/balance.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/balance.h')
-rw-r--r--src/balance.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/balance.h b/src/balance.h
index 2a6f3072..e8665335 100644
--- a/src/balance.h
+++ b/src/balance.h
@@ -435,8 +435,10 @@ class balance_t
amount_t amount(const commodity_t& commodity =
*commodity_t::null_commodity) const;
balance_t value(const moment_t& moment = now) const;
- balance_t price() const;
- moment_t date() const;
+
+ optional<balance_t> price() const;
+ optional<moment_t> date() const;
+ optional<string> tag() const;
balance_t
strip_annotations(const bool keep_price = amount_t::keep_price,
@@ -896,12 +898,16 @@ class balance_pair_t
balance_t value(const moment_t& moment = now) const {
return quantity.value(moment);
}
- balance_t price() const {
+
+ optional<balance_t> price() const {
return quantity.price();
}
- moment_t date() const {
+ optional<moment_t> date() const {
return quantity.date();
}
+ optional<string> tag() const {
+ return quantity.tag();
+ }
balance_t
strip_annotations(const bool keep_price = amount_t::keep_price,