Hi there, I am struggling on sorting a column desc on Data Table - I hope someone can help me please I tried on the sql itself, on a Sort, and on the view.... nothing seems to be working. Thank you very much
Sql:
SELECT PASSENGERNAME, sum(TOTALFARE/100) as TOTAL
FROM INVOICE
join BOOKING on BOOKING.INVOICE_LINKNO = INVOICE.INVOICENO
where CLIENT_LINKNO=:customerNames AND (EXTRACT (YEAR FROM ISSUEDATE)=:years)
group by PASSENGERNAME
order by TOTAL DESC
->pipe(new Map(array(
'{meta}' => function($metaData) {
$metaData['columns']['TOTAL'] = array(
'className' => 'text-right',
'footer' => 'sum',
'footerText' => 'Total: @value',
"type"=>"number",
"decimals"=>2,
);
return $metaData;
},
)))
->pipe(new Sort(array(
"TOTAL"=>"DESC"
)))
->pipe($this->dataStore("queryCorporateClients"));
"options" => array(
"order"=>array(
array(1,"desc")
),