diff options
author | John Wiegley <johnw@newartisans.com> | 2003-10-04 01:54:30 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2003-10-04 01:54:30 +0000 |
commit | 3ef7bfdb32d770812e9805474ea9956568385efe (patch) | |
tree | 9bd7673055d3a5ff03caf0d4f9ba63a8c2a45cc7 /amount.cc | |
parent | 3cfae2794784c1629dd98c0b600b2731e27a3f57 (diff) | |
download | fork-ledger-3ef7bfdb32d770812e9805474ea9956568385efe.tar.gz fork-ledger-3ef7bfdb32d770812e9805474ea9956568385efe.tar.bz2 fork-ledger-3ef7bfdb32d770812e9805474ea9956568385efe.zip |
Added support for virtual accounts.
Diffstat (limited to 'amount.cc')
-rw-r--r-- | amount.cc | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -425,12 +425,17 @@ const std::string gmp_amount::as_str(bool full_prec) const { std::ostringstream s; - assert(quantity_comm); - s << amount_to_str(quantity_comm, quantity, full_prec); + if (quantity_comm) + s << amount_to_str(quantity_comm, quantity, full_prec); + else + s << quantity; if (priced) { - assert(price_comm); - s << " @ " << amount_to_str(price_comm, price, full_prec); + s << " @ "; + if (price_comm) + s << amount_to_str(price_comm, price, full_prec); + else + s << price; } return s.str(); } |