Hey! I've got a calc element with a code for sum repeating groups:
Here's my code:
$fields = array('generic_prices_77_repeat__price');
foreach ($fields as $field)
{
$value = JArrayHelper::getValue($data, $field . '_raw', array());
$thisSum = array_sum($value);
$total += $thisSum;
}
return (double)$total;
I've also tries with: return (float)$total; it is still rounding values....
Here's my code:
$fields = array('generic_prices_77_repeat__price');
foreach ($fields as $field)
{
$value = JArrayHelper::getValue($data, $field . '_raw', array());
$thisSum = array_sum($value);
$total += $thisSum;
}
return (double)$total;
I've also tries with: return (float)$total; it is still rounding values....