Attendize/app/Helpers/helpers.php

19 lines
460 B
PHP
Raw Normal View History

2016-02-29 15:59:36 +00:00
<?php
2016-09-06 20:39:27 +00:00
if (!function_exists('money')) {
/**
* Format a given amount to the given currency
*
* @param $amount
* @param \App\Models\Currency $currency
* @return string
*/
function money($amount, \App\Models\Currency $currency)
{
2016-09-06 20:39:27 +00:00
return $currency->symbol_left . number_format($amount, $currency->decimal_place, $currency->decimal_point,
$currency->thousand_point) . $currency->symbol_right;
}
2016-03-05 00:18:10 +00:00
}