You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.
Hi Gerardo
Do you know why I'm getting 0 returned sometimes while reading money amounts from Excel ?
I'm importing data with PHPSpreadSheet and I use Money class in a function, during a foreach
Cells in spreadsheet doesn't have any format. And some amounts have . as decimal separator and others have ,
function moneda($monto)
{
$currency = new Gerardojbaez\Money\Currency('ARS');
$currency->setPrecision(2);
$currency->setThousandSeparator('.');
$currency->setDecimalSeparator(',');
$currency->setSymbolPlacement('before');
$money = new Gerardojbaez\Money\Money($monto, $currency);
echo $this->echonew("Monto:".$monto."<br />".$money);
return $money;
//echo Money::parse('$1,200.90', 'USD')->toDecimal();
//return moneyFormat($monto, 'ARS');
}
Thanks
The text was updated successfully, but these errors were encountered:
Hi Gerardo
Do you know why I'm getting 0 returned sometimes while reading money amounts from Excel ?
I'm importing data with PHPSpreadSheet and I use Money class in a function, during a foreach
Cells in spreadsheet doesn't have any format. And some amounts have . as decimal separator and others have ,
Thanks
The text was updated successfully, but these errors were encountered: