How do I get rid of ,00 in a mark
Posted: Wed Nov 28, 2012 11:30 am
How do I get rid of ,00 in a mark.
I don't want to show the decimal.
1650 instead of 1650,00
I don't want to show the decimal.
1650 instead of 1650,00
Steema Software - Customer Support Forums
https://974310.kinnakethk.tech/
Code: Select all
private function formatValue($value) {
$LOCALE = localeconv();
$tmpResult = number_format($value,2,
$LOCALE['decimal_point'],
$LOCALE['thousands_sep']);
return $tmpResult;
}
Code: Select all
private function formatValue($value) {
$LOCALE = localeconv();
try { // CDI TF02010053
if (fmod((double)$value,1)!=0) {
if ($LOCALE['frac_digits'] != $this->valuesDecimal)
$decimals=$this->valuesDecimal;
else
$decimals=$LOCALE['frac_digits'];
}
else
$decimals=0;
$tmpResult = number_format($value,$decimals,
$LOCALE['decimal_point'],
$LOCALE['thousands_sep']);
if ($tmpResult=='-0') {
$tmpResult='0';
}
} catch (Exception $e) {
$tmpResult = number_format($value, $decimals,
$LOCALE['decimal_point'],
$LOCALE['thousands_sep']);
}
return $tmpResult;
}