summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/value.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/value.cc b/src/value.cc
index 9f69016d..6e1ed79d 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1407,17 +1407,22 @@ value_t value_t::value(const optional<datetime_t>& moment,
return NULL_VALUE;
case AMOUNT:
- if (optional<amount_t> val =
- as_amount().value(moment, in_terms_of))
+ if (optional<amount_t> val = as_amount().value(moment, in_terms_of))
return *val;
return NULL_VALUE;
case BALANCE:
- if (optional<balance_t> bal =
- as_balance().value(moment, in_terms_of))
+ if (optional<balance_t> bal = as_balance().value(moment, in_terms_of))
return *bal;
return NULL_VALUE;
+ case SEQUENCE: {
+ value_t temp;
+ foreach (const value_t& value, as_sequence())
+ temp.push_back(value.value(moment, in_terms_of));
+ return temp;
+ }
+
default:
break;
}