mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 20:21:10 -04:00
refactor format_money_pdf helpers
This commit is contained in:
@ -41,16 +41,12 @@ function clean_slug($string)
|
|||||||
* @param $money
|
* @param $money
|
||||||
* @return formated_money
|
* @return formated_money
|
||||||
*/
|
*/
|
||||||
function format_money_pdf($money, $getCurrency = null)
|
function format_money_pdf($money, $currency = null)
|
||||||
{
|
{
|
||||||
$money = $money / 100;
|
$money = $money / 100;
|
||||||
|
|
||||||
$currency = null;
|
if (!$currency) {
|
||||||
|
|
||||||
if ($getCurrency == null) {
|
|
||||||
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', 1));
|
$currency = Currency::findOrFail(CompanySetting::getSetting('currency', 1));
|
||||||
} else {
|
|
||||||
$currency = $getCurrency;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$format_money = number_format(
|
$format_money = number_format(
|
||||||
|
|||||||
Reference in New Issue
Block a user