diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-05 17:40:07 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-05 17:43:28 -0500 |
commit | 5e3f3d7f4730dd2990b6b56352e4a09cdde9a234 (patch) | |
tree | d9418af372ffea3886f15f5faf562ac852a0daa9 /src/balance.h | |
parent | 1bdb9330e56e49ecd660f3aafdc2d349a20e3044 (diff) | |
download | fork-ledger-5e3f3d7f4730dd2990b6b56352e4a09cdde9a234.tar.gz fork-ledger-5e3f3d7f4730dd2990b6b56352e4a09cdde9a234.tar.bz2 fork-ledger-5e3f3d7f4730dd2990b6b56352e4a09cdde9a234.zip |
Report sought magnitude when balancing errors occur
Diffstat (limited to 'src/balance.h')
-rw-r--r-- | src/balance.h | 7 |
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 |