Fixes
This commit is contained in:
parent
017a7931b3
commit
4a2fed26de
2394
cobertura.xml
2394
cobertura.xml
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace PSC\Library\Calc\Calc;
|
||||
|
||||
use PSC\Library\Calc\Article;
|
||||
@ -10,15 +11,14 @@ use PSC\Library\Calc\General\Type\EdgeCollection;
|
||||
use PSC\Library\Calc\General\Type\EdgeCollectionContainer;
|
||||
use PSC\Library\Calc\Option\Type\Base;
|
||||
use PSC\Library\Calc\Option\Type\Checkbox;
|
||||
use PSC\Library\Calc\Option\Type\ColorDBSelect;
|
||||
use PSC\Library\Calc\Option\Type\Input;
|
||||
use PSC\Library\Calc\Option\Type\Row;
|
||||
use PSC\Library\Calc\Option\Type\Select;
|
||||
use PSC\Library\Calc\Option\Type\ColorDBSelect;
|
||||
use PSC\Library\Calc\Option\Type\Select\ColorOpt;
|
||||
|
||||
class Valid
|
||||
{
|
||||
|
||||
/** @var Engine */
|
||||
protected $engine = null;
|
||||
|
||||
@ -56,8 +56,7 @@ class Valid
|
||||
$option->addValidationError(new Min(intval($option->getRawValue()), $option->getMinValue()));
|
||||
}
|
||||
}
|
||||
if(($option instanceof Select || $option instanceof Checkbox) && !($option instanceOf ColorDBSelect)) {
|
||||
|
||||
if (($option instanceof Select || $option instanceof Checkbox) && !($option instanceof ColorDBSelect)) {
|
||||
$valid = false;
|
||||
$nextShouldBeValid = false;
|
||||
$isDefaultValid = true;
|
||||
@ -71,11 +70,12 @@ class Valid
|
||||
$groupsValid = [];
|
||||
/** @var EdgeCollection $collection */
|
||||
foreach ($opt->getEdgesCollectionContainer() as $collection) {
|
||||
if(!$withFormel && trim($collection->getFormel()) != "") continue;
|
||||
if (!$withFormel && trim($collection->getFormel()) != '')
|
||||
continue;
|
||||
|
||||
$groupsValid[$collection->getName()] = false;
|
||||
|
||||
if(trim($collection->getFormel()) != "") {
|
||||
if (trim($collection->getFormel()) != '') {
|
||||
$value = $this->formelCalc->parse($collection->getFormel(), true);
|
||||
eval('$value = ' . $value . ';');
|
||||
/** @var Edge $edge */
|
||||
@ -100,7 +100,11 @@ class Valid
|
||||
$opt->setIsValid(true);
|
||||
}
|
||||
|
||||
if(!$opt->isValid() && $opt->getId() == $option->getDefault() && $option->getSelectedOptions()->count() == 0) {
|
||||
if (
|
||||
!$opt->isValid() &&
|
||||
$opt->getId() == $option->getDefault() &&
|
||||
$option->getSelectedOptions()->count() == 0
|
||||
) {
|
||||
$isDefaultValid = false;
|
||||
}
|
||||
|
||||
@ -114,24 +118,33 @@ class Valid
|
||||
if ($option->getDefault() !== null && $opt->isValid() && !$isDefaultValid) {
|
||||
$option->setDefault($opt->getId());
|
||||
$this->engine->setVariable($option->getId(), $opt->getId());
|
||||
if(isset($this->engine->validVars[$option->getId()]) && $opt->getId() != $this->engine->validVars[$option->getId()]) {
|
||||
if (
|
||||
isset($this->engine->validVars[$option->getId()]) &&
|
||||
$opt->getId() != $this->engine->validVars[$option->getId()]
|
||||
) {
|
||||
$this->engine->validDirty = true;
|
||||
}
|
||||
$isDefaultValid = true;
|
||||
}
|
||||
|
||||
if ($option instanceof Checkbox) {
|
||||
if (isset($this->engine->getVariables()[$option->getId()]) && is_array($this->engine->getVariables()[$option->getId()]) && in_array($opt->getId(), $this->engine->getVariables()[$option->getId()])) {
|
||||
if (
|
||||
isset($this->engine->getVariables()[$option->getId()]) &&
|
||||
is_array($this->engine->getVariables()[$option->getId()]) &&
|
||||
in_array($opt->getId(), $this->engine->getVariables()[$option->getId()])
|
||||
) {
|
||||
$option->addSelectedOption($opt);
|
||||
}
|
||||
} else {
|
||||
if (isset($this->engine->getVariables()[$option->getId()]) && $this->engine->getVariables()[$option->getId()] == $opt->getId()) {
|
||||
if (
|
||||
isset($this->engine->getVariables()[$option->getId()]) &&
|
||||
$this->engine->getVariables()[$option->getId()] == $opt->getId()
|
||||
) {
|
||||
if (!$opt->isValid()) {
|
||||
$nextShouldBeValid = true;
|
||||
} else {
|
||||
$option->addSelectedOption($opt);
|
||||
}
|
||||
|
||||
} else {
|
||||
if ($nextShouldBeValid && $opt->isValid()) {
|
||||
$this->engine->getVariables()[$option->getId()] = $opt->getId();
|
||||
@ -157,7 +170,6 @@ class Valid
|
||||
|
||||
$option->processValue();
|
||||
$option->setIsValid($valid);
|
||||
|
||||
}
|
||||
|
||||
if ($option instanceof ColorDBSelect) {
|
||||
@ -203,8 +215,6 @@ class Valid
|
||||
$this->engine->setVariables($option->parseAdditionalValues($this->engine->getVariables()));
|
||||
$this->engine->addCalcVariable($option->getId() . '_valid', (int) $option->isValid());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private function edgeIsValid(mixed $section, Edge $edge): bool
|
||||
@ -216,19 +226,32 @@ class Valid
|
||||
$skipTests = true;
|
||||
}
|
||||
|
||||
if(!$skipTests && !$valid && $edge->isRegion() &&
|
||||
if (
|
||||
!$skipTests &&
|
||||
!$valid &&
|
||||
$edge->isRegion() &&
|
||||
$edge->getFrom() <= $this->engine->getVariables()[$section] &&
|
||||
$edge->getTo() >= $this->engine->getVariables()[$section]) {
|
||||
$edge->getTo() >= $this->engine->getVariables()[$section]
|
||||
) {
|
||||
$valid = true;
|
||||
}
|
||||
|
||||
if(!$skipTests && !$valid && $edge->isRegion() &&
|
||||
if (
|
||||
!$skipTests &&
|
||||
!$valid &&
|
||||
$edge->isRegion() &&
|
||||
$edge->getFrom() <= $this->engine->getVariables()[$section] &&
|
||||
$edge->getTo() == 0) {
|
||||
$edge->getTo() == 0
|
||||
) {
|
||||
$valid = true;
|
||||
}
|
||||
|
||||
if(!$skipTests && !$valid && !$edge->isRegion() && in_array($this->engine->getVariables()[$section], $edge->getValues())) {
|
||||
if (
|
||||
!$skipTests &&
|
||||
!$valid &&
|
||||
!$edge->isRegion() &&
|
||||
in_array($this->engine->getVariables()[$section], $edge->getValues())
|
||||
) {
|
||||
$valid = true;
|
||||
}
|
||||
|
||||
@ -242,7 +265,6 @@ class Valid
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $valid;
|
||||
@ -250,15 +272,11 @@ class Valid
|
||||
|
||||
private function edgeIsValidWithValue(mixed $value, Edge $edge): bool
|
||||
{
|
||||
if($edge->isRegion() &&
|
||||
$edge->getFrom() <= $value &&
|
||||
$edge->getTo() >= $value) {
|
||||
if ($edge->isRegion() && $edge->getFrom() <= $value && $edge->getTo() >= $value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if($edge->isRegion() &&
|
||||
$edge->getFrom() <= $value &&
|
||||
$edge->getTo() == 0) {
|
||||
if ($edge->isRegion() && $edge->getFrom() <= $value && $edge->getTo() == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -215,6 +215,9 @@ class Select extends Base
|
||||
$this->element->setColorSystem($colorSystem);
|
||||
|
||||
$this->element->addOptions($value);
|
||||
if ($this->element->getDefault() != '') {
|
||||
$this->element->addSelectedOption($this->element->getOptionById($this->element->getDefault()));
|
||||
}
|
||||
}
|
||||
|
||||
private function parseModeColorDbJson(): void
|
||||
@ -256,6 +259,9 @@ class Select extends Base
|
||||
$this->element->setColorSystem($colorSystem);
|
||||
|
||||
$this->element->addOptions($value);
|
||||
if ($this->element->getDefault() != '') {
|
||||
$this->element->addSelectedOption($this->element->getOptionById($this->element->getDefault()));
|
||||
}
|
||||
}
|
||||
|
||||
private function parseModeNormalXML()
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace PSC\Library\Calc\Option\Type;
|
||||
|
||||
use PSC\Library\Calc\Error\Validation\Base as PSCBase;
|
||||
@ -17,11 +18,11 @@ class Base
|
||||
protected $default = null;
|
||||
|
||||
/** @var string $help */
|
||||
protected ?string $help = null;
|
||||
protected null|string $help = null;
|
||||
|
||||
protected ?string $helpLink = null;
|
||||
protected null|string $helpLink = null;
|
||||
|
||||
protected ?string $helpId = null;
|
||||
protected null|string $helpId = null;
|
||||
|
||||
/** @var boolean $require */
|
||||
protected $require = false;
|
||||
@ -160,7 +161,7 @@ class Base
|
||||
$this->default = $default;
|
||||
}
|
||||
|
||||
public function getHelp(): ?string
|
||||
public function getHelp(): null|string
|
||||
{
|
||||
return $this->help;
|
||||
}
|
||||
@ -175,7 +176,7 @@ class Base
|
||||
$this->helpId = $var;
|
||||
}
|
||||
|
||||
public function getHelpId(): ?string
|
||||
public function getHelpId(): null|string
|
||||
{
|
||||
return $this->helpId;
|
||||
}
|
||||
@ -185,7 +186,7 @@ class Base
|
||||
$this->helpLink = $var;
|
||||
}
|
||||
|
||||
public function getHelpLink(): ?string
|
||||
public function getHelpLink(): null|string
|
||||
{
|
||||
return $this->helpLink;
|
||||
}
|
||||
@ -201,7 +202,7 @@ class Base
|
||||
/**
|
||||
* @param string $rawValue
|
||||
*/
|
||||
public function setRawValue($rawValue)
|
||||
public function setRawValue(mixed $rawValue): void
|
||||
{
|
||||
$this->rawValue = $rawValue;
|
||||
}
|
||||
@ -331,12 +332,13 @@ class Base
|
||||
$this->amount = $amount;
|
||||
}
|
||||
|
||||
public function toArray() : array {
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
'name' => $this->getName(),
|
||||
'type' => $this->getType(),
|
||||
'valid' => $this->isValid()
|
||||
'valid' => $this->isValid(),
|
||||
];
|
||||
}
|
||||
|
||||
@ -369,21 +371,21 @@ class Base
|
||||
'_attributes' => [
|
||||
'id' => $this->getId(),
|
||||
'type' => ucfirst($this->getType()),
|
||||
]
|
||||
],
|
||||
];
|
||||
if($this->name != "") {
|
||||
if ($this->name != '') {
|
||||
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||
'name' => $this->name
|
||||
'name' => $this->name,
|
||||
]]);
|
||||
}
|
||||
if ($this->isDisplayOnly()) {
|
||||
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||
'displayOnly' => $this->isDisplayOnly()?'1':'0'
|
||||
'displayOnly' => $this->isDisplayOnly() ? '1' : '0',
|
||||
]]);
|
||||
}
|
||||
if ($this->isAjaxExport()) {
|
||||
$tmp = array_merge_recursive($tmp, ['_attributes' => [
|
||||
'exportAjax' => $this->isAjaxExport()?'1':'0'
|
||||
'exportAjax' => $this->isAjaxExport() ? '1' : '0',
|
||||
]]);
|
||||
}
|
||||
foreach ($this->edgesCollectionContainer as $col) {
|
||||
|
||||
@ -39,6 +39,11 @@ class Select extends Base
|
||||
$this->options->append($option);
|
||||
}
|
||||
|
||||
public function getOptionById(string $id): null|Opt
|
||||
{
|
||||
return array_find((array) $this->options, fn($item) => $item->getId() == $id);
|
||||
}
|
||||
|
||||
public function addOptions(array $options)
|
||||
{
|
||||
$this->options = new \ArrayIterator($options);
|
||||
@ -56,6 +61,14 @@ class Select extends Base
|
||||
}
|
||||
}
|
||||
|
||||
public function setRawValue(mixed $value): void
|
||||
{
|
||||
parent::setRawValue($value);
|
||||
if ($this->getSelectedOption() === null || $this->getSelectedOption()->getId() != $value) {
|
||||
$this->addSelectedOption($this->getOptionById($value));
|
||||
}
|
||||
}
|
||||
|
||||
public function getValue()
|
||||
{
|
||||
$this->processValue();
|
||||
@ -88,14 +101,16 @@ class Select extends Base
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \ArrayIterator
|
||||
*/
|
||||
public function getOptions()
|
||||
public function getOptions(): \ArrayIterator
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
public function clearOptions(): void
|
||||
{
|
||||
$this->options = [];
|
||||
}
|
||||
|
||||
public function clearSelected(): void
|
||||
{
|
||||
$this->selectedOptions = new \ArrayIterator();
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace PSC\Library\Calc\Tests\Calc;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@ -42,4 +43,17 @@ class ColorDBTest extends TestCase
|
||||
$this->assertSame('78', $option->getSelectedOption()->getId());
|
||||
}
|
||||
|
||||
public function testSetVar()
|
||||
{
|
||||
$this->engine->setVariable('colorpantone', '128');
|
||||
$this->engine->calc();
|
||||
|
||||
$this->assertSame(
|
||||
'128',
|
||||
$this->engine
|
||||
->getArticle()
|
||||
->getOptionById('colorpantone')
|
||||
->getRawValue(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace PSC\Library\Calc\Tests\Customer\GG;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@ -10,7 +11,6 @@ use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||
|
||||
class CalcTest extends TestCase
|
||||
{
|
||||
|
||||
/** @var Engine */
|
||||
protected $engine = null;
|
||||
|
||||
@ -29,8 +29,6 @@ class CalcTest extends TestCase
|
||||
$this->engine->setTemplates(file_get_contents(__DIR__ . '/calcTemplates.xml'));
|
||||
|
||||
$this->engine->loadString(file_get_contents(__DIR__ . '/calc.xml'));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function tearDown(): void
|
||||
@ -52,8 +50,19 @@ class CalcTest extends TestCase
|
||||
$this->engine->setVariable('farbe_2_v_wert_pantone', '7555');
|
||||
$this->engine->calc();
|
||||
$this->assertSame(175.75, $this->engine->getPrice());
|
||||
$this->assertSame($this->engine->getArticle()->getOptionById('farbe_1_v_wert_pantone')->getRawValue(), '128');
|
||||
$this->assertSame($this->engine->getArticle()->getOptionById('farbe_2_v_wert_pantone')->getRawValue(), '7555');
|
||||
$this->assertSame(
|
||||
$this->engine
|
||||
->getArticle()
|
||||
->getOptionById('farbe_1_v_wert_pantone')
|
||||
->getRawValue(),
|
||||
'128',
|
||||
);
|
||||
$this->assertSame(
|
||||
$this->engine
|
||||
->getArticle()
|
||||
->getOptionById('farbe_2_v_wert_pantone')
|
||||
->getRawValue(),
|
||||
'7555',
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace PSC\Library\Calc\Tests\Json;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@ -22,7 +23,10 @@ class FromJsonTest extends TestCase
|
||||
self::assertSame(1011.42, $engine1->getPrice());
|
||||
|
||||
self::assertSame($engine1->getPrice(), $engine2->getPrice());
|
||||
|
||||
self::assertEqualsCanonicalizing(
|
||||
$engine1->getArticle()->getOptionById('farbe1')->getSelectedOption(),
|
||||
$engine2->getArticle()->getOptionById('farbe1')->getSelectedOption(),
|
||||
);
|
||||
self::assertEqualsCanonicalizing($engine1->getArticle(), $engine2->getArticle());
|
||||
$tempXML = tempnam(sys_get_temp_dir(), 'calc');
|
||||
$tempJson = tempnam(sys_get_temp_dir(), 'calc');
|
||||
@ -35,7 +39,7 @@ class FromJsonTest extends TestCase
|
||||
self::assertCount(5, $engine1->getArticle()->getOptionById('farbigkeit')->getOptions());
|
||||
self::assertCount(5, $engine2->getArticle()->getOptionById('farbigkeit')->getOptions());
|
||||
|
||||
@unlink($tempXML);
|
||||
@unlink($tempJson);
|
||||
unlink($tempXML);
|
||||
unlink($tempJson);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1 +1,297 @@
|
||||
[{"uuid":"df2df718-b28e-482d-bf0c-67d246f05d32","name":"Test Artikel","options":[{"id":"auflage","name":"Auflage","default":"100","dependencys":[],"placeHolder":"Placeholder","required":false,"type":2},{"id":"seiten_umschlag","name":"Seiten Umschlag","default":"2","dependencys":[],"placeHolder":"Placeholder","required":false,"type":2},{"id":"seiten_anzahl_inhalt","name":"Seiten Anzahl Inhalt","default":"10","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vauflage$V*0.12","price":0,"value":"1-10","dependencys":[{"relation":"seiten_umschlag","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vseiten_umschlag$V*0.24","price":0,"value":"1-2","dependencys":[]},{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vseiten_umschlag$V*0.23","price":0,"value":"3-","dependencys":[]}]}]},{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vauflage$V*0.11","price":0,"value":"11-","dependencys":[{"relation":"seiten_umschlag","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vseiten_umschlag$V*0.21","price":0,"value":"1-2","dependencys":[]},{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vseiten_umschlag$V*0.20","price":0,"value":"3-","dependencys":[]}]}]}]}],"placeHolder":"Placeholder","required":true,"type":2},{"id":"farbigkeit","name":"Farbigkeit","default":"10","dependencys":[],"type":3,"options":[{"id":"10","name":"1\/0 farbig","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"","price":0,"value":"1-101","dependencys":[]}]}]},{"id":"11","name":"1\/1 farbig","dependencys":[]},{"id":"20","name":"2\/0 farbig","dependencys":[]},{"id":"21","name":"2\/1 farbig","dependencys":[]},{"id":"22","name":"2\/2 farbig","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"","price":0,"value":"11-50","dependencys":[]}]}]}],"mode":"normal"},{"id":"calc","name":"calc","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","calcValue1":"","calcValue2":"","calcValue3":"","calcValue4":"","calcValue5":"","calcValue6":"","calcValue7":"","calcValue8":"","calcValue9":"","calcValue10":"","flatRate":"","formula":"$Vauflage$V*$Vseiten_anzahl_inhalt$V","price":0,"value":"1-","dependencys":[]}]}],"type":1}]}]
|
||||
[
|
||||
{
|
||||
"uuid": "df2df718-b28e-482d-bf0c-67d246f05d32",
|
||||
"name": "Test Artikel",
|
||||
"options": [
|
||||
{
|
||||
"id": "auflage",
|
||||
"name": "Auflage",
|
||||
"default": "100",
|
||||
"dependencys": [],
|
||||
"placeHolder": "Placeholder",
|
||||
"required": false,
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"id": "seiten_umschlag",
|
||||
"name": "Seiten Umschlag",
|
||||
"default": "2",
|
||||
"dependencys": [],
|
||||
"placeHolder": "Placeholder",
|
||||
"required": false,
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"id": "farbe1",
|
||||
"name": "Farbe1",
|
||||
"default": "142",
|
||||
"container": "pantone+-solid-uncoated",
|
||||
"mode": "colordb",
|
||||
"dependencys": [],
|
||||
"required": true,
|
||||
"options": [
|
||||
{
|
||||
"dependencys": [],
|
||||
"id": "142",
|
||||
"name": "142"
|
||||
}
|
||||
],
|
||||
"type": 3
|
||||
},
|
||||
{
|
||||
"id": "seiten_anzahl_inhalt",
|
||||
"name": "Seiten Anzahl Inhalt",
|
||||
"default": "10",
|
||||
"dependencys": [
|
||||
{
|
||||
"relation": "auflage",
|
||||
"formula": "",
|
||||
"borders": [
|
||||
{
|
||||
"calcValue": "",
|
||||
"calcValue1": "",
|
||||
"calcValue2": "",
|
||||
"calcValue3": "",
|
||||
"calcValue4": "",
|
||||
"calcValue5": "",
|
||||
"calcValue6": "",
|
||||
"calcValue7": "",
|
||||
"calcValue8": "",
|
||||
"calcValue9": "",
|
||||
"calcValue10": "",
|
||||
"flatRate": "",
|
||||
"formula": "$Vauflage$V*0.12",
|
||||
"price": 0,
|
||||
"value": "1-10",
|
||||
"dependencys": [
|
||||
{
|
||||
"relation": "seiten_umschlag",
|
||||
"formula": "",
|
||||
"borders": [
|
||||
{
|
||||
"calcValue": "",
|
||||
"calcValue1": "",
|
||||
"calcValue2": "",
|
||||
"calcValue3": "",
|
||||
"calcValue4": "",
|
||||
"calcValue5": "",
|
||||
"calcValue6": "",
|
||||
"calcValue7": "",
|
||||
"calcValue8": "",
|
||||
"calcValue9": "",
|
||||
"calcValue10": "",
|
||||
"flatRate": "",
|
||||
"formula": "$Vseiten_umschlag$V*0.24",
|
||||
"price": 0,
|
||||
"value": "1-2",
|
||||
"dependencys": []
|
||||
},
|
||||
{
|
||||
"calcValue": "",
|
||||
"calcValue1": "",
|
||||
"calcValue2": "",
|
||||
"calcValue3": "",
|
||||
"calcValue4": "",
|
||||
"calcValue5": "",
|
||||
"calcValue6": "",
|
||||
"calcValue7": "",
|
||||
"calcValue8": "",
|
||||
"calcValue9": "",
|
||||
"calcValue10": "",
|
||||
"flatRate": "",
|
||||
"formula": "$Vseiten_umschlag$V*0.23",
|
||||
"price": 0,
|
||||
"value": "3-",
|
||||
"dependencys": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"calcValue": "",
|
||||
"calcValue1": "",
|
||||
"calcValue2": "",
|
||||
"calcValue3": "",
|
||||
"calcValue4": "",
|
||||
"calcValue5": "",
|
||||
"calcValue6": "",
|
||||
"calcValue7": "",
|
||||
"calcValue8": "",
|
||||
"calcValue9": "",
|
||||
"calcValue10": "",
|
||||
"flatRate": "",
|
||||
"formula": "$Vauflage$V*0.11",
|
||||
"price": 0,
|
||||
"value": "11-",
|
||||
"dependencys": [
|
||||
{
|
||||
"relation": "seiten_umschlag",
|
||||
"formula": "",
|
||||
"borders": [
|
||||
{
|
||||
"calcValue": "",
|
||||
"calcValue1": "",
|
||||
"calcValue2": "",
|
||||
"calcValue3": "",
|
||||
"calcValue4": "",
|
||||
"calcValue5": "",
|
||||
"calcValue6": "",
|
||||
"calcValue7": "",
|
||||
"calcValue8": "",
|
||||
"calcValue9": "",
|
||||
"calcValue10": "",
|
||||
"flatRate": "",
|
||||
"formula": "$Vseiten_umschlag$V*0.21",
|
||||
"price": 0,
|
||||
"value": "1-2",
|
||||
"dependencys": []
|
||||
},
|
||||
{
|
||||
"calcValue": "",
|
||||
"calcValue1": "",
|
||||
"calcValue2": "",
|
||||
"calcValue3": "",
|
||||
"calcValue4": "",
|
||||
"calcValue5": "",
|
||||
"calcValue6": "",
|
||||
"calcValue7": "",
|
||||
"calcValue8": "",
|
||||
"calcValue9": "",
|
||||
"calcValue10": "",
|
||||
"flatRate": "",
|
||||
"formula": "$Vseiten_umschlag$V*0.20",
|
||||
"price": 0,
|
||||
"value": "3-",
|
||||
"dependencys": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"placeHolder": "Placeholder",
|
||||
"required": true,
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"id": "farbigkeit",
|
||||
"name": "Farbigkeit",
|
||||
"default": "10",
|
||||
"dependencys": [],
|
||||
"type": 3,
|
||||
"options": [
|
||||
{
|
||||
"id": "10",
|
||||
"name": "1\/0 farbig",
|
||||
"dependencys": [
|
||||
{
|
||||
"relation": "auflage",
|
||||
"formula": "",
|
||||
"borders": [
|
||||
{
|
||||
"calcValue": "",
|
||||
"calcValue1": "",
|
||||
"calcValue2": "",
|
||||
"calcValue3": "",
|
||||
"calcValue4": "",
|
||||
"calcValue5": "",
|
||||
"calcValue6": "",
|
||||
"calcValue7": "",
|
||||
"calcValue8": "",
|
||||
"calcValue9": "",
|
||||
"calcValue10": "",
|
||||
"flatRate": "",
|
||||
"formula": "",
|
||||
"price": 0,
|
||||
"value": "1-101",
|
||||
"dependencys": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "11",
|
||||
"name": "1\/1 farbig",
|
||||
"dependencys": []
|
||||
},
|
||||
{
|
||||
"id": "20",
|
||||
"name": "2\/0 farbig",
|
||||
"dependencys": []
|
||||
},
|
||||
{
|
||||
"id": "21",
|
||||
"name": "2\/1 farbig",
|
||||
"dependencys": []
|
||||
},
|
||||
{
|
||||
"id": "22",
|
||||
"name": "2\/2 farbig",
|
||||
"dependencys": [
|
||||
{
|
||||
"relation": "auflage",
|
||||
"formula": "",
|
||||
"borders": [
|
||||
{
|
||||
"calcValue": "",
|
||||
"calcValue1": "",
|
||||
"calcValue2": "",
|
||||
"calcValue3": "",
|
||||
"calcValue4": "",
|
||||
"calcValue5": "",
|
||||
"calcValue6": "",
|
||||
"calcValue7": "",
|
||||
"calcValue8": "",
|
||||
"calcValue9": "",
|
||||
"calcValue10": "",
|
||||
"flatRate": "",
|
||||
"formula": "",
|
||||
"price": 0,
|
||||
"value": "11-50",
|
||||
"dependencys": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"mode": "normal"
|
||||
},
|
||||
{
|
||||
"id": "calc",
|
||||
"name": "calc",
|
||||
"dependencys": [
|
||||
{
|
||||
"relation": "auflage",
|
||||
"formula": "",
|
||||
"borders": [
|
||||
{
|
||||
"calcValue": "",
|
||||
"calcValue1": "",
|
||||
"calcValue2": "",
|
||||
"calcValue3": "",
|
||||
"calcValue4": "",
|
||||
"calcValue5": "",
|
||||
"calcValue6": "",
|
||||
"calcValue7": "",
|
||||
"calcValue8": "",
|
||||
"calcValue9": "",
|
||||
"calcValue10": "",
|
||||
"flatRate": "",
|
||||
"formula": "$Vauflage$V*$Vseiten_anzahl_inhalt$V",
|
||||
"price": 0,
|
||||
"value": "1-",
|
||||
"dependencys": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@ -7,10 +7,14 @@
|
||||
|
||||
<option id="auflage" name="Auflage" type="Input" placeholder="Placeholder" default="100"></option>
|
||||
|
||||
<option id="seiten_umschlag" name="Seiten Umschlag" type="Input" default="2" placeholder="Placeholder"></option>
|
||||
<option id="seiten_umschlag" name="Seiten Umschlag" type="Input" default="2"
|
||||
placeholder="Placeholder"></option>
|
||||
|
||||
<option id="farbe1" name="Farbe1" type="Select"
|
||||
mode="colordb" container="pantone+-solid-uncoated" default="142" require="true" />
|
||||
|
||||
<option id="seiten_anzahl_inhalt" name="Seiten Anzahl Inhalt" type="Input" default="10" require="true" placeholder="Placeholder">
|
||||
<option id="seiten_anzahl_inhalt" name="Seiten Anzahl Inhalt" type="Input" default="10"
|
||||
require="true" placeholder="Placeholder">
|
||||
<auflage>
|
||||
<grenze formel="$Vauflage$V*0.12" value="1-10">
|
||||
<seiten_umschlag>
|
||||
|
||||
@ -7,6 +7,9 @@
|
||||
|
||||
<option id="auflage" name="Auflage" type="Input" placeholder="Placeholder" default="100"></option>
|
||||
|
||||
<option id="farbe1" name="Farbe1" type="Select"
|
||||
mode="colordb" container="pantone+-solid-uncoated" default="142" require="true" />
|
||||
|
||||
<option id="startkosten_1c" name="Startkosten 1C" type="Hidden" default="1">
|
||||
<farbigkeit_inhalt>
|
||||
<!-- einfarbiger Inhalt -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user