Always calculate transaction totals based on the expression for the amount.
This commit is contained in:
parent
1d4c65b5ca
commit
4d8fba5fad
1 changed files with 2 additions and 6 deletions
|
|
@ -191,15 +191,11 @@ void calc_xacts::operator()(xact_t& xact)
|
||||||
add_or_set_value(xdata.total, last_xact->xdata().total);
|
add_or_set_value(xdata.total, last_xact->xdata().total);
|
||||||
|
|
||||||
if (! xdata.has_flags(XACT_EXT_NO_TOTAL)) {
|
if (! xdata.has_flags(XACT_EXT_NO_TOTAL)) {
|
||||||
#if 0
|
|
||||||
bind_scope_t bound_scope(*amount_expr.get_context(), xact);
|
bind_scope_t bound_scope(*amount_expr.get_context(), xact);
|
||||||
if (xdata.total.is_null())
|
if (xdata.total.is_null())
|
||||||
xdata.total = amount_expr.calc();
|
xdata.total = amount_expr.calc(bound_scope);
|
||||||
else
|
else
|
||||||
xdata.total += amount_expr.calc();
|
xdata.total += amount_expr.calc(bound_scope);
|
||||||
#else
|
|
||||||
xact.add_to_value(xdata.total);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
item_handler<xact_t>::operator()(xact);
|
item_handler<xact_t>::operator()(xact);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue