kdiamond
Member
I have a calc element that calulates the total from repeatable rows. Very odd thing is when there is only ONE row, it takes the amount entered on that row and it does a divide by 4. Example, if the row is 12, the calc total is 3. If the row is 24, the total displayed is 6. It works fine when there are >1 rows.
Here is the calc:
$sold = FabrikWorker::JSONtoData($data['pet_event_report_products___format_sold_raw'], true);
$total= implode(',', $sold);
return array_sum(str_split($total));
On further testing it's not always /4. I'm not sure what it is. Some small number are not affected.
Here is the calc:
$sold = FabrikWorker::JSONtoData($data['pet_event_report_products___format_sold_raw'], true);
$total= implode(',', $sold);
return array_sum(str_split($total));
On further testing it's not always /4. I'm not sure what it is. Some small number are not affected.
Attachments
Last edited: