Fix PDF issues

This commit is contained in:
radhu587
2019-12-13 13:31:26 +05:30
parent e28c89085d
commit ce99fa3d82
4 changed files with 35 additions and 16 deletions

View File

@ -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,