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