Skip to content

Commit

Permalink
Tweak to calculations in CSV. Export formatted for non-raw, JSON only…
Browse files Browse the repository at this point in the history
… for raw.
  • Loading branch information
cheesegrits committed Aug 13, 2017
1 parent 349c2c5 commit fab784a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/com_fabrik/models/csvexport.php
Expand Up @@ -483,11 +483,12 @@ protected function addCalculations($a, &$str)

if (count($json) == 1)
{
$default = $json['Total']->value;
$default = $defaultRaw = $json['Total']->value;
}
else
{
$default = json_encode($json);
$default = strip_tags($calcs[$calKey][$aKey]);
$defaultRaw = json_encode($json);
}
}

Expand Down Expand Up @@ -524,7 +525,7 @@ protected function addCalculations($a, &$str)

if ($incRaw)
{
$calculations[$calKey][$x + 1] = $default;
$calculations[$calKey][$x + 1] = $defaultRaw;
}
}
}
Expand Down

0 comments on commit fab784a

Please sign in to comment.