Page 1 of 1

How to Currency Symbol and Change Format of the SUM Number?

Posted: 2020-10-03 08:31
by mohamed
Hello,

When I select Show Column Sum of a filed, the following code is generated in the related PHP file !!!!_View.php


$x->HTML = str_replace('<!-- tv data above -->', $sumRow, $x->HTML);


For instance the total is 1450

I am wondering,
1. How to add the currency symbol to it ? e.g., $ 1450

2. How to format the Total Number with; 1000 comma separator ? e.g., 1,450

3. How to format the Total number with; 2 Decimal points ? e.g., 1,450.00

Re: How to Currency Symbol and Change Format of the SUM Number?

Posted: 2020-10-03 19:17
by pbottcher
Hi,
you could change that line to


$x->HTML = str_replace('<!-- tv data above -->', '$ '.number_format($sumRow, 2, '.', ','), $x->HTML);

Re: How to Currency Symbol and Change Format of the SUM Number?

Posted: 2020-10-18 20:29
by mohamed
Hi pböttcher,

Thank you :)