Temp fix for number import on cost

This commit is contained in:
snipe 2016-08-23 19:01:40 -07:00
parent b1324c2e64
commit 4cf2d16c7a

View file

@ -780,7 +780,7 @@ class ObjectImportCommand extends Command
if (!empty($item["purchase_cost"])) {
//TODO How to generalize this for not USD?
$purchase_cost = substr($item["purchase_cost"], 0, 1) === '$' ? substr($item["purchase_cost"], 1) : $item["purchase_cost"];
$asset->purchase_cost = number_format($purchase_cost, 2);
$asset->purchase_cost = number_format($purchase_cost, 2, '.', '');
$this->log("Asset cost parsed: " . $asset->purchase_cost);
} else {
$asset->purchase_cost = 0.00;