Fixes
This commit is contained in:
parent
6f115e53de
commit
fb4593dda2
@ -113,7 +113,7 @@ class Calc
|
||||
$formel = $this->formelCalc->parse($edge->getFormel());
|
||||
if ($formel != "" && $option->getId() != 'weight' && !$option->isAjaxExport()) {
|
||||
$p = 0;
|
||||
|
||||
$formel = str_replace("tonumber", '$this->toNumber', $formel);
|
||||
eval('@$p = ' . $formel . ';');
|
||||
if($p > 0 || $p < 0) {
|
||||
$price += $p;
|
||||
@ -129,4 +129,13 @@ class Calc
|
||||
return $price;
|
||||
}
|
||||
|
||||
private function toNumber($value)
|
||||
{
|
||||
if(strpos($value,',') == (strlen($value)-1)) {
|
||||
return str_replace(',', '', $value);
|
||||
}
|
||||
|
||||
return str_replace(',', '.', $value);
|
||||
|
||||
}
|
||||
}
|
||||
@ -28,6 +28,7 @@ class Parser
|
||||
case 'select':
|
||||
$obj = new Select($node);
|
||||
break;
|
||||
case 'text':
|
||||
case 'textarea':
|
||||
$obj = new Text($node);
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user