Hi,
I am using Datagrid with clientRowGroup (really happy you guys added this group feature!).
However, when listing amounts with negative, it is not taking into consideration when doing the totals.
The order question is how to format with $ and decimal points on the group row? thanks
Here is my code:
"clientRowGroup" => [
"name" => [
'direction' => 'asc',
'calculate' => [
'totalAmount' => [
'sum', //'sum', 'count', 'avg', 'min', 'max'
'amountFormatted'
],
],
"top" => "<td colspan='999'>{expandCollapseIcon} {name} | Total: {totalAmount}</td>",
],
],
For instance , I have two rows of data : BBQ Joint $579.00 BBQ Joint $-579.00
The row group total instead of showing 0 (zero) it is showing 1158 BBQ Joint | Total: 1158
The negative amount comes from a call to an API, and all the amountFormated is doing is dividing by 100:
->pipe(new CalculatedColumn(array(
"amountFormatted" =>"{amount}/100"
)))
thanks