diff options
-rw-r--r-- | src/value.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/value.cc b/src/value.cc index 724d87fc..d28883a4 100644 --- a/src/value.cc +++ b/src/value.cc @@ -390,6 +390,10 @@ value_t& value_t::operator+=(const value_t& val) as_long_lval() += val.as_long(); return *this; case AMOUNT: + if (val.as_amount().has_commodity()) { + in_place_cast(BALANCE); + return *this += val; + } in_place_cast(AMOUNT); as_amount_lval() += val.as_amount(); return *this; |