Fix Calc
This commit is contained in:
parent
d75bed7a65
commit
c13545527f
@ -85,7 +85,11 @@ class Calc
|
|||||||
if($collection->getName() == "opt") continue;
|
if($collection->getName() == "opt") continue;
|
||||||
if($collection->getFormel() != "") {
|
if($collection->getFormel() != "") {
|
||||||
$formel = $this->formelCalc->parse($collection->getFormel());
|
$formel = $this->formelCalc->parse($collection->getFormel());
|
||||||
eval('$var = ' . $formel . ';');
|
if(preg_match("/^[a-z](.*)/", $formel)) {
|
||||||
|
eval('$var = "' . $formel . '";');
|
||||||
|
}else{
|
||||||
|
eval('$var = ' . $formel . ';');
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
if(!isset($this->engine->getVariables()[$collection->getName()])) {
|
if(!isset($this->engine->getVariables()[$collection->getName()])) {
|
||||||
$var = 'XXXXXXXXXXXX';
|
$var = 'XXXXXXXXXXXX';
|
||||||
|
|||||||
@ -90,7 +90,12 @@ class CalcValues
|
|||||||
if($collection->getName() == "opt") continue;
|
if($collection->getName() == "opt") continue;
|
||||||
if($collection->getFormel() != "") {
|
if($collection->getFormel() != "") {
|
||||||
$formel = $this->formelCalc->parse($collection->getFormel());
|
$formel = $this->formelCalc->parse($collection->getFormel());
|
||||||
eval('$var = ' . $formel . ';');
|
if(preg_match("/^[a-z](.*)/", $formel)) {
|
||||||
|
eval('$var = "' . $formel . '";');
|
||||||
|
}else{
|
||||||
|
eval('$var = ' . $formel . ';');
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if(!isset($this->engine->getVariables()[$collection->getName()])) {
|
if(!isset($this->engine->getVariables()[$collection->getName()])) {
|
||||||
$var = 'XXXXXXXX';
|
$var = 'XXXXXXXX';
|
||||||
@ -126,4 +131,4 @@ class CalcValues
|
|||||||
return $price;
|
return $price;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -693,10 +693,10 @@ if(!function_exists('getSammelformMengenAbschlagPlano')) {
|
|||||||
function getMaschine($breite, $hoehe) {
|
function getMaschine($breite, $hoehe) {
|
||||||
if($breite > 49 || $hoehe > 49) {
|
if($breite > 49 || $hoehe > 49) {
|
||||||
|
|
||||||
return '"kba"';
|
return 'kba';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '"gto"';
|
return 'gto';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getGeiferRand($format) {
|
function getGeiferRand($format) {
|
||||||
@ -730,4 +730,4 @@ if(!function_exists('getSammelformMengenAbschlagPlano')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user