public static function numberTwoDecimals($number) | public static function numberTwoDecimals($number) | ||||
{ | { | ||||
return number_format(((int) ($number * 100)) / 100, 2) ; | |||||
return number_format(( ($number * 100)) / 100, 2) ; | |||||
} | } | ||||
} | } |
} | } | ||||
function numberTwoDecimals(num) { | function numberTwoDecimals(num) { | ||||
return (parseInt((num * 100)) / 100).toFixed(2) ; | |||||
return Number(num).toFixed(2) ; | |||||
} | } | ||||
/** | /** |