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