Code: Select all
function invoices_header($contentType, $memberInfo, &$args) {
$header='';
switch($contentType) {
case 'tableview':
$sum=sqlvalue("SELECT SUM(REPLACE(`invoices`.`bill_amount`,',','')) FROM invoices ");
$header="<%%HEADER%%><script type=\"text/javascript\">
\$j(function(){
\$j('td.invoices-bill_amount').last().text(Intl.NumberFormat().format(".$sum.")).addClass('text-right');
});
</script>";
break;
}
return $header;
}
like that SELECT SUM(REPLACE(`invoices`.`bill_amount`,',','')) FROM {$x->QueryFrom} {$QueryWhere}
please help me