Treat service prices as floats

This commit is contained in:
Björn Fromme
2018-07-31 15:01:53 +02:00
parent 6160703361
commit 027bdffc49
@@ -586,9 +586,9 @@ class ImportService implements SingletonInterface
$type = 'VER';
}
$price = (int) $service->preis;
$price = (float) str_replace(',', '.', $service->preis);
if ($skipWithoutPrice && $price === 0) {
if ($skipWithoutPrice && $price === 0.0) {
continue;
}
@@ -605,7 +605,7 @@ class ImportService implements SingletonInterface
$data[$type][] = [
'label' => $label,
'price' => $price,
'price' => number_format($price, 2, ',', '.'),
];
}