summaryrefslogtreecommitdiff
path: root/src/balance.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/balance.h')
-rw-r--r--src/balance.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/balance.h b/src/balance.h
index 36a6907a..a4f922a8 100644
--- a/src/balance.h
+++ b/src/balance.h
@@ -480,6 +480,13 @@ public:
optional<amount_t>
commodity_amount(const optional<const commodity_t&>& commodity = none) const;
+ balance_t number() const {
+ balance_t temp;
+ foreach (const amounts_map::value_type& pair, amounts)
+ temp += pair.second.number();
+ return temp;
+ }
+
/**
* Annotated commodity methods. The amounts contained by a balance
* may use annotated commodities. The `strip_annotations' method