From b1fcd90b62e9e59d2dfd31b7a3c2219f6d50b1c6 Mon Sep 17 00:00:00 2001 From: raishvaria Date: Fri, 13 Dec 2019 14:40:17 +0530 Subject: [PATCH] refactor format_money_pdf helpers --- app/Space/helpers.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Space/helpers.php b/app/Space/helpers.php index 2ce77f82..e8ae1cda 100644 --- a/app/Space/helpers.php +++ b/app/Space/helpers.php @@ -41,16 +41,12 @@ function clean_slug($string) * @param $money * @return formated_money */ -function format_money_pdf($money, $getCurrency = null) +function format_money_pdf($money, $currency = null) { $money = $money / 100; - $currency = null; - - if ($getCurrency == null) { + if (!$currency) { $currency = Currency::findOrFail(CompanySetting::getSetting('currency', 1)); - } else { - $currency = $getCurrency; } $format_money = number_format(