Merge branch 'v1.8.0' of gitee.com:gongfuxiang/shopxo into v1.8.0

feat/task1-c-wallet
devil_gong 2019-12-24 15:19:05 +08:00
commit e104af4aa1
1 changed files with 6 additions and 2 deletions

View File

@ -774,12 +774,16 @@ function PriceBeautify($price = 0, $default = null)
}
$price = str_replace('.00', '', $price);
if(strpos ($price, '.') !== false)
if(strpos($price, '.') !== false)
{
if(substr($price, -1) == 0)
{
$price = substr($price, 0, -1);
}
}
if(substr($price, -1) == '.')
{
$price = substr($price, 0, -1);
}
}
return $price;
}