Fixes
This commit is contained in:
parent
24fe351d64
commit
63234048b4
File diff suppressed because one or more lines are too long
@ -28,15 +28,15 @@ class Formel
|
|||||||
$this->article = $article;
|
$this->article = $article;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parse($formel) {
|
public function parse($formel, $breakValid = false) {
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
while((strpos($formel,'$F') !== false || strpos($formel,'$P') !== false || strpos($formel,'$V') !== false || strpos($formel,'$CV') !== false) && $i < 6) {
|
while((strpos($formel,'$F') !== false || strpos($formel,'$P') !== false || strpos($formel,'$V') !== false || strpos($formel,'$CV') !== false) && $i < 12) {
|
||||||
$formel = $this->parseCalcVariables($formel);
|
$formel = $this->parseCalcVariables($formel, $breakValid);
|
||||||
$formel = $this->parseFormulas($formel);
|
$formel = $this->parseFormulas($formel, $breakValid);
|
||||||
$formel = $this->parseParameters($formel);
|
$formel = $this->parseParameters($formel, $breakValid);
|
||||||
$formel = $this->parseVariables($formel);
|
$formel = $this->parseVariables($formel, $breakValid);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ class Formel
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function parseVariables($formel)
|
private function parseVariables($formel, $breakValid = false)
|
||||||
{
|
{
|
||||||
preg_match_all('/\$V\w*\$V/', $formel, $founds);
|
preg_match_all('/\$V\w*\$V/', $formel, $founds);
|
||||||
|
|
||||||
@ -69,6 +69,9 @@ class Formel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if($breakValid) {
|
||||||
|
$this->engine->validDirty = true;
|
||||||
|
}
|
||||||
$formel = str_replace($found, 0, $formel);
|
$formel = str_replace($found, 0, $formel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -77,7 +80,7 @@ class Formel
|
|||||||
return $formel;
|
return $formel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function parseParameters($formel)
|
private function parseParameters($formel, $breakValid = false)
|
||||||
{
|
{
|
||||||
preg_match_all('/\$P\w*\$P/', $formel, $founds);
|
preg_match_all('/\$P\w*\$P/', $formel, $founds);
|
||||||
|
|
||||||
@ -93,6 +96,9 @@ class Formel
|
|||||||
if (isset($$foundvalue)) {
|
if (isset($$foundvalue)) {
|
||||||
$formel = str_replace($found, $$foundvalue, $formel);
|
$formel = str_replace($found, $$foundvalue, $formel);
|
||||||
} else {
|
} else {
|
||||||
|
if($breakValid) {
|
||||||
|
$this->engine->validDirty = true;
|
||||||
|
}
|
||||||
$formel = str_replace($found, 0, $formel);
|
$formel = str_replace($found, 0, $formel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,7 +107,7 @@ class Formel
|
|||||||
return $formel;
|
return $formel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function parseFormulas($formel)
|
private function parseFormulas($formel, $breakValid = false)
|
||||||
{
|
{
|
||||||
preg_match_all('/\$F\w*\$F/', $formel, $founds);
|
preg_match_all('/\$F\w*\$F/', $formel, $founds);
|
||||||
|
|
||||||
@ -118,6 +124,9 @@ class Formel
|
|||||||
if(isset($$foundvalue)) {
|
if(isset($$foundvalue)) {
|
||||||
$formel = str_replace($found, $$foundvalue, $formel);
|
$formel = str_replace($found, $$foundvalue, $formel);
|
||||||
}else{
|
}else{
|
||||||
|
if($breakValid) {
|
||||||
|
$this->engine->validDirty = true;
|
||||||
|
}
|
||||||
$formel = str_replace($found, 0, $formel);
|
$formel = str_replace($found, 0, $formel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -126,7 +135,7 @@ class Formel
|
|||||||
return $formel;
|
return $formel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function parseCalcVariables($formel)
|
private function parseCalcVariables($formel, $breakValid = false)
|
||||||
{
|
{
|
||||||
preg_match_all('/\$CV[\w\.]*\$CV/', $formel, $founds);
|
preg_match_all('/\$CV[\w\.]*\$CV/', $formel, $founds);
|
||||||
$variables = $this->engine->getCalcVariables();
|
$variables = $this->engine->getCalcVariables();
|
||||||
@ -153,6 +162,9 @@ class Formel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if($breakValid) {
|
||||||
|
$this->engine->validDirty = true;
|
||||||
|
}
|
||||||
$formel = str_replace($found, 0, $formel);
|
$formel = str_replace($found, 0, $formel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class Valid
|
|||||||
$groupsValid[$collection->getName()] = false;
|
$groupsValid[$collection->getName()] = false;
|
||||||
|
|
||||||
if(trim($collection->getFormel()) != "") {
|
if(trim($collection->getFormel()) != "") {
|
||||||
$value = $this->formelCalc->parse($collection->getFormel());
|
$value = $this->formelCalc->parse($collection->getFormel(), true);
|
||||||
eval('$value = ' . $value . ';');
|
eval('$value = ' . $value . ';');
|
||||||
/** @var Edge $edge */
|
/** @var Edge $edge */
|
||||||
foreach ($collection as $edge) {
|
foreach ($collection as $edge) {
|
||||||
@ -107,6 +107,9 @@ class Valid
|
|||||||
if($option->getDefault() !== null && $opt->isValid() && !$isDefaultValid) {
|
if($option->getDefault() !== null && $opt->isValid() && !$isDefaultValid) {
|
||||||
$option->setDefault($opt->getId());
|
$option->setDefault($opt->getId());
|
||||||
$this->engine->setVariable($option->getId(), $opt->getId());
|
$this->engine->setVariable($option->getId(), $opt->getId());
|
||||||
|
if(isset($this->engine->validVars[$option->getId()]) && $opt->getId() != $this->engine->validVars[$option->getId()]) {
|
||||||
|
$this->engine->validDirty = true;
|
||||||
|
}
|
||||||
$isDefaultValid = true;
|
$isDefaultValid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +173,7 @@ class Valid
|
|||||||
if(!$collValid) {
|
if(!$collValid) {
|
||||||
$mainEdges = false;
|
$mainEdges = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$mainEdges && $option->isValid()) {
|
if(!$mainEdges && $option->isValid()) {
|
||||||
@ -197,7 +200,6 @@ class Valid
|
|||||||
$skipTests = true;
|
$skipTests = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!$skipTests && !$valid && $edge->isRegion() &&
|
if(!$skipTests && !$valid && $edge->isRegion() &&
|
||||||
$edge->getFrom() <= $this->engine->getVariables()[$section] &&
|
$edge->getFrom() <= $this->engine->getVariables()[$section] &&
|
||||||
$edge->getTo() >= $this->engine->getVariables()[$section]) {
|
$edge->getTo() >= $this->engine->getVariables()[$section]) {
|
||||||
|
|||||||
@ -67,6 +67,10 @@ class Engine
|
|||||||
/** @var bool */
|
/** @var bool */
|
||||||
protected $dirty = true;
|
protected $dirty = true;
|
||||||
|
|
||||||
|
public $validDirty = true;
|
||||||
|
|
||||||
|
public $validVars = [];
|
||||||
|
|
||||||
/** @var Article */
|
/** @var Article */
|
||||||
protected $article = null;
|
protected $article = null;
|
||||||
|
|
||||||
@ -612,7 +616,23 @@ class Engine
|
|||||||
|
|
||||||
private function processCalc(): void
|
private function processCalc(): void
|
||||||
{
|
{
|
||||||
|
$this->validDirty = true;
|
||||||
|
$count = 1;
|
||||||
// Check if Option is valid
|
// Check if Option is valid
|
||||||
|
while($this->validDirty && $count < 4) {
|
||||||
|
$this->validDirty = false;
|
||||||
|
$this->validVars = $this->variables;
|
||||||
|
|
||||||
|
$calcValid = new Valid($this, $this->article);
|
||||||
|
$calcValid->perform();
|
||||||
|
|
||||||
|
// CALC Values
|
||||||
|
$calcValues = new CalcValues($this, $this->article);
|
||||||
|
$calcValues->calc();
|
||||||
|
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
|
||||||
$calcValid = new Valid($this, $this->article);
|
$calcValid = new Valid($this, $this->article);
|
||||||
$calcValid->perform();
|
$calcValid->perform();
|
||||||
|
|
||||||
@ -621,21 +641,6 @@ class Engine
|
|||||||
$calcValues->calc();
|
$calcValues->calc();
|
||||||
|
|
||||||
// Check if Option is valid
|
// Check if Option is valid
|
||||||
$calcValid = new Valid($this, $this->article);
|
|
||||||
$calcValid->perform();
|
|
||||||
|
|
||||||
// CALC Values
|
|
||||||
$calcValues = new CalcValues($this, $this->article);
|
|
||||||
$calcValues->calc();
|
|
||||||
|
|
||||||
// Check if Option is valid
|
|
||||||
$calcValid = new Valid($this, $this->article);
|
|
||||||
$calcValid->perform(true);
|
|
||||||
|
|
||||||
// CALC Values
|
|
||||||
$calcValues = new CalcValues($this, $this->article);
|
|
||||||
$calcValues->calc();
|
|
||||||
|
|
||||||
// CALC Formel
|
// CALC Formel
|
||||||
$calcFormel = new Calc($this, $this->article);
|
$calcFormel = new Calc($this, $this->article);
|
||||||
$this->price = $calcFormel->calc();
|
$this->price = $calcFormel->calc();
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class FirstTest extends TestCase
|
|||||||
|
|
||||||
public function testIfArticleCountIsCorrect(): void
|
public function testIfArticleCountIsCorrect(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals(1, $this->engine->getArticles()->Count());
|
$this->assertEquals(1, $this->engine->getArticles()->count());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIfDefaultPriceIsOk(): void
|
public function testIfDefaultPriceIsOk(): void
|
||||||
|
|||||||
48
tests/Customer/JJ/CalcFasterTest.php
Normal file
48
tests/Customer/JJ/CalcFasterTest.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
namespace PSC\Library\Calc\Tests\Customer\JJ;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use PSC\Library\Calc\Article;
|
||||||
|
use PSC\Library\Calc\Engine;
|
||||||
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
|
use PSC\Library\Calc\PaperContainer;
|
||||||
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
|
class CalcFasterTest extends TestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var Engine */
|
||||||
|
protected $engine = null;
|
||||||
|
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
|
$paperContainer = new PaperContainer();
|
||||||
|
$paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . '/papierContainer.xml')));
|
||||||
|
|
||||||
|
$this->engine = new Engine();
|
||||||
|
$this->engine->setPaperContainer($paperContainer);
|
||||||
|
$this->engine->setPaperRepository($repository);
|
||||||
|
$this->engine->setFormulas(file_get_contents(__DIR__ . '/formels.txt'));
|
||||||
|
$this->engine->setParameters(file_get_contents(__DIR__ . '/parameters.txt'));
|
||||||
|
$this->engine->setTemplates(file_get_contents(__DIR__ . '/calcTemplates.xml'));
|
||||||
|
|
||||||
|
$this->engine->loadString(file_get_contents(__DIR__ . '/calc_better.xml'));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown(): void
|
||||||
|
{
|
||||||
|
$this->engine = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testPrice(): void
|
||||||
|
{
|
||||||
|
$this->engine->calc();
|
||||||
|
|
||||||
|
$this->assertSame(44.07, $this->engine->getPrice());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
47
tests/Customer/JJ/CalcTest.php
Normal file
47
tests/Customer/JJ/CalcTest.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
namespace PSC\Library\Calc\Tests\Customer\JJ;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use PSC\Library\Calc\Article;
|
||||||
|
use PSC\Library\Calc\Engine;
|
||||||
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
|
use PSC\Library\Calc\PaperContainer;
|
||||||
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
|
class CalcTest extends TestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var Engine */
|
||||||
|
protected $engine = null;
|
||||||
|
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
|
$paperContainer = new PaperContainer();
|
||||||
|
$paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . '/papierContainer.xml')));
|
||||||
|
|
||||||
|
$this->engine = new Engine();
|
||||||
|
$this->engine->setPaperContainer($paperContainer);
|
||||||
|
$this->engine->setPaperRepository($repository);
|
||||||
|
$this->engine->setFormulas(file_get_contents(__DIR__ . '/formels.txt'));
|
||||||
|
$this->engine->setParameters(file_get_contents(__DIR__ . '/parameters.txt'));
|
||||||
|
$this->engine->setTemplates(file_get_contents(__DIR__ . '/calcTemplates.xml'));
|
||||||
|
|
||||||
|
$this->engine->loadString(file_get_contents(__DIR__ . '/calc.xml'));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown(): void
|
||||||
|
{
|
||||||
|
$this->engine = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testPrice(): void
|
||||||
|
{
|
||||||
|
$this->engine->calc();
|
||||||
|
$this->assertSame(44.07, $this->engine->getPrice());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
1240
tests/Customer/JJ/calc.xml
Normal file
1240
tests/Customer/JJ/calc.xml
Normal file
File diff suppressed because it is too large
Load Diff
20
tests/Customer/JJ/calcTemplates.xml
Normal file
20
tests/Customer/JJ/calcTemplates.xml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<root>
|
||||||
|
<option id="auflage" name="Auflage" type="Select" default="5000">
|
||||||
|
<opt id ="5000" name="5000">
|
||||||
|
<auflage>
|
||||||
|
<grenze formel="228">1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</opt>
|
||||||
|
<opt id ="10000" name="10000">
|
||||||
|
<auflage>
|
||||||
|
<grenze formel="309.10">1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</opt>
|
||||||
|
<opt id ="20000" name="20000">
|
||||||
|
<auflage>
|
||||||
|
<grenze formel="439.20">1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</opt>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
</root>
|
||||||
1230
tests/Customer/JJ/calc_better.xml
Normal file
1230
tests/Customer/JJ/calc_better.xml
Normal file
File diff suppressed because it is too large
Load Diff
871
tests/Customer/JJ/formels.txt
Normal file
871
tests/Customer/JJ/formels.txt
Normal file
@ -0,0 +1,871 @@
|
|||||||
|
// --------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Offsetdruck wie Keyline
|
||||||
|
//
|
||||||
|
// --------------------------------------------------------
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// Allgemeine Hilffunktionen
|
||||||
|
if(!function_exists('rangeSwitch')) {
|
||||||
|
function rangeSwitch($value, ...$args) {
|
||||||
|
$count = count($args);
|
||||||
|
for ($i = 0; $i < $count - 2; $i += 3) {
|
||||||
|
$start = $args[$i];
|
||||||
|
$end = $args[$i + 1];
|
||||||
|
$result = $args[$i + 2];
|
||||||
|
if ($value >= $start && $value <= $end) {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Optionaler Standardwert, falls überzähliges Argument vorhanden
|
||||||
|
if ($count % 3 === 1) {
|
||||||
|
return $args[$count - 1];
|
||||||
|
}
|
||||||
|
return null; // oder throw Exception, je nachdem
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Allgemeine Hilfsformeln
|
||||||
|
|
||||||
|
//Gesamtanzahl der Sonderfarben
|
||||||
|
$helper_sonderfarben_count =
|
||||||
|
'(
|
||||||
|
(($CVfarbe_1_v_valid$CV && ($Vfarbe_1_v$V == 2 || $Vfarbe_1_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_2_v_valid$CV && ($Vfarbe_2_v$V == 2 || $Vfarbe_2_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_3_v_valid$CV && ($Vfarbe_3_v$V == 2 || $Vfarbe_3_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_4_v_valid$CV && ($Vfarbe_4_v$V == 2 || $Vfarbe_4_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_1_r_valid$CV && ($Vfarbe_1_r$V == 2 || $Vfarbe_1_r$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_2_r_valid$CV && ($Vfarbe_2_r$V == 2 || $Vfarbe_2_r$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_3_r_valid$CV && ($Vfarbe_3_r$V == 2 || $Vfarbe_3_r$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_4_r_valid$CV && ($Vfarbe_4_r$V == 2 || $Vfarbe_4_r$V == 3))? 1 : 0 )
|
||||||
|
)';
|
||||||
|
|
||||||
|
//Gesamtanzahl der Farben
|
||||||
|
$helper_farben_count =
|
||||||
|
'(
|
||||||
|
(($CVfarbe_1_v_valid$CV)? 1 : 0 ) +
|
||||||
|
(($CVfarbe_2_v_valid$CV)? 1 : 0 ) +
|
||||||
|
(($CVfarbe_3_v_valid$CV)? 1 : 0 ) +
|
||||||
|
(($CVfarbe_4_v_valid$CV)? 1 : 0 ) +
|
||||||
|
(($CVfarbe_1_r_valid$CV)? 1 : 0 ) +
|
||||||
|
(($CVfarbe_2_r_valid$CV)? 1 : 0 ) +
|
||||||
|
(($CVfarbe_3_r_valid$CV)? 1 : 0 ) +
|
||||||
|
(($CVfarbe_4_r_valid$CV)? 1 : 0 )
|
||||||
|
)';
|
||||||
|
|
||||||
|
// Hilfsformel zu verarbeitende Güter
|
||||||
|
$helper_zu_verarbeitende_gueter =
|
||||||
|
'(ceil(
|
||||||
|
$Fhelper_anzahl_druckboegen$F
|
||||||
|
+ (($Vdruckverfahren$V == 2)? $Fhelper_ausschuss_offset$F : 0)
|
||||||
|
+ (($Vdruckverfahren$V == 1)? $Fhelper_ausschuss_digital$F : 0)
|
||||||
|
+ (($Vvorschneiden$V == 1)? ($Pvorschneiden_fixer_ausschuss$P / $CVformat_1$CV): 0)
|
||||||
|
+ (($Vschneiden$V == 1)? ($Pschneiden_fixer_ausschuss$P / $CVformat_1$CV) : 0)
|
||||||
|
+ (($Vrillen$V == 1)? ($Prillen_und_falzen_fixer_ausschuss$P / $CVformat_1$CV) : 0)
|
||||||
|
))';
|
||||||
|
|
||||||
|
// Hilfsformel Druckgänge
|
||||||
|
$helper_anzahl_druckgaenge =
|
||||||
|
'(
|
||||||
|
($CVdruckfarben_2$CV > 0)? 2 : 1
|
||||||
|
)';
|
||||||
|
|
||||||
|
// Hilfsformel Druckbogen (Anzahl der Plattenwechsel die notwendig sind, nicht zu verwechseln mit helper_anzahl_druckboegen)
|
||||||
|
// Formel funkioniert derzeit nur für einfache Briefbögen, für komplexere Produkte müsste man herausfinden wie die Druckbogen richtig berechnet werden können.
|
||||||
|
// Faustregel für alles was keine Broschüre ist = 1
|
||||||
|
// Faustregel für Broschüre ceil( Seitenzahl / (Nutzen * 2))
|
||||||
|
// Erklärung hierzu: Bei A4 z.B. 2 Nutzen pro Druckbogen, die *2 sind für die Beidseitigkeit. Seitenzahl der Broschüre, durch den beidseitigen Nutzen aufgerundet sollte für Broschüren hier den richtigen wert geben. Für den offset-bbg wird derzeit einfach der Wert 1 für die Berechnung übergeben
|
||||||
|
|
||||||
|
$helper_anzahl_druckbogen =
|
||||||
|
'(
|
||||||
|
ceil($Vseitenanzahl$V / ($CVformat_1$CV * 2))
|
||||||
|
)';
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// MEDIENGESTALTER Druckdatenvorbereitung und Prüfung
|
||||||
|
|
||||||
|
$mediengestalter =
|
||||||
|
'((
|
||||||
|
(180 / 60)
|
||||||
|
+ ((3600 / $Pmediengestalter_komponenten_pro_stunde$P) / 60)
|
||||||
|
+ (60 / 60)
|
||||||
|
) * ($Pmediengestalter_stundenpreis$P / 60))';
|
||||||
|
|
||||||
|
$mediengestalter_reduziert =
|
||||||
|
'((
|
||||||
|
(60 / 60)
|
||||||
|
+ ((3600 / $Pmediengestalter_reduziert_komponenten_pro_stunde$P) / 60)
|
||||||
|
+ (60 / 60)
|
||||||
|
) * ($Pmediengestalter_stundenpreis$P / 60))';
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// DRUCKPLATTENBELICHTUNG
|
||||||
|
|
||||||
|
// Hilfsformel Druckplatten-Anzahl
|
||||||
|
$helper_anzahl_druckplatten =
|
||||||
|
'(
|
||||||
|
($CVdruckfarben_1$CV + $CVdruckfarben_2$CV)
|
||||||
|
* ((($Vfarberueck_valid$V? $Vfarberueck$V : 2) == 1)? 1 : 0.5)
|
||||||
|
)';
|
||||||
|
|
||||||
|
// Druckplatten belichten
|
||||||
|
$offset_druckplatten_belichten =
|
||||||
|
'(
|
||||||
|
(($Fhelper_anzahl_druckplatten$F * $Pdruckplattenkosten$P) / 100)
|
||||||
|
+ ((($Fhelper_anzahl_druckplatten$F * (3600 / $Pdruckplattenbelichtung_pro_stunde$P)) / 60 ) * ($Psuprasetter_stundenpreis$P / 60))
|
||||||
|
+ (($Fhelper_anzahl_druckplatten$F * $Pdruckplattenkosten_extern$P) / 100)
|
||||||
|
)';
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// PAPIERBEDARF
|
||||||
|
|
||||||
|
// Hilfsformel Druckbögen
|
||||||
|
$helper_anzahl_druckboegen =
|
||||||
|
'(
|
||||||
|
$Vauflage$V / $CVformat_1$CV
|
||||||
|
)';
|
||||||
|
|
||||||
|
// Hiflsformel Ausschuss
|
||||||
|
|
||||||
|
$helper_ausschuss_offset =
|
||||||
|
'(
|
||||||
|
($Fhelper_anzahl_druckboegen$F * ($Pspeedmaster_ausschussrate$P / 100)) + $Fhelper_anzahl_druckbogen$F * $Pspeedmaster_fixer_ausschuss$P
|
||||||
|
+ (($Fhelper_sonderfarben_count$F > 0)? $Pspeedmaster_fixer_ausschuss$P : 0 )
|
||||||
|
)';
|
||||||
|
|
||||||
|
$helper_ausschuss_digital =
|
||||||
|
'(
|
||||||
|
($Fhelper_anzahl_druckboegen$F * ($Pversafire_ausschussrate$P / 100)) + ($Pversafire_fixer_ausschuss$P / $CVformat_1$CV)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$helper_ausschuss_horizon =
|
||||||
|
'(
|
||||||
|
($Fhelper_anzahl_druckboegen$F * ($Prillen_und_falzen_ausschussrate$P / 100)) + ($Prillen_und_falzen_fixer_ausschuss$P / $CVformat_1$CV)
|
||||||
|
)';
|
||||||
|
|
||||||
|
// Druckbogen-Kosten
|
||||||
|
$offset_druckbogen_preis =
|
||||||
|
'(
|
||||||
|
$Fhelper_zu_verarbeitende_gueter$F * ($Vpapier_value$V / 1000)
|
||||||
|
)';
|
||||||
|
|
||||||
|
// Druckbogen-Kosten (digital)
|
||||||
|
$digital_druckbogen_preis =
|
||||||
|
'(
|
||||||
|
$Fhelper_zu_verarbeitende_gueter$F * ($Vpapier_value$V / 1000)
|
||||||
|
)';
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// OFFSETDRUCK
|
||||||
|
|
||||||
|
$offset_ruest =
|
||||||
|
'((
|
||||||
|
(($Vdruckfarben$V > 10 || $Vdruckfarben$V == 1 || $Vdruckfarben$V == 0)? 1 : 0.75)
|
||||||
|
* $Peinrichten_farbe_und_passer$P
|
||||||
|
* $Fhelper_anzahl_druckgaenge$F
|
||||||
|
+ ($Pruestzeit_pro_platte$P * $Fhelper_anzahl_druckplatten$F)
|
||||||
|
+ ($Pruestzeit_pro_sonderfarbe$P * $Fhelper_sonderfarben_count$F)
|
||||||
|
)
|
||||||
|
* ($Pspeedmaster_stundenpreis$P / 60))';
|
||||||
|
|
||||||
|
$offset =
|
||||||
|
'(((
|
||||||
|
(3600 / $Pspeedmaster_bogen_pro_stunde$P)
|
||||||
|
* ($Fhelper_zu_verarbeitende_gueter$F * $Fhelper_anzahl_druckgaenge$F)
|
||||||
|
* ( (($Fhelper_zu_verarbeitende_gueter$F > 1 && $Fhelper_zu_verarbeitende_gueter$F < 501)? 1.7 : 0 )
|
||||||
|
+ (($Fhelper_zu_verarbeitende_gueter$F > 500 && $Fhelper_zu_verarbeitende_gueter$F < 1001)? 1.4 : 0 )
|
||||||
|
+ (($Fhelper_zu_verarbeitende_gueter$F > 1000 && $Fhelper_zu_verarbeitende_gueter$F < 1501)? 1.1 : 0 )
|
||||||
|
+ (($Fhelper_zu_verarbeitende_gueter$F > 1500 && $Fhelper_zu_verarbeitende_gueter$F < 2000001)? 1 : 0 ) )
|
||||||
|
* (
|
||||||
|
($Vpapier_eigenschaften$V == "coated")?
|
||||||
|
( (($Vpapier_grammatur$V > 49 && $Vpapier_grammatur$V < 61)? 2.9 : 0 )
|
||||||
|
+ (($Vpapier_grammatur$V > 60 && $Vpapier_grammatur$V < 71)? 2.3 : 0 )
|
||||||
|
+ (($Vpapier_grammatur$V > 70 && $Vpapier_grammatur$V < 81)? 2 : 0 )
|
||||||
|
+ (($Vpapier_grammatur$V > 80 && $Vpapier_grammatur$V < 101)? 1.7 : 0 )
|
||||||
|
+ (($Vpapier_grammatur$V > 100 && $Vpapier_grammatur$V < 161)? 1 : 0 )
|
||||||
|
+ (($Vpapier_grammatur$V > 160 && $Vpapier_grammatur$V < 241)? 1.1 : 0 )
|
||||||
|
+ (($Vpapier_grammatur$V > 240 && $Vpapier_grammatur$V < 251)? 1.6 : 0 )
|
||||||
|
+ (($Vpapier_grammatur$V > 250 && $Vpapier_grammatur$V < 451)? 2 : 0 )
|
||||||
|
)
|
||||||
|
: ( (($Vpapier_grammatur$V > 49 && $Vpapier_grammatur$V < 161)? 1 : 0 )
|
||||||
|
+ (($Vpapier_grammatur$V > 160 && $Vpapier_grammatur$V < 251)? 1.1 : 0 )
|
||||||
|
+ (($Vpapier_grammatur$V > 250 && $Vpapier_grammatur$V < 301)? 1.4 : 0 )
|
||||||
|
+ (($Vpapier_grammatur$V > 300 && $Vpapier_grammatur$V < 451)? 1.5 : 0 )
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) + (
|
||||||
|
($Fhelper_zu_verarbeitende_gueter$F < 5000)?
|
||||||
|
(
|
||||||
|
((($Vfarberueck_valid$V? $Vfarberueck$V : 2) == 1)? 0 : 300) + (($Fhelper_anzahl_druckgaenge$F < 2)? 0 : 300)
|
||||||
|
) : 0
|
||||||
|
) + ( (($Fhelper_zu_verarbeitende_gueter$F > 0 && $Fhelper_zu_verarbeitende_gueter$F < 5001)? (1 * $Poffset_gummituch_waschen$P) : 0 )
|
||||||
|
+ (($Fhelper_zu_verarbeitende_gueter$F > 5000 && $Fhelper_zu_verarbeitende_gueter$F < 20001)? (2 * $Poffset_gummituch_waschen$P) : 0 )
|
||||||
|
+ (($Fhelper_zu_verarbeitende_gueter$F > 20000 && $Fhelper_zu_verarbeitende_gueter$F < 40001)? (3 * $Poffset_gummituch_waschen$P) : 0 )
|
||||||
|
+ (($Fhelper_zu_verarbeitende_gueter$F > 40000 && $Fhelper_zu_verarbeitende_gueter$F < 100001)? (4 * $Poffset_gummituch_waschen$P) : 0 )
|
||||||
|
+ ($Fhelper_anzahl_druckbogen$F * $Fhelper_anzahl_druckgaenge$F * $Poffset_gummituch_waschen$P)
|
||||||
|
)) / 60
|
||||||
|
) * ($Pspeedmaster_stundenpreis$P / 60)';
|
||||||
|
|
||||||
|
$zwischensumme = '$Vpapier_grammatur$V';
|
||||||
|
|
||||||
|
$offset_aufraeum =
|
||||||
|
'((
|
||||||
|
$Pspeedmaster_aufraeumgrundzeit$P
|
||||||
|
+ ($Pspeedmaster_aufraeumzeit_pro_sonderfarbe$P * $Fhelper_sonderfarben_count$F)
|
||||||
|
)
|
||||||
|
* ($Pspeedmaster_stundenpreis$P / 60))';
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// DIGITALDRUCK
|
||||||
|
|
||||||
|
$digital_ruest =
|
||||||
|
'(
|
||||||
|
$Pversafire_ruest_grundzeit$P * ($Pversafire_stundenpreis$P / 60))';
|
||||||
|
|
||||||
|
$digital =
|
||||||
|
'(
|
||||||
|
3600 / rangeSwitch($CVformat_5$CV,
|
||||||
|
1, 230, $Pversafire_seiten_pro_stunde$P,
|
||||||
|
231, 420, $Pversafire_seiten_pro_stunde$P / 1.86,
|
||||||
|
421, 450, $Pversafire_seiten_pro_stunde$P / 1.98,
|
||||||
|
451, 460, $Pversafire_seiten_pro_stunde$P / 2.02,
|
||||||
|
461, 480, $Pversafire_seiten_pro_stunde$P / 2.12,
|
||||||
|
481, 700, $Pversafire_seiten_pro_stunde$P / 3.63,
|
||||||
|
701, 1000, $Pversafire_seiten_pro_stunde$P / 4.6) * ((($Fhelper_zu_verarbeitende_gueter$F - ($Pvorschneiden_fixer_ausschuss$P / $CVformat_1$CV)) * $CVformat_1$CV) * $Fhelper_anzahl_druckgaenge$F)
|
||||||
|
) * ($Pversafire_stundenpreis$P / 3600)';
|
||||||
|
|
||||||
|
$digital_fremd =
|
||||||
|
'(
|
||||||
|
((($CVdruckfarben_1$CV > 1)? (
|
||||||
|
rangeSwitch($CVformat_4$CV,
|
||||||
|
100, 480, $Pversafire_farbklick_bis_480$P,
|
||||||
|
481, 700, $Pversafire_farbklick_bis_700$P,
|
||||||
|
701, 1000, $Pversafire_farbklick_bis_1000$P)
|
||||||
|
):(
|
||||||
|
rangeSwitch($CVformat_4$CV,
|
||||||
|
100, 480, $Pversafire_swklick_bis_480$P,
|
||||||
|
481, 700, $Pversafire_swklick_bis_700$P,
|
||||||
|
701, 1000, $Pversafire_swklick_bis_1000$P)
|
||||||
|
))
|
||||||
|
* ($Fhelper_zu_verarbeitende_gueter$F - ($Pvorschneiden_fixer_ausschuss$P / $CVformat_1$CV)) * $CVformat_1$CV * (($CVdruckfarben_1$CV == 0)?0:1))
|
||||||
|
+ ((($CVdruckfarben_2$CV > 1)?(
|
||||||
|
rangeSwitch($CVformat_4$CV,
|
||||||
|
100, 480, $Pversafire_farbklick_bis_480$P,
|
||||||
|
481, 700, $Pversafire_farbklick_bis_700$P,
|
||||||
|
701, 1000, $Pversafire_farbklick_bis_1000$P)
|
||||||
|
):(
|
||||||
|
rangeSwitch($CVformat_4$CV,
|
||||||
|
100, 480, $Pversafire_swklick_bis_480$P,
|
||||||
|
481, 700, $Pversafire_swklick_bis_700$P,
|
||||||
|
701, 1000, $Pversafire_swklick_bis_1000$P)
|
||||||
|
))
|
||||||
|
* ($Fhelper_zu_verarbeitende_gueter$F - ($Pvorschneiden_fixer_ausschuss$P / $CVformat_1$CV)) * $CVformat_1$CV * (($CVdruckfarben_2$CV == 0)?0:1))
|
||||||
|
)';
|
||||||
|
|
||||||
|
$digital_aufraeum =
|
||||||
|
'(
|
||||||
|
$Pversafire_aufraeum_grundzeit$P * ($Pversafire_stundenpreis$P / 60))';
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// FARBENVERBRAUCH
|
||||||
|
|
||||||
|
// Bedruckte Oberflächen (seitigkeit)
|
||||||
|
$helper_anzahl_der_bedruckten_oberflaechen =
|
||||||
|
'(
|
||||||
|
($CVdruckfarben_2$CV > 0)? 2 : 1
|
||||||
|
)';
|
||||||
|
|
||||||
|
// Offset-Farbverbrauch
|
||||||
|
$offset_farbverbrauch =
|
||||||
|
'(
|
||||||
|
ceil(($Vpapier_eigenschaften$V == "coated")?
|
||||||
|
(
|
||||||
|
((( $Fhelper_zu_verarbeitende_gueter$F * ($Vpapier_laenge$V * $Vpapier_breite$V/1000000)) * 0.15) * 1.6)
|
||||||
|
):(
|
||||||
|
((( $Fhelper_zu_verarbeitende_gueter$F * ($Vpapier_laenge$V * $Vpapier_breite$V/1000000)) * 0.15) * 1.8)
|
||||||
|
)
|
||||||
|
) * $Fhelper_sonderfarben_count$F * 0.04
|
||||||
|
) + (
|
||||||
|
ceil(($Vpapier_eigenschaften$V == "coated")?
|
||||||
|
(
|
||||||
|
((( $Fhelper_zu_verarbeitende_gueter$F * ($Vpapier_laenge$V * $Vpapier_breite$V/1000000)) * 0.15) * 1.6)
|
||||||
|
):(
|
||||||
|
((( $Fhelper_zu_verarbeitende_gueter$F * ($Vpapier_laenge$V * $Vpapier_breite$V/1000000)) * 0.15) * 1.8)
|
||||||
|
)
|
||||||
|
) *
|
||||||
|
(
|
||||||
|
(($CVfarbe_1_v_valid$CV && ($Vfarbe_1_v$V == 1))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_2_v_valid$CV && ($Vfarbe_2_v$V == 1))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_3_v_valid$CV && ($Vfarbe_3_v$V == 1))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_4_v_valid$CV && ($Vfarbe_4_v$V == 1))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_1_r_valid$CV && ($Vfarbe_1_r$V == 1))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_2_r_valid$CV && ($Vfarbe_2_r$V == 1))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_3_r_valid$CV && ($Vfarbe_3_r$V == 1))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_4_r_valid$CV && ($Vfarbe_4_r$V == 1))? 1 : 0 )
|
||||||
|
) * 0.008464
|
||||||
|
)';
|
||||||
|
|
||||||
|
// Aufpreis Pantone
|
||||||
|
$pantone_aufpreis =
|
||||||
|
'(
|
||||||
|
(($CVfarbe_1_v_valid$CV && ($Vfarbe_1_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_2_v_valid$CV && ($Vfarbe_2_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_3_v_valid$CV && ($Vfarbe_3_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_4_v_valid$CV && ($Vfarbe_4_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_1_r_valid$CV && ($Vfarbe_1_r$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_2_r_valid$CV && ($Vfarbe_2_r$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_3_r_valid$CV && ($Vfarbe_3_r$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_4_r_valid$CV && ($Vfarbe_4_r$V == 3))? 1 : 0 )
|
||||||
|
) * 25';
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// SCHNEIDEN
|
||||||
|
|
||||||
|
$schneiden_ruest =
|
||||||
|
'(
|
||||||
|
($Ppolar78_ruest_grundzeit$P + ( $Ppolar78_ruest_pro_schnitt$P * $CVformat_2$CV ))
|
||||||
|
* ($Ppolar78_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$schneiden =
|
||||||
|
'(
|
||||||
|
(ceil(
|
||||||
|
($Fhelper_anzahl_druckboegen$F * ($Vpapier_staerke$V / 1000)) / $Peinlegehoehe_schneidemaschine$P)
|
||||||
|
)
|
||||||
|
* ($CVformat_2$CV * (3600 / $Pschnitte_pro_stunde$P))
|
||||||
|
/ 60 * ($Ppolar78_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$schneiden_aufraeum =
|
||||||
|
'(
|
||||||
|
$Ppolar78_aufraeum_grundzeit$P * ($Ppolar78_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$vorschneiden_ruest =
|
||||||
|
'(
|
||||||
|
($Ppolar78_ruest_pro_schnitt$P * $CVformat_3$CV) * ($Ppolar78_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$vorschneiden =
|
||||||
|
'((
|
||||||
|
(ceil(
|
||||||
|
($Fhelper_zu_verarbeitende_gueter$F * ($Vpapier_staerke$V / 1000)) / $Peinlegehoehe_schneidemaschine$P)
|
||||||
|
)
|
||||||
|
* ($CVformat_3$CV * (3600 / $Pschnitte_pro_stunde$P))
|
||||||
|
/ 60
|
||||||
|
) * 2.1) * ($Ppolar78_stundenlohn$P / 60)';
|
||||||
|
|
||||||
|
$vorschneiden_aufraeum =
|
||||||
|
'(
|
||||||
|
$Ppolar78_aufraeum_grundzeit$P * ($Ppolar78_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$debug = '(ceil(
|
||||||
|
($Fhelper_zu_verarbeitende_gueter$F * ($Vpapier_staerke$V / 1000)) / $Peinlegehoehe_schneidemaschine$P)
|
||||||
|
)';
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// VERPACKEN / könnte sein, dass dies auch überholt ist, da es verpacken2 gibt
|
||||||
|
|
||||||
|
$helper_anzahl_verpackungen =
|
||||||
|
'ceil(
|
||||||
|
$Vauflage$V / 1000
|
||||||
|
)';
|
||||||
|
|
||||||
|
$helper_anzahl_umverpackungen =
|
||||||
|
'(
|
||||||
|
ceil($Fhelper_anzahl_verpackungen$F / 4)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$verpacken =
|
||||||
|
'(
|
||||||
|
((60 / $Pverpackungen_pro_stunde$P) * $Fhelper_anzahl_verpackungen$F) * ($Pversandmitarbeiter_pro_stunde$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$verpacken_kartons = '$Fhelper_anzahl_verpackungen$F * $Pkarton_preis$P';
|
||||||
|
|
||||||
|
$umverpacken =
|
||||||
|
'(
|
||||||
|
((60 / $Pverpackungen_pro_stunde$P) * $Fhelper_anzahl_umverpackungen$F) * ($Pversandmitarbeiter_pro_stunde$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$umverpacken_kartons = '$Fhelper_anzahl_umverpackungen$F * $Pumkarton_preis$P';
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// BOHREN
|
||||||
|
|
||||||
|
$bohren_ruest =
|
||||||
|
'((
|
||||||
|
$Pbohren_ruestgrundzeit$P * ceil($Vabheftlochung$V / 2)
|
||||||
|
) * ($Pbohren_stundenlohn$P / 60))';
|
||||||
|
|
||||||
|
$bohren =
|
||||||
|
'(
|
||||||
|
((
|
||||||
|
(ceil(
|
||||||
|
(($Vseitenanzahl$V / 2) * ($Vauflage$V * ($Vpapier_staerke$V / 1000))) / $Peinlegehoehe_bohrmaschine$P)
|
||||||
|
) * (3600 / $Pbohrungen_pro_stunde$P) * (($Vabheftlochung$V > 2)? 1.3 : 1)
|
||||||
|
) / 60) * ($Pbohren_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$bohren_aufraeum =
|
||||||
|
'(
|
||||||
|
$Pbohren_aufraeumgrundzeit$P * ($Pbohren_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// RILLEN
|
||||||
|
|
||||||
|
$rillen_und_falzen_ruest =
|
||||||
|
'(
|
||||||
|
( $Phorizon_ruestgrundzeit$P * 1.5 * $CVseiten_1$CV )
|
||||||
|
) * ($Phorizon_stundenlohn$P / 60)';
|
||||||
|
|
||||||
|
$rillen_und_falzen =
|
||||||
|
'((
|
||||||
|
$Vauflage$V * (3600 / $Phorizon_boegen_pro_stunde$P)
|
||||||
|
* (($CVseiten_1$CV == 1)? 1.2 : 1.5)
|
||||||
|
* rangeSwitch( (($CVformat_8$CV == $CVformat_5$CV)? $CVformat_7$CV : $CVformat_8$CV),
|
||||||
|
1, 200, 1,
|
||||||
|
201, 250, 1.1,
|
||||||
|
251, 300, 1.15,
|
||||||
|
301, 350, 1.2,
|
||||||
|
351, 400, 1.3,
|
||||||
|
401, 450, 1.35,
|
||||||
|
451, 600, 1.4)
|
||||||
|
* (($Vauflage$V > 2500)? 0.8 : 1)
|
||||||
|
) / 60) * ($Phorizon_stundenlohn$P / 60)';
|
||||||
|
|
||||||
|
$rillen_und_falzen_aufraeum =
|
||||||
|
'(
|
||||||
|
$Phorizon_aufraeumgrundzeit$P * ($Phorizon_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// BANDAROLIEREN
|
||||||
|
|
||||||
|
$bandarolieren_ruest =
|
||||||
|
'(
|
||||||
|
$Pbandarolieren_ruestgrundzeit$P * ($Pbandarolieren_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$bandarolieren =
|
||||||
|
'(
|
||||||
|
(($Fhelper_notwendige_kartons$F * (3600 / $Pbandarolieren_pro_stunde$P)) / 60) * ($Pbandarolieren_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$bandarolieren_aufraeum =
|
||||||
|
'(
|
||||||
|
$Fbandarolieren_aufraeumgrundzeit$F * ($Pbandarolieren_stundenlohn$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
$verpacken2 =
|
||||||
|
'(
|
||||||
|
((60 / $Pverpackungen_pro_stunde$P) * $Fhelper_notwendige_kartons$F) * ($Pversandmitarbeiter_pro_stunde$P / 60)
|
||||||
|
)';
|
||||||
|
|
||||||
|
// --------------------
|
||||||
|
// Profi-Datencheck
|
||||||
|
$profidaten_check = '(($Vdatencheck$V == 2)? 7: 0)';
|
||||||
|
|
||||||
|
// VERSANDHELPER
|
||||||
|
|
||||||
|
// CV6 von Format: die Stapelanzahl pro Box und Format mitgegeben, sonst wird von 1nem Stapel pro Karton ausgegangen
|
||||||
|
$helper_notwendige_kartons = 'ceil(($Vauflage$V / ($CVformat_6_valid$CV? $CVformat_6$CV : 1)) / floor($Pkarton_hoehe$P / ($Vpapier_staerke$V/1000)))';
|
||||||
|
|
||||||
|
$helper_gewicht_eines_kartons =
|
||||||
|
'(
|
||||||
|
(($Vauflage$V < floor($Pkarton_hoehe$P / ($Vpapier_staerke$V/1000)))?$Vauflage$V:(floor($Pkarton_hoehe$P / ($Vpapier_staerke$V/1000)))) * ($CVformat_4$CV * $CVformat_5$CV / 1000000) * $Vpapier_grammatur$V
|
||||||
|
)';
|
||||||
|
|
||||||
|
$helper_exemplare_pro_karton =
|
||||||
|
'(
|
||||||
|
floor($Pkarton_hoehe$P / ($Vpapier_staerke$V/1000)) * ($CVformat_6_valid$CV? $CVformat_6$CV : 1)
|
||||||
|
)';
|
||||||
|
|
||||||
|
|
||||||
|
// VERSAND
|
||||||
|
|
||||||
|
$versandgewicht = '($Fhelper_gewicht_eines_kartons$F * $Fhelper_notwendige_kartons$F + $Fhelper_notwendige_kartons$F * $Pkarton_gewicht$P) / 1000';
|
||||||
|
$versandpreisDPD = '(($Fversandgewicht$F < 3 && $Vcarrier$V == 2)? $Pdpd_bis_3kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 3 && $Fversandgewicht$F < 5 && $Vcarrier$V == 2)? $Pdpd_bis_5kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 5 && $Fversandgewicht$F < 10 && $Vcarrier$V == 2)? $Pdpd_bis_10kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 10 && $Fversandgewicht$F < 15 && $Vcarrier$V == 2)? $Pdpd_bis_15kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 15 && $Fversandgewicht$F < 20 && $Vcarrier$V == 2)? $Pdpd_bis_20kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 20 && $Fversandgewicht$F < 25 && $Vcarrier$V == 2)? $Pdpd_bis_25kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 25 && $Fversandgewicht$F < 31.5 && $Vcarrier$V == 2)? $Pdpd_bis_31kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 31.5 && $Fversandgewicht$F < 80 && $Vcarrier$V == 2)? (floor($Fversandgewicht$F / 20) * $Pdpd_bis_20kg$P)
|
||||||
|
+ ((($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) < 3)? $Pdpd_bis_3kg$P : 0)
|
||||||
|
+ ((($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) > 3 && (($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) < 5))? $Pdpd_bis_5kg$P : 0)
|
||||||
|
+ ((($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) > 5 && (($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) < 10))? $Pdpd_bis_10kg$P : 0)
|
||||||
|
+ ((($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) > 10 && (($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) < 15))? $Pdpd_bis_15kg$P : 0)
|
||||||
|
+ ((($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) > 15 && (($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) < 20))? $Pdpd_bis_20kg$P : 0)
|
||||||
|
: 0)
|
||||||
|
+(($Fversandgewicht$F > 80 && $Vcarrier$V == 2)? $Pspeditionspreis_pro_kg$P * $Fversandgewicht$F : 0)';
|
||||||
|
|
||||||
|
$versandpreisDHL = '(($Fversandgewicht$F < 1 && $Vcarrier$V == 1)? $Ppaket_DHL_0_1_kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 1 && $Fversandgewicht$F < 3 && $Vcarrier$V == 1)? $Ppaket_DHL_1_3_kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 3 && $Fversandgewicht$F < 5 && $Vcarrier$V == 1)? $Ppaket_DHL_3_5_kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 5 && $Fversandgewicht$F < 10 && $Vcarrier$V == 1)? $Ppaket_DHL_5_10_kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 10 && $Fversandgewicht$F < 20 && $Vcarrier$V == 1)? $Ppaket_DHL_10_20_kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 20 && $Fversandgewicht$F < 31 && $Vcarrier$V == 1)? $Ppaket_DHL_20_31_kg$P : 0)
|
||||||
|
+(($Fversandgewicht$F > 31 && $Fversandgewicht$F < 80 && $Vcarrier$V == 1)? (floor($Fversandgewicht$F / 20) * $Ppaket_DHL_10_20_kg$P)
|
||||||
|
+ ((($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) < 1)? $Ppaket_DHL_0_1_kg$P : 0)
|
||||||
|
+ ((($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) > 1 && (($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) < 3))? $Ppaket_DHL_1_3_kg$P : 0)
|
||||||
|
+ ((($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) > 3 && (($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) < 5))? $Ppaket_DHL_3_5_kg$P : 0)
|
||||||
|
+ ((($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) > 5 && (($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) < 10))? $Ppaket_DHL_5_10_kg$P : 0)
|
||||||
|
+ ((($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) > 10 && (($Fversandgewicht$F - (20 * floor($Fversandgewicht$F / 20))) < 20))? $Ppaket_DHL_10_20_kg$P : 0)
|
||||||
|
: 0)
|
||||||
|
+(($Fversandgewicht$F > 80 && $Vcarrier$V == 1)? $Pspeditionspreis_pro_kg$P * $Fversandgewicht$F : 0)';
|
||||||
|
|
||||||
|
$versand_selbstauslieferung_SOB =
|
||||||
|
'(
|
||||||
|
$Fhelper_notwendige_kartons$F * $Pkarton_preis$P
|
||||||
|
+ 5
|
||||||
|
)';
|
||||||
|
|
||||||
|
|
||||||
|
// ++++++++++++++ BBG(OFFSET) Kalkulation ++++++++++++++
|
||||||
|
$bbg_vollkalkulation =
|
||||||
|
'(
|
||||||
|
$Fmediengestalter_reduziert$F
|
||||||
|
+ $Foffset_druckplatten_belichten$F
|
||||||
|
+ $Foffset_ruest$F
|
||||||
|
+ $Foffset$F
|
||||||
|
+ $Foffset_aufraeum$F
|
||||||
|
+ $Foffset_druckbogen_preis$F
|
||||||
|
+ $Foffset_farbverbrauch$F
|
||||||
|
+ $Fpantone_aufpreis$F
|
||||||
|
+ $Fschneiden_ruest$F
|
||||||
|
+ $Fschneiden$F
|
||||||
|
+ $Fschneiden_aufraeum$F
|
||||||
|
+ $Fverpacken$F
|
||||||
|
+ $Fverpacken_kartons$F
|
||||||
|
+ $Fumverpacken$F
|
||||||
|
+ $Fumverpacken_kartons$F
|
||||||
|
+ $Fbohren_ruest$F
|
||||||
|
+ $Fbohren$F
|
||||||
|
+ $Fbohren_aufraeum$F
|
||||||
|
+ $Fprofidaten_check$F
|
||||||
|
) * $Poffset_marge$P + $FversandpreisDHL$F + $FversandpreisDPD$F';
|
||||||
|
|
||||||
|
$bbg_weight =
|
||||||
|
'(
|
||||||
|
$Fhelper_gewicht_eines_kartons$F * $Fhelper_notwendige_kartons$F
|
||||||
|
+ $Fhelper_notwendige_kartons$F * $Pkarton_gewicht$P
|
||||||
|
)';
|
||||||
|
|
||||||
|
// ++++++++++++++ Blöcke Kalkulation ++++++++++++++
|
||||||
|
$bloecke_vollkalkulation =
|
||||||
|
'(
|
||||||
|
$Fmediengestalter_reduziert$F
|
||||||
|
+ $Fvorschneiden_ruest$F
|
||||||
|
+ $Fvorschneiden$F
|
||||||
|
+ $Fvorschneiden_aufraeum$F
|
||||||
|
+ (($Vdruckverfahren$V == 2)? $Foffset_druckplatten_belichten$F : 0)
|
||||||
|
+ (($Vdruckverfahren$V == 2)? $Foffset_ruest$F : $Fdigital_ruest$F)
|
||||||
|
+ (($Vdruckverfahren$V == 2)? $Foffset$F : $Fdigital$F)
|
||||||
|
+ (($Vdruckverfahren$V == 2)? $Foffset_aufraeum$F : $Fdigital_aufraeum$F)
|
||||||
|
+ (($Vdruckverfahren$V == 2)? $Foffset_druckbogen_preis$F : $Fdigital_druckbogen_preis$F)
|
||||||
|
+ (($Vdruckverfahren$V == 2)? $Foffset_farbverbrauch$F : 0)
|
||||||
|
+ (($Vdruckverfahren$V == 2)? $Fpantone_aufpreis$F : 0)
|
||||||
|
+ $Fzwischenschneiden_ruest$F
|
||||||
|
+ $Fzwischenschneiden$F
|
||||||
|
+ $Fzwischenschneiden_aufraeum$F
|
||||||
|
+ $Fleimen_ruest$F
|
||||||
|
+ $Fleimen$F
|
||||||
|
+ $Fleimen_aufraeum$F
|
||||||
|
+ $Fschneiden_ruest$F
|
||||||
|
+ $Fschneiden$F
|
||||||
|
+ $Fschneiden_aufraeum$F
|
||||||
|
+ $Fverpacken$F
|
||||||
|
+ $Fverpacken_kartons$F
|
||||||
|
+ $Fumverpacken$F
|
||||||
|
+ $Fumverpacken_kartons$F
|
||||||
|
+ $Fbohren_ruest$F
|
||||||
|
+ $Fbohren$F
|
||||||
|
+ $Fbohren_aufraeum$F
|
||||||
|
+ $Fprofidaten_check$F
|
||||||
|
) * $Poffset_marge$P + $FversandpreisDHL$F + $FversandpreisDPD$F';
|
||||||
|
|
||||||
|
$bloecke_weight =
|
||||||
|
'(
|
||||||
|
$Fhelper_gewicht_eines_kartons$F * $Fhelper_notwendige_kartons$F
|
||||||
|
+ $Fhelper_notwendige_kartons$F * $Pkarton_gewicht$P
|
||||||
|
)';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ++++++++++++++ STADLER GUTSCHEIN Kalkulation ++++++++++++++
|
||||||
|
$stadler_gutschein_vollkalkulation =
|
||||||
|
'(
|
||||||
|
$Fvorschneiden_ruest$F
|
||||||
|
+ $Fvorschneiden$F
|
||||||
|
+ $Fvorschneiden_aufraeum$F
|
||||||
|
+ $Fdigital_ruest$F
|
||||||
|
+ $Fdigital$F
|
||||||
|
+ $Fdigital_fremd$F
|
||||||
|
+ $Fdigital_aufraeum$F
|
||||||
|
+ $Fdigital_druckbogen_preis$F
|
||||||
|
+ $Fschneiden_ruest$F
|
||||||
|
+ $Fschneiden$F
|
||||||
|
+ $Fschneiden_aufraeum$F
|
||||||
|
+ $Fverpacken2$F
|
||||||
|
) * rangeSwitch($Vauflage$V,
|
||||||
|
1, 1, 1.05,
|
||||||
|
2, 2, 1.1,
|
||||||
|
3, 3, 1.15,
|
||||||
|
4, 4, 1.2,
|
||||||
|
5, 5, 1.25,
|
||||||
|
6, 6, 1.3,
|
||||||
|
7, 7, 1.35,
|
||||||
|
8, 8, 1.4,
|
||||||
|
9, 9, 1.45,
|
||||||
|
10, 10, 1.5,
|
||||||
|
11, 13, 1.55,
|
||||||
|
14, 17, 1.60,
|
||||||
|
18, 20, 1.65,
|
||||||
|
21, 26, 1.7,
|
||||||
|
27, 32, 1.75,
|
||||||
|
33, 36, 1.8,
|
||||||
|
37, 41, 1.85,
|
||||||
|
42, 45, 1.9,
|
||||||
|
46, 50, 1.95,
|
||||||
|
51, 53, 2.0,
|
||||||
|
54, 56, 2.1,
|
||||||
|
57, 59, 2.2,
|
||||||
|
60, 63, 2.3,
|
||||||
|
64, 66, 2.4,
|
||||||
|
67, 69, 2.5,
|
||||||
|
70, 72, 2.6,
|
||||||
|
73, 100, 2.65
|
||||||
|
) + (($Vversandart$V == versand)? $Fversand_selbstauslieferung_SOB$F : 0)';
|
||||||
|
|
||||||
|
$stadler_gutschein_weight =
|
||||||
|
'(
|
||||||
|
$Fhelper_gewicht_eines_kartons$F * $Fhelper_notwendige_kartons$F
|
||||||
|
+ $Fhelper_notwendige_kartons$F * $Pkarton_gewicht$P
|
||||||
|
)';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// ++++++++++++++ STADLER SPEISEKARTE Kalkulation ++++++++++++++
|
||||||
|
$stadler_speisekarte_vollkalkulation =
|
||||||
|
'(
|
||||||
|
$Fdigital_ruest$F
|
||||||
|
+ $Fdigital$F
|
||||||
|
+ $Fdigital_fremd$F
|
||||||
|
+ $Fdigital_aufraeum$F
|
||||||
|
+ $Fdigital_druckbogen_preis$F
|
||||||
|
+ $Fschneiden_ruest$F
|
||||||
|
+ $Fschneiden$F
|
||||||
|
+ $Fschneiden_aufraeum$F
|
||||||
|
+ $Frillen_und_falzen_ruest$F
|
||||||
|
+ $Frillen_und_falzen$F
|
||||||
|
+ $Frillen_und_falzen_aufraeum$F
|
||||||
|
+ $Fbandarolieren_ruest$F
|
||||||
|
+ $Fbandarolieren$F
|
||||||
|
+ $Fbandarolieren_aufraeum$F
|
||||||
|
+ $Fverpacken2$F
|
||||||
|
) * rangeSwitch($Vauflage$V,
|
||||||
|
1, 1, 1.05,
|
||||||
|
2, 2, 1.1,
|
||||||
|
3, 3, 1.15,
|
||||||
|
4, 4, 1.2,
|
||||||
|
5, 5, 1.25,
|
||||||
|
6, 6, 1.3,
|
||||||
|
7, 7, 1.35,
|
||||||
|
8, 8, 1.4,
|
||||||
|
9, 9, 1.45,
|
||||||
|
10, 10, 1.5,
|
||||||
|
11, 13, 1.55,
|
||||||
|
14, 17, 1.60,
|
||||||
|
18, 20, 1.65,
|
||||||
|
21, 26, 1.7,
|
||||||
|
27, 32, 1.75,
|
||||||
|
33, 36, 1.8,
|
||||||
|
37, 41, 1.85,
|
||||||
|
42, 45, 1.9,
|
||||||
|
46, 50, 1.95,
|
||||||
|
51, 53, 2.0,
|
||||||
|
54, 56, 2.1,
|
||||||
|
57, 59, 2.2,
|
||||||
|
60, 63, 2.3,
|
||||||
|
64, 66, 2.4,
|
||||||
|
67, 69, 2.5,
|
||||||
|
70, 72, 2.6,
|
||||||
|
73, 100, 2.65
|
||||||
|
) + (($Vversandart$V == versand)? $Fversand_selbstauslieferung_SOB$F : 0)';
|
||||||
|
|
||||||
|
$stadler_speisekarte_weight =
|
||||||
|
'(
|
||||||
|
$Fhelper_gewicht_eines_kartons$F * $Fhelper_notwendige_kartons$F
|
||||||
|
+ $Fhelper_notwendige_kartons$F * $Pkarton_gewicht$P
|
||||||
|
)';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Gemeindeblatt Weichering
|
||||||
|
$gemeindeblatt_weichering = '($CVseiten_1$CV + $CVumschlag_1$CV) ';
|
||||||
|
|
||||||
|
$gemeindeblatt_weichering_weight =
|
||||||
|
'(
|
||||||
|
(($Vseiten$V * $Vauflage$V * 210 * 297) / 1000000) * 80
|
||||||
|
+ 9 * $Pkarton_gewicht$P
|
||||||
|
)';
|
||||||
|
|
||||||
|
//SD-Sätze HELPER
|
||||||
|
//Papierpreis eines SD-Satzes in EUR
|
||||||
|
$sd_satz_helper_paper_price =
|
||||||
|
'(
|
||||||
|
($CVblatt_o_valid$CV? ($Vblatt_o_value$V / 1000):0) +
|
||||||
|
($CVblatt_2_valid$CV? ($Vblatt_2_value$V / 1000):0) +
|
||||||
|
($CVblatt_3_valid$CV? ($Vblatt_3_value$V / 1000):0) +
|
||||||
|
($CVblatt_4_valid$CV? ($Vblatt_4_value$V / 1000):0) +
|
||||||
|
($CVblatt_s_valid$CV? ($Vblatt_s_value$V / 1000):0)
|
||||||
|
)';
|
||||||
|
|
||||||
|
//Die Höhe eines SD-Satzes in mm
|
||||||
|
$sd_satz_helper_paper_height =
|
||||||
|
'(
|
||||||
|
($CVblatt_o_valid$CV? ($Vblatt_o_staerke$V / 1000):0) +
|
||||||
|
($CVblatt_2_valid$CV? ($Vblatt_2_staerke$V / 1000):0) +
|
||||||
|
($CVblatt_3_valid$CV? ($Vblatt_3_staerke$V / 1000):0) +
|
||||||
|
($CVblatt_4_valid$CV? ($Vblatt_4_staerke$V / 1000):0) +
|
||||||
|
($CVblatt_s_valid$CV? ($Vblatt_s_staerke$V / 1000):0)
|
||||||
|
)';
|
||||||
|
|
||||||
|
//Grammatur alles Blätter eines SD-Satzes (nicht das Gewicht eines Satzes)
|
||||||
|
$sd_satz_helper_paper_grammature =
|
||||||
|
'(
|
||||||
|
($CVblatt_o_valid$CV? $Vblatt_o_grammatur$V:0) +
|
||||||
|
($CVblatt_2_valid$CV? $Vblatt_2_grammatur$V:0) +
|
||||||
|
($CVblatt_3_valid$CV? $Vblatt_3_grammatur$V:0) +
|
||||||
|
($CVblatt_4_valid$CV? $Vblatt_4_grammatur$V:0) +
|
||||||
|
($CVblatt_s_valid$CV? $Vblatt_s_grammatur$V:0)
|
||||||
|
)';
|
||||||
|
|
||||||
|
//Gesamtanzahl der Sonderfarben
|
||||||
|
$sd_satz_helper_sonderfarben_count =
|
||||||
|
'(
|
||||||
|
(($CVfarbe_1_v_valid$CV && ($Vfarbe_1_v$V == 2 || $Vfarbe_1_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_2_v_valid$CV && ($Vfarbe_2_v$V == 2 || $Vfarbe_2_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_3_v_valid$CV && ($Vfarbe_3_v$V == 2 || $Vfarbe_3_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_4_v_valid$CV && ($Vfarbe_4_v$V == 2 || $Vfarbe_4_v$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_1_r_valid$CV && ($Vfarbe_1_r$V == 2 || $Vfarbe_1_r$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_2_r_valid$CV && ($Vfarbe_2_r$V == 2 || $Vfarbe_2_r$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_3_r_valid$CV && ($Vfarbe_3_r$V == 2 || $Vfarbe_3_r$V == 3))? 1 : 0 ) +
|
||||||
|
(($CVfarbe_4_r_valid$CV && ($Vfarbe_4_r$V == 2 || $Vfarbe_4_r$V == 3))? 1 : 0 )
|
||||||
|
)';
|
||||||
|
|
||||||
|
//Makulatur beim einstellen der Maschine berechnen
|
||||||
|
$sd_satz_makulatur ='( ($CVdruckfarben_1$CV + $CVdruckfarben_2$CV)
|
||||||
|
* $Pmakulatur_pro_farbe$P
|
||||||
|
* $Vblatt$V
|
||||||
|
) * ($Fsd_satz_helper_paper_price$F / $Vblatt$V)';
|
||||||
|
|
||||||
|
//
|
||||||
|
//SD-Sätze Kalkulation
|
||||||
|
// format_1 = Nutzen, format_2 = Endschnitte, format_3 = Zwischenschnitte
|
||||||
|
|
||||||
|
$sd_satz_vorschneiden =
|
||||||
|
'(ceil(($Fsd_satz_helper_paper_height$F)
|
||||||
|
* ($Vauflage$V / $CVformat_1$CV)
|
||||||
|
/ $Peinlegehoehe_schneidemaschine$P))
|
||||||
|
+ $Pvor_und_nachbereitung_schneiden$P';
|
||||||
|
|
||||||
|
//
|
||||||
|
$sd_satz_offset_drucken = '(
|
||||||
|
( ($CVdruckfarben_2$CV > 0) ? 2:1 )
|
||||||
|
* ($Vauflage$V * $Vblatt$V / $CVformat_1$CV)
|
||||||
|
/ ($Pbogen_pro_stunde_offset_sd$P / 60)
|
||||||
|
)
|
||||||
|
+ ( $Fsd_satz_helper_sonderfarben_count$F * ($Pruestzeit_pro_sonderfarbe$P + $Pfarbwechsel_offset$P) )
|
||||||
|
+ $Peinrichtezeit_fuer_farbe_und_passer$P
|
||||||
|
+ ( $Pruestzeit_pro_platte$P * ($CVdruckfarben_1$CV + $CVdruckfarben_2$CV) )
|
||||||
|
+ ( ($CVdruckfarben_2$CV > 0)? $Pgummituch_waschen$P: 0)
|
||||||
|
* ($Pstundenpreis_offsetdruck$P / 60)';
|
||||||
|
|
||||||
|
// Da einzelne Einlagefächer beim Zusammentragen befüllt werden, wird hier nicht die Satz-Höhe berechnet, sondern jedes Blatt einzeln.
|
||||||
|
$sd_satz_zusammentragen = '(( ($Vauflage$V / $CVformat_1$CV) / $Pzusammentragen_pro_stunde$P) * $Pstundenpreis_zusammentragen$P) +
|
||||||
|
((
|
||||||
|
($CVblatt_o_valid$CV? ceil((($Vblatt_o_staerke$V / 1000) * $Vauflage$V / $CVformat_1$CV) / $Peinlegehoehe_zusammentragen$P ) : 0)+
|
||||||
|
($CVblatt_2_valid$CV? ceil((($Vblatt_2_staerke$V / 1000) * $Vauflage$V / $CVformat_1$CV) / $Peinlegehoehe_zusammentragen$P ) : 0)+
|
||||||
|
($CVblatt_3_valid$CV? ceil((($Vblatt_3_staerke$V / 1000) * $Vauflage$V / $CVformat_1$CV) / $Peinlegehoehe_zusammentragen$P ) : 0)+
|
||||||
|
($CVblatt_4_valid$CV? ceil((($Vblatt_4_staerke$V / 1000) * $Vauflage$V / $CVformat_1$CV) / $Peinlegehoehe_zusammentragen$P ) : 0)+
|
||||||
|
($CVblatt_s_valid$CV? ceil((($Vblatt_s_staerke$V / 1000) * $Vauflage$V / $CVformat_1$CV) / $Peinlegehoehe_zusammentragen$P ) : 0)
|
||||||
|
) * $Pzusammentragen_einlegen$P)
|
||||||
|
* ( $Pstundenpreis_zusammentragen$P / 60 )
|
||||||
|
+ $Pvor_und_nachbereitung_zusammentragen$P';
|
||||||
|
|
||||||
|
// ((($Vverleimung$V == 3 || $Vverleimung$V == 4) && ($Vformat$V == 4))? 2 : $CVformat_3$CV ) -- Bei Verleimung links/rechts bei Format DINA4 ändert sich die Anzahl der Zwischen- und Endschnitte
|
||||||
|
$sd_satz_zwischenschneiden =
|
||||||
|
'((($Vverleimung$V == 3 || $Vverleimung$V == 4) && ($Vformat$V == 4))? 2 : $CVformat_3$CV )
|
||||||
|
* $Pkosten_pro_schnitt$P
|
||||||
|
* (ceil(($Fsd_satz_helper_paper_height$F) * ($Vauflage$V / $CVformat_1$CV) / $Peinlegehoehe_schneidemaschine$P)) + $Pvor_und_nachbereitung_schneiden$P';
|
||||||
|
|
||||||
|
$sd_satz_verleimen = '$Vauflage$V * $Pleimen_und_trennen_pro_sd_satz$P + $Pvor_und_nachbereitung_verarbeitung$P';
|
||||||
|
|
||||||
|
// ((($Vverleimung$V == 3 || $Vverleimung$V == 4) && ($Vformat$V == 4))? 1 : 2 ) -- Bei Verleimung links/rechts bei Format DINA4 ändert sich die Anzahl der Zwischen- und Endschnitte
|
||||||
|
$sd_satz_endschneiden =
|
||||||
|
'((($Vverleimung$V == 3 || $Vverleimung$V == 4) && ($Vformat$V == 4))? 3 : $CVformat_2$CV )
|
||||||
|
* $Pkosten_pro_schnitt$P
|
||||||
|
* (ceil
|
||||||
|
($Fsd_satz_helper_paper_height$F * ($Vauflage$V / ((($Vverleimung$V == 3 || $Vverleimung$V == 4) && ($Vformat$V == 4))? 1 : 2 ) ) / $Peinlegehoehe_schneidemaschine$P)
|
||||||
|
)
|
||||||
|
+ $Pvor_und_nachbereitung_schneiden$P';
|
||||||
|
|
||||||
|
// Geteilt durch 96, weil 96 Hübe die Stunde möglich sind.
|
||||||
|
$sd_satz_bohren = '(($Pstundenpreis_verarbeitung$P * ($Vabheftlochung$V / 2)) / 96)
|
||||||
|
* (ceil( $Fsd_satz_helper_paper_height$F * ($Vauflage$V * $Vblatt$V ) / $Peinlegehoehe_bohrmaschine$P))
|
||||||
|
+ $Pvor_und_nachbereitung_bohrmaschine$P';
|
||||||
|
|
||||||
|
// Aus einem Bogen erhält man zwei Druckbögen, daher *2
|
||||||
|
$sd_satz_papierpreis = '$Fsd_satz_helper_paper_price$F
|
||||||
|
* ($Vauflage$V / ($CVformat_1$CV * 2))
|
||||||
|
+ $Fsd_satz_makulatur$F';
|
||||||
|
|
||||||
|
$sd_satz_platten_belichten = '($Ppreis_pro_belichten$P + $Ppreis_pro_druckplatte$P )
|
||||||
|
* ($CVdruckfarben_1$CV + $CVdruckfarben_2$CV)';
|
||||||
|
|
||||||
|
$sd_satz_profidaten_check = '(($Vdatencheck$V == 2)? 7: 0)';
|
||||||
|
|
||||||
|
$sd_satz_vollkalkulation = ' ($Fsd_satz_vorschneiden$F
|
||||||
|
+ $Fsd_satz_offset_drucken$F
|
||||||
|
+ $Fsd_satz_zusammentragen$F
|
||||||
|
+ $Fsd_satz_zwischenschneiden$F
|
||||||
|
+ $Fsd_satz_verleimen$F
|
||||||
|
+ $Fsd_satz_endschneiden$F
|
||||||
|
+ $Fsd_satz_bohren$F
|
||||||
|
+ $Fsd_satz_papierpreis$F
|
||||||
|
+ $Fsd_satz_platten_belichten$F
|
||||||
|
+ $Fsd_satz_profidaten_check$F) * $Psd_satz_marge$P';
|
||||||
|
|
||||||
|
$weight_SD_Satz = '$Fsd_satz_helper_paper_grammature$F * (($Vformat$V == 4)? ((210*297)/1000000) : ((148*210)/1000000)) * $Vauflage$V';
|
||||||
|
|
||||||
|
//BOOS
|
||||||
|
$weight_boos_800 = '(((($Pboos_800_b$P * $Pboos_800_h$P) / 1000000) * $Vauflage$V) * $Vpaper_grammatur$V) +
|
||||||
|
((($Vauflage$V == 5000)? 1 : 0) * $Pboos_karton$P) +
|
||||||
|
((($Vauflage$V == 10000)? 2 : 0) * $Pboos_karton$P) +
|
||||||
|
((($Vauflage$V == 20000)? 4 : 0) * $Pboos_karton$P) +
|
||||||
|
((($Vauflage$V == 5000)? 1 : 0) * $Pboos_umkarton$P) +
|
||||||
|
((($Vauflage$V == 10000)? 1 : 0) * $Pboos_umkarton$P) +
|
||||||
|
((($Vauflage$V == 20000)? 2 : 0) * $Pboos_umkarton$P)';
|
||||||
|
|
||||||
|
$weight_boos_300 = '(((($Pboos_300_b$P * $Pboos_300_h$P) / 1000000) * $Vauflage$V) * $Vpaper_grammatur$V) +
|
||||||
|
((($Vauflage$V == 5000)? 1 : 0) * $Pboos_karton$P) +
|
||||||
|
((($Vauflage$V == 10000)? 2 : 0) * $Pboos_karton$P) +
|
||||||
|
((($Vauflage$V == 20000)? 4 : 0) * $Pboos_karton$P) +
|
||||||
|
((($Vauflage$V == 5000)? 1 : 0) * $Pboos_umkarton$P) +
|
||||||
|
((($Vauflage$V == 10000)? 1 : 0) * $Pboos_umkarton$P) +
|
||||||
|
((($Vauflage$V == 20000)? 2 : 0) * $Pboos_umkarton$P)';
|
||||||
|
|
||||||
296
tests/Customer/JJ/papierContainer.xml
Normal file
296
tests/Customer/JJ/papierContainer.xml
Normal file
@ -0,0 +1,296 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<container>
|
||||||
|
<papiercontainer id="boos">
|
||||||
|
<papier id="622835" />
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="einleger">
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
<papier id="trans"/>
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="biotop80"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="fanbuch">
|
||||||
|
<papier id="kp80"/>
|
||||||
|
<papier id="biotop80"/>
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
<papier id="munken90"/>
|
||||||
|
<papier id="kar"/>
|
||||||
|
<papier id="lin"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="brosch_sw_innen">
|
||||||
|
<papier id="kp80"/>
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
<papier id="munken90"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="abi_sw_innen">
|
||||||
|
<papier id="kp80"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="abi_farb_innen">
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="inkjet">
|
||||||
|
<papier id="kp80"/>
|
||||||
|
<papier id="biotop80"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="swpapier">
|
||||||
|
<papier id="kp80"/>
|
||||||
|
<papier id="biotop80"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
<papier id="munken80"/>
|
||||||
|
<papier id="farb80"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="briefpapier">
|
||||||
|
<papier id="kp80"/>
|
||||||
|
<papier id="biotop80"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
<papier id="munken80"/>
|
||||||
|
<papier id="c100"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="brosch_sw_umschlag">
|
||||||
|
<papier id="biotop160"/>
|
||||||
|
<papier id="recy160"/>
|
||||||
|
<papier id="k160"/>
|
||||||
|
<papier id="k160f"/>
|
||||||
|
<papier id="kp80"/>
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="biotop80"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
<papier id="munken90"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="brosch_farb_umschlag">
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
<papier id="biotop160"/>
|
||||||
|
<papier id="c200"/>
|
||||||
|
<papier id="biotop80"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
<papier id="munken90"/>
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="brosch_farb_innen">
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="biotop80"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
<papier id="munken90"/>
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="titeldruck">
|
||||||
|
<papier id="c200"/>
|
||||||
|
<papier id="c300"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="katalog_umschlag">
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="katalog_innen">
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="flyer">
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
|
||||||
|
</papiercontainer>
|
||||||
|
|
||||||
|
<papiercontainer id="flyerkarte">
|
||||||
|
<papier id="kp80"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
<papier id="munken90"/>
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="c120"/>
|
||||||
|
<papier id="c200"/>
|
||||||
|
<papier id="c300"/>
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
<papier id="cro270"/>
|
||||||
|
<papier id="munken240"/>
|
||||||
|
<papier id="recy240"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="1">
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="4cpapier">
|
||||||
|
<papier id="c100_incl"/>
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
<papier id="biotop80"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
<papier id="munken90"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="stro">
|
||||||
|
<papier id="c100_incl"/>
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
<papier id="c300"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="faltflyer">
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
</papiercontainer>
|
||||||
|
|
||||||
|
<papiercontainer id="karte">
|
||||||
|
<papier id="c300"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
<papier id="bdg350"/>
|
||||||
|
<papier id="cro270"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="postkarte">
|
||||||
|
<papier id="c300"/>
|
||||||
|
<papier id="recy240"/>
|
||||||
|
<papier id="munken240"/>
|
||||||
|
<papier id="cro270"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="vk">
|
||||||
|
<papier id="c300"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
<papier id="bdg350"/>
|
||||||
|
<papier id="visit"/>
|
||||||
|
<papier id="cro270"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="2">
|
||||||
|
<papier id="c300"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
<papier id="bdg350"/>
|
||||||
|
<papier id="rtemotion"/>
|
||||||
|
<papier id="cro270"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="fk">
|
||||||
|
<papier id="c200"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
<papier id="munken240"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="faltkartekoffset">
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="3">
|
||||||
|
<papier id="cc100"/>
|
||||||
|
<papier id="cc120"/>
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
<papier id="cc300"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdm350"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
<papier id="bdg350"/>
|
||||||
|
<papier id="rtemotion"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="4">
|
||||||
|
<papier id="bkls"/>
|
||||||
|
<papier id="bklg"/>
|
||||||
|
<papier id="bklr"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="01">
|
||||||
|
<papier id="kp80"/>
|
||||||
|
<papier id="k160"/>
|
||||||
|
<papier id="k160f"/>
|
||||||
|
</papiercontainer>
|
||||||
|
|
||||||
|
<papiercontainer id="cd">
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
<papier id="biotop160"/>
|
||||||
|
<papier id="recy160"/>
|
||||||
|
<papier id="c200"/>
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="bdm135"/>
|
||||||
|
<papier id="bdg135"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="zertifikat">
|
||||||
|
<papier id="bdm170"/>
|
||||||
|
<papier id="bdg170"/>
|
||||||
|
<papier id="biotop160"/>
|
||||||
|
<papier id="recy160"/>
|
||||||
|
<papier id="c200"/>
|
||||||
|
<papier id="c300"/>
|
||||||
|
<papier id="bdm250"/>
|
||||||
|
<papier id="bdg250"/>
|
||||||
|
<papier id="bdg350"/>
|
||||||
|
<papier id="visit"/>
|
||||||
|
<papier id="cro270"/>
|
||||||
|
<papier id="munken240"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="serienbrief">
|
||||||
|
<papier id="kp80"/>
|
||||||
|
<papier id="c100"/>
|
||||||
|
<papier id="recy80"/>
|
||||||
|
<papier id="munken90"/>
|
||||||
|
<papier id="angel"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="plakat">
|
||||||
|
<papier id="160mt"/>
|
||||||
|
<papier id="80mt"/>
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="CB">
|
||||||
|
<papier id="928024"/> // 80g/m² CB, weiss
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="CFB">
|
||||||
|
<papier id="928018"/> // 60g/m² CFB, weiss
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="CF">
|
||||||
|
<papier id="927996"/> // 57g/m² CF, weiss
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="gemeindeblatt_weichering">
|
||||||
|
<papier id="828320"/> // Preprint mit Laser- und Inkjetgarantie, h'frei, FSC Mix Credit, EU-Ecolabel – 450mm × 320mm – 80 gr/m² (Breitbahn) – weiss
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="standardpapiere">
|
||||||
|
<papier id="621995"/> // Preprint mit Laser- und Inkjetgarantie, h'frei, FSC Mix Credit, EU-Ecolabel – 450mm × 320mm – 80 gr/m² (Breitbahn) – weiss
|
||||||
|
<papier id="622011"/> // Preprint mit Laser- und Inkjetgarantie, h'frei, FSC Mix Credit, EU-Ecolabel – 450mm × 320mm – 90 gr/m² (Breitbahn) – weiss
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="stadler_gutschein">
|
||||||
|
<papier id="621118"/> // 350 gr/m², Color Copy, FSC, EU-Ecolabel, 450 x 330
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="stadler_speisekarten">
|
||||||
|
<papier id="621135"/> // 350 gr/m², Color Copy, FSC, EU-Ecolabel, 225 x 330
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="bloecke">
|
||||||
|
<papier id="621995"/> // Preprint mit Laser- und Inkjetgarantie, h'frei, FSC Mix Credit, EU-Ecolabel – 450mm × 320mm – 80 gr/m² (Breitbahn) – weiss
|
||||||
|
</papiercontainer>
|
||||||
|
<papiercontainer id="bloecke-rueckkarton">
|
||||||
|
<papier id="621995"/> // Preprint mit Laser- und Inkjetgarantie, h'frei, FSC Mix Credit, EU-Ecolabel – 450mm × 320mm – 80 gr/m² (Breitbahn) – weiss
|
||||||
|
</papiercontainer>
|
||||||
|
</container>
|
||||||
231
tests/Customer/JJ/parameters.txt
Normal file
231
tests/Customer/JJ/parameters.txt
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
$druckplattenbelichtung_pro_stunde = 18; // Stück pro Stunde
|
||||||
|
$suprasetter_stundenpreis = 50; // Euro pro Stunde
|
||||||
|
$speedmaster_stundenpreis = 80; // Euro pro Stunde
|
||||||
|
$fremdkosten_pro_druckplatte = 280; // Cent
|
||||||
|
$einrichten_farbe_und_passer = 11; // Minuten - wird aber aus Einheitlichkeitsgründen in der Formel in Sekunden umgewandelt
|
||||||
|
$ruestzeit_pro_platte = 2; // Minuten - wird aber aus Einheitlichkeitsgründen in der Formel in Sekunden umgewandelt
|
||||||
|
$ruestzeit_pro_sonderfarbe = 6; // Minuten - wird aber aus Einheitlichkeitsgründen in der Formel in Sekunden umgewandelt
|
||||||
|
$speedmaster_bogen_pro_stunde = 14200; // Bogen pro Stunde
|
||||||
|
$speedmaster_aufraeumgrundzeit = 6; // Minuten - wird aber aus Einheitlichkeitsgründen in der Formel in Sekunden umgewandelt
|
||||||
|
$speedmaster_aufraeumzeit_pro_sonderfarbe = 6; // Minuten - wird aber aus Einheitlichkeitsgründen in der Formel in Sekunden umgewandelt
|
||||||
|
$speedmaster_ausschussrate = 2; // in % von der Auflage
|
||||||
|
$speedmaster_fixer_ausschuss = 140; // in Stück
|
||||||
|
|
||||||
|
$versafire_farbklick_bis_480 = 0.075; // Cent pro Klick
|
||||||
|
$versafire_farbklick_bis_700 = 0.15; // Cent pro Klick
|
||||||
|
$versafire_farbklick_bis_1000 = 0.225; // Cent pro Klick
|
||||||
|
$versafire_swklick_bis_480 = 0.05; // Cent pro Klick
|
||||||
|
$versafire_swklick_bis_700 = 0.1; // Cent pro Klick
|
||||||
|
$versafire_swklick_bis_1000 = 0.15; // Cent pro Klick
|
||||||
|
$versafire_ausschussrate = 2;// in % von der Auflage
|
||||||
|
$versafire_stundenpreis = 2; // Euro pro Stunde
|
||||||
|
$versafire_fixer_ausschuss = 5; // in Stück
|
||||||
|
$versafire_ruest_grundzeit = 6; // in Min
|
||||||
|
$versafire_aufraeum_grundzeit = 3; // in Min
|
||||||
|
$versafire_seiten_pro_stunde = 6500; // Blatt pro Stunde
|
||||||
|
|
||||||
|
$bandarolieren_ruestgrundzeit = 1; // in Min
|
||||||
|
$bandarolieren_pro_stunde = 777; // Stück pro Stunde
|
||||||
|
$bandarolieren_stundenlohn = 40; // Euro pro Stunde
|
||||||
|
$bandarolieren_aufraeumgrundzeit = 0.5; // in Min
|
||||||
|
|
||||||
|
$vorschneiden_fixer_ausschuss = 2; // in Stück
|
||||||
|
$schneiden_fixer_ausschuss = 2; // in Stück
|
||||||
|
$offset_marge = 1.15; // als Faktor
|
||||||
|
$digital_marge = 1.00; // als Faktor
|
||||||
|
$offset_gummituch_waschen = 180; // Sekunden
|
||||||
|
$druckplattenkosten = 270; // Cent
|
||||||
|
$druckplattenkosten_extern = 280; // Cent
|
||||||
|
$mediengestalter_stundenpreis = 50; // Euro pro Stunde
|
||||||
|
$mediengestalter_komponenten_pro_stunde = 6; // Kompotenten pro Stunde
|
||||||
|
$mediengestalter_reduziert_komponenten_pro_stunde = 15; //Komponenten pro Stunde
|
||||||
|
$polar78_ruest_grundzeit = 1; // in Min
|
||||||
|
$polar78_ruest_pro_schnitt = 0.25; // in Min
|
||||||
|
$polar78_stundenlohn = 40; // Euro pro Stunde
|
||||||
|
$schnitte_pro_stunde = 120; // Schnitte pro Stunde
|
||||||
|
$polar78_aufraeum_grundzeit = 1; // in Min
|
||||||
|
$verpackungen_pro_stunde = 60; // Verpackungen pro Stunde
|
||||||
|
$versandmitarbeiter_pro_stunde = 40; // Euro pro Stunde
|
||||||
|
$umkarton_preis = 1.6; // Euro
|
||||||
|
$karton_preis = 0.693; // Euro
|
||||||
|
$karton_gewicht = 236; // in g
|
||||||
|
$karton_hoehe = 100; // in mm
|
||||||
|
$bohren_ruestgrundzeit = 7; // in Min
|
||||||
|
$bohren_aufraeumgrundzeit = 5; // in Min
|
||||||
|
$bohren_stundenlohn = 40; // Euro pro Stunde
|
||||||
|
$bohrungen_pro_stunde = 96; // Bohrungen pro Stunde
|
||||||
|
|
||||||
|
$horizon_ruestgrundzeit = 3; // in Min
|
||||||
|
$horizon_aufraeumgrundzeit = 3; // in Min
|
||||||
|
$horizon_boegen_pro_stunde = 2200; // Bögen pro Stunde
|
||||||
|
$horizon_stundenlohn = 55; // Euro pro Stunde
|
||||||
|
$rillen_und_falzen_fixer_ausschuss = 17; // in Stück
|
||||||
|
$rillen_und_falzen_ausschussrate = 1.2; // in Prozent
|
||||||
|
|
||||||
|
$boos_umkarton = 542; // in g, umfasst jeweils 2 normale Kartons
|
||||||
|
$boos_karton = 274; // in g, beinhaltet 5000x800g-Etikett oder 10000x300g
|
||||||
|
$boos_800_b = 326; // in mm
|
||||||
|
$boos_800_h = 107; // in mm
|
||||||
|
$boos_300_b = 326; // in mm
|
||||||
|
$boos_300_h = 38; // in mm
|
||||||
|
|
||||||
|
$makulatur_pro_farbe = 20; // in Stück
|
||||||
|
$sd_satz_marge = 1.00; // als Faktor: 1 + prozentuale Marge
|
||||||
|
$zusammentragen_pro_stunde = 4400; // Bögen pro Stunde
|
||||||
|
$zusammentragen_einlegen = 0.25; // in min
|
||||||
|
$farbwechsel_offset = 6; // in min
|
||||||
|
$bogen_pro_stunde_offset_sd = 10000; // Bogen/Stunde
|
||||||
|
$einrichtezeit_fuer_farbe_und_passer = 10; // in min
|
||||||
|
$gummituch_waschen = 5; // in min
|
||||||
|
|
||||||
|
$preis_pro_druckplatte = 2.7; // in EUR
|
||||||
|
$preis_pro_belichten = 5.58; // in EUR
|
||||||
|
|
||||||
|
$stundenpreis_verarbeitung = 40;
|
||||||
|
$stundenpreis_schneiden = 50;
|
||||||
|
$stundenpreis_offsetdruck = 80;
|
||||||
|
$stundenpreis_zusammentragen = 60;
|
||||||
|
|
||||||
|
$einlegehoehe_zusammentragen = 44;
|
||||||
|
$einlegehoehe_bohrmaschine = 50;
|
||||||
|
$einlegehoehe_schneidemaschine = 90; // in mm
|
||||||
|
|
||||||
|
$vor_und_nachbereitung_bohrmaschine = (($stundenpreis_verarbeitung / 60 ) * 7); // in EUR
|
||||||
|
$vor_und_nachbereitung_schneiden = (($stundenpreis_schneiden / 60 ) * 5);
|
||||||
|
$vor_und_nachbereitung_verarbeitung = (($stundenpreis_verarbeitung / 60 ) * 5);
|
||||||
|
$vor_und_nachbereitung_zusammentragen = (($stundenpreis_zusammentragen / 60 ) * 5);
|
||||||
|
|
||||||
|
// $kosten_pro_bohrung = (($stundenpreis_verarbeitung * ($Vabheftlochung$V / 2)) / 96);
|
||||||
|
$kosten_pro_schnitt = (($stundenpreis_schneiden / 60) / 2);
|
||||||
|
$leimen_und_trennen_pro_sd_satz = (($stundenpreis_verarbeitung / 60) / 100);
|
||||||
|
|
||||||
|
// Versandpreise
|
||||||
|
$dpd_bis_3kg = 4.95; // Euro
|
||||||
|
$dpd_bis_5kg = 5.50; // Euro
|
||||||
|
$dpd_bis_10kg = 6.30; // Euro
|
||||||
|
$dpd_bis_15kg = 6.95; // Euro
|
||||||
|
$dpd_bis_20kg = 7.20; // Euro
|
||||||
|
$dpd_bis_25kg = 7.60; // Euro
|
||||||
|
$dpd_bis_31kg = 8.00; // Euro
|
||||||
|
|
||||||
|
$paket_DHL_0_1_kg = 5.1; // Euro
|
||||||
|
$paket_DHL_1_3_kg = 5.6; // Euro
|
||||||
|
$paket_DHL_3_5_kg = 6.6; // Euro
|
||||||
|
$paket_DHL_5_10_kg = 8.7; // Euro
|
||||||
|
$paket_DHL_10_20_kg = 13.6; // Euro
|
||||||
|
$paket_DHL_20_31_kg = 16.2; // Euro
|
||||||
|
|
||||||
|
$speditionspreis_pro_kg = 5; // Euro
|
||||||
|
|
||||||
|
//express
|
||||||
|
$exp1=0.1;
|
||||||
|
$exp2=1.2;
|
||||||
|
|
||||||
|
|
||||||
|
// copyshop
|
||||||
|
$swst1=0.08/1.07;
|
||||||
|
$swst2=0.065/1.07;
|
||||||
|
$swst3=0.055/1.07;
|
||||||
|
$swst4=0.05/1.07;
|
||||||
|
$swst5=0.045/1.07;
|
||||||
|
$swst6=0.035/1.07;
|
||||||
|
$titeldruck=0.6/1.07;
|
||||||
|
$fst1=0.9/1.07;
|
||||||
|
$fst2=0.75/1.07;
|
||||||
|
$fst3=0.55/1.07;
|
||||||
|
$fst4=0.45/1.07;
|
||||||
|
$fst5=0.4/1.07;
|
||||||
|
$fst6=0.25/1.07;
|
||||||
|
$fswst1=0.2/1.07;
|
||||||
|
$fswst2=0.11/1.07;
|
||||||
|
$fswst3=0.10/1.07;
|
||||||
|
$fswst4=0.09/1.07;
|
||||||
|
$fswst5=0.08/1.07;
|
||||||
|
$fswst6=0.06/1.07;
|
||||||
|
$b100=3.3/1.07;
|
||||||
|
$b150=3.7/1.07;
|
||||||
|
$b200=4.3/1.07;
|
||||||
|
$b300=5.3/1.07;
|
||||||
|
$b300plus=6.3/1.07;
|
||||||
|
//shopende
|
||||||
|
//farbdrucke
|
||||||
|
$farbdruck1=0.80;
|
||||||
|
$farbdruck2=0.80*0.85;
|
||||||
|
$farbdruck3=0.80*0.75;
|
||||||
|
$farbdruck4=0.80*0.65;
|
||||||
|
$farbdruck5=0.80*0.55;
|
||||||
|
$farbdruck6=0.80*0.45;
|
||||||
|
$farbdruck7=0.80*0.37;
|
||||||
|
$farbdruck8=0.80*0.31;
|
||||||
|
$pauschale=30;
|
||||||
|
$posterpauschale=0;
|
||||||
|
$posterqm1=39.85/1.19;
|
||||||
|
$plakatpauschale=10;
|
||||||
|
$plakat140qm1=25;
|
||||||
|
$plakat160qm1=20;
|
||||||
|
$plakat80qm1=15;
|
||||||
|
$plakatA3=10;
|
||||||
|
$plakataffichenqm1=17.5;
|
||||||
|
|
||||||
|
$aufkleberqm=45;
|
||||||
|
$klebefolieqm=45;
|
||||||
|
$cutfolieqm=45;
|
||||||
|
$cuttransferqm=15;
|
||||||
|
$cutfoliepausch=25;
|
||||||
|
$solprotectqm=15;
|
||||||
|
$wallmountqm=60;
|
||||||
|
//banner
|
||||||
|
$bannerqm=40;
|
||||||
|
$meshqm=40;
|
||||||
|
$ppqm=40;
|
||||||
|
$blockoutqm=40;
|
||||||
|
|
||||||
|
$vkpauschale=17.5;
|
||||||
|
$laminieren=30;
|
||||||
|
|
||||||
|
//Flyer
|
||||||
|
$flyerschneiden=7.5;
|
||||||
|
$fflyerschneiden=8;
|
||||||
|
$flyer=20;
|
||||||
|
$fflyer=30;
|
||||||
|
$karten=20;
|
||||||
|
//$karten=35;
|
||||||
|
$fkarten=25;
|
||||||
|
$flyerklick=0.3;
|
||||||
|
$fflyerklick=0.3;
|
||||||
|
$fflyerfalten=0.01;
|
||||||
|
$fkarteklick=0.310;
|
||||||
|
$karteklick=0.25;
|
||||||
|
// Weihnachtskarten
|
||||||
|
|
||||||
|
$klick=0.5;
|
||||||
|
$visitenkarte=0.60;
|
||||||
|
$k3hs=50;
|
||||||
|
$k5hs=55;
|
||||||
|
$k10hs=65;
|
||||||
|
$k5fs=55;
|
||||||
|
$k10fs=59.9;
|
||||||
|
$kalu=89.99;
|
||||||
|
$cello=0.1;
|
||||||
|
$taschenlaminierena4=0.8;
|
||||||
|
$taschenlaminierena3=1.25;
|
||||||
|
$eckenrunden=0.01;
|
||||||
|
$eckenrundeneinrichten=5;
|
||||||
|
$nuten=12;
|
||||||
|
$nut=.12;
|
||||||
|
$nutgeschlossen=.18;
|
||||||
|
$schneiden=2.5;
|
||||||
|
$falten=0.01;
|
||||||
|
$MiniRolli3=21.99;
|
||||||
|
$MiniRolli4=16.99;
|
||||||
|
$ruestkosten=0;
|
||||||
|
$tbk=.60;
|
||||||
|
$tbkpauschale=30;
|
||||||
|
//plotten
|
||||||
|
$plotsw=3.95;
|
||||||
|
$plotfarbe=9.95;
|
||||||
|
$plotfarbefl=14.95;
|
||||||
|
|
||||||
|
//aufschlag
|
||||||
|
$aufschlag=1.5;
|
||||||
|
|
||||||
55
tests/Customer/KK/CalcTest.php
Normal file
55
tests/Customer/KK/CalcTest.php
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
namespace PSC\Library\Calc\Tests\Customer\KK;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use PSC\Library\Calc\Article;
|
||||||
|
use PSC\Library\Calc\Engine;
|
||||||
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
|
use PSC\Library\Calc\PaperContainer;
|
||||||
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
|
class CalcTest extends TestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var Engine */
|
||||||
|
protected $engine = null;
|
||||||
|
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
|
$paperContainer = new PaperContainer();
|
||||||
|
$paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . '/papierContainer.xml')));
|
||||||
|
|
||||||
|
$this->engine = new Engine();
|
||||||
|
$this->engine->setPaperContainer($paperContainer);
|
||||||
|
$this->engine->setPaperRepository($repository);
|
||||||
|
$this->engine->setFormulas(file_get_contents(__DIR__ . '/formels.txt'));
|
||||||
|
$this->engine->setParameters(file_get_contents(__DIR__ . '/parameters.txt'));
|
||||||
|
$this->engine->setTemplates(file_get_contents(__DIR__ . '/calcTemplates.xml'));
|
||||||
|
|
||||||
|
$this->engine->loadString(file_get_contents(__DIR__ . '/calc.xml'));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown(): void
|
||||||
|
{
|
||||||
|
$this->engine = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testDefault(): void
|
||||||
|
{
|
||||||
|
$this->engine->calc();
|
||||||
|
$this->assertSame(51.0, $this->engine->getPrice());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testCalcValue(): void
|
||||||
|
{
|
||||||
|
$this->engine->setVariable('auflage', 2000);
|
||||||
|
$this->engine->calc();
|
||||||
|
$this->assertSame(42.0, $this->engine->getPrice());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
83
tests/Customer/KK/calc.xml
Normal file
83
tests/Customer/KK/calc.xml
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<kalkulation>
|
||||||
|
<artikel>
|
||||||
|
<name>CalcValue</name>
|
||||||
|
<kommentar></kommentar>
|
||||||
|
|
||||||
|
<option id="auflage" name="Auflage" type="Input" default="500"></option>
|
||||||
|
|
||||||
|
<option id="set4" name="set4" type="Select" default="41">
|
||||||
|
<opt id="41" name="41">
|
||||||
|
<set3>
|
||||||
|
<grenze calc_value="41">31</grenze>
|
||||||
|
</set3>
|
||||||
|
</opt>
|
||||||
|
<opt id="42" name="42">
|
||||||
|
<set3>
|
||||||
|
<grenze calc_value="42">32</grenze>
|
||||||
|
</set3>
|
||||||
|
</opt>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
|
||||||
|
<option id="set3" name="set3" type="Select" default="31">
|
||||||
|
<opt id="31" name="31">
|
||||||
|
<set2>
|
||||||
|
<grenze calc_value="31">21</grenze>
|
||||||
|
</set2>
|
||||||
|
</opt>
|
||||||
|
<opt id="32" name="32">
|
||||||
|
<set2>
|
||||||
|
<grenze calc_value="32">22</grenze>
|
||||||
|
</set2>
|
||||||
|
</opt>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
|
||||||
|
<option id="set1" name="set1" type="Select" default="11">
|
||||||
|
<opt id="11" name="11">
|
||||||
|
<auflage>
|
||||||
|
<grenze calc_value="11">1-1000</grenze>
|
||||||
|
</auflage>
|
||||||
|
</opt>
|
||||||
|
<opt id="12" name="12">
|
||||||
|
<auflage>
|
||||||
|
<grenze calc_value="12">1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</opt>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="set2" name="set2" type="Select" default="21">
|
||||||
|
<opt id="21" name="21">
|
||||||
|
<set1>
|
||||||
|
<grenze calc_value="21">11</grenze>
|
||||||
|
</set1>
|
||||||
|
</opt>
|
||||||
|
<opt id="22" name="22">
|
||||||
|
<set1>
|
||||||
|
<grenze calc_value="22">12</grenze>
|
||||||
|
</set1>
|
||||||
|
</opt>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="set5" name="set5" type="Select" default="51">
|
||||||
|
<opt id="51" name="51">
|
||||||
|
<set4 formel="$CVset4_set3$CV">
|
||||||
|
<grenze calc_value_4="51">41</grenze>
|
||||||
|
</set4>
|
||||||
|
</opt>
|
||||||
|
<opt id="52" name="52">
|
||||||
|
<set4 formel="$CVset4_set3$CV">
|
||||||
|
<grenze calc_value_4="$CVset4_set3$CV">42</grenze>
|
||||||
|
</set4>
|
||||||
|
</opt>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
|
||||||
|
<option type="hidden" name="calc" id="calc">
|
||||||
|
<auflage>
|
||||||
|
<grenze formel="$CVset5_set4_4$CV">1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</option>
|
||||||
|
</artikel>
|
||||||
|
</kalkulation>
|
||||||
2
tests/Customer/KK/calcTemplates.xml
Normal file
2
tests/Customer/KK/calcTemplates.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<root>
|
||||||
|
</root>
|
||||||
1
tests/Customer/KK/formels.txt
Normal file
1
tests/Customer/KK/formels.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
3
tests/Customer/KK/papierContainer.xml
Normal file
3
tests/Customer/KK/papierContainer.xml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<container>
|
||||||
|
</container>
|
||||||
1
tests/Customer/KK/parameters.txt
Normal file
1
tests/Customer/KK/parameters.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
65
tests/Customer/LL/CalcTest.php
Normal file
65
tests/Customer/LL/CalcTest.php
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
namespace PSC\Library\Calc\Tests\Customer\LL;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use PSC\Library\Calc\Article;
|
||||||
|
use PSC\Library\Calc\Engine;
|
||||||
|
use PSC\Library\Calc\Option\Type\Select;
|
||||||
|
use PSC\Library\Calc\PaperContainer;
|
||||||
|
use PSC\Library\Calc\Tests\Mock\PaperRepostory;
|
||||||
|
|
||||||
|
class CalcTest extends TestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var Engine */
|
||||||
|
protected $engine = null;
|
||||||
|
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
|
$repository = new PaperRepostory();
|
||||||
|
|
||||||
|
$paperContainer = new PaperContainer();
|
||||||
|
$paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . '/papierContainer.xml')));
|
||||||
|
|
||||||
|
$this->engine = new Engine();
|
||||||
|
$this->engine->setPaperContainer($paperContainer);
|
||||||
|
$this->engine->setPaperRepository($repository);
|
||||||
|
$this->engine->setFormulas(file_get_contents(__DIR__ . '/formels.txt'));
|
||||||
|
$this->engine->setParameters(file_get_contents(__DIR__ . '/parameters.txt'));
|
||||||
|
$this->engine->setTemplates(file_get_contents(__DIR__ . '/calcTemplates.xml'));
|
||||||
|
|
||||||
|
$this->engine->loadString(file_get_contents(__DIR__ . '/calc.xml'));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown(): void
|
||||||
|
{
|
||||||
|
$this->engine = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tesDefault(): void
|
||||||
|
{
|
||||||
|
$this->engine->calc();
|
||||||
|
$this->assertSame("11", $this->engine->getArticle()->getOptionById('set1')->getSelectedOption()->getId());
|
||||||
|
$this->assertSame("21", $this->engine->getArticle()->getOptionById('set2')->getSelectedOption()->getId());
|
||||||
|
$this->assertSame("31", $this->engine->getArticle()->getOptionById('set3')->getSelectedOption()->getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testChangeDefault(): void
|
||||||
|
{
|
||||||
|
$this->engine->calc();
|
||||||
|
$this->assertSame("11", $this->engine->getArticle()->getOptionById('set1')->getSelectedOption()->getId());
|
||||||
|
$this->assertSame("21", $this->engine->getArticle()->getOptionById('set2')->getSelectedOption()->getId());
|
||||||
|
$this->assertSame("31", $this->engine->getArticle()->getOptionById('set3')->getSelectedOption()->getId());
|
||||||
|
$this->assertSame("41", $this->engine->getArticle()->getOptionById('set4')->getSelectedOption()->getId());
|
||||||
|
$this->engine->setVariable('auflage', 2000);
|
||||||
|
$this->engine->calc();
|
||||||
|
$this->assertSame("12", $this->engine->getArticle()->getOptionById('set1')->getSelectedOption()->getId());
|
||||||
|
$this->assertSame("22", $this->engine->getArticle()->getOptionById('set2')->getSelectedOption()->getId());
|
||||||
|
$this->assertSame("32", $this->engine->getArticle()->getOptionById('set3')->getSelectedOption()->getId());
|
||||||
|
$this->assertSame("42", $this->engine->getArticle()->getOptionById('set4')->getSelectedOption()->getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
65
tests/Customer/LL/calc.xml
Normal file
65
tests/Customer/LL/calc.xml
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<kalkulation>
|
||||||
|
<artikel>
|
||||||
|
<name>SD-Satz</name>
|
||||||
|
<kommentar></kommentar>
|
||||||
|
|
||||||
|
<option id="auflage" name="Auflage" type="Input" default="500"></option>
|
||||||
|
|
||||||
|
<option id="set4" name="set4" type="Select" default="41">
|
||||||
|
<opt id="41" name="41">
|
||||||
|
<set3>
|
||||||
|
<grenze>31</grenze>
|
||||||
|
</set3>
|
||||||
|
</opt>
|
||||||
|
<opt id="42" name="42">
|
||||||
|
<set3>
|
||||||
|
<grenze>32</grenze>
|
||||||
|
</set3>
|
||||||
|
</opt>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
|
||||||
|
<option id="set3" name="set3" type="Select" default="31">
|
||||||
|
<opt id="31" name="31">
|
||||||
|
<set2>
|
||||||
|
<grenze>21</grenze>
|
||||||
|
</set2>
|
||||||
|
</opt>
|
||||||
|
<opt id="32" name="32">
|
||||||
|
<set2>
|
||||||
|
<grenze>22</grenze>
|
||||||
|
</set2>
|
||||||
|
</opt>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
|
||||||
|
<option id="set1" name="set1" type="Select" default="11">
|
||||||
|
<opt id="11" name="11">
|
||||||
|
<auflage>
|
||||||
|
<grenze>1-1000</grenze>
|
||||||
|
</auflage>
|
||||||
|
</opt>
|
||||||
|
<opt id="12" name="12">
|
||||||
|
<auflage>
|
||||||
|
<grenze>1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</opt>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="set2" name="set2" type="Select" default="21">
|
||||||
|
<opt id="21" name="21">
|
||||||
|
<set1>
|
||||||
|
<grenze>11</grenze>
|
||||||
|
</set1>
|
||||||
|
</opt>
|
||||||
|
<opt id="22" name="22">
|
||||||
|
<set1>
|
||||||
|
<grenze>12</grenze>
|
||||||
|
</set1>
|
||||||
|
</opt>
|
||||||
|
</option>
|
||||||
|
|
||||||
|
|
||||||
|
</artikel>
|
||||||
|
</kalkulation>
|
||||||
2
tests/Customer/LL/calcTemplates.xml
Normal file
2
tests/Customer/LL/calcTemplates.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<root>
|
||||||
|
</root>
|
||||||
1
tests/Customer/LL/formels.txt
Normal file
1
tests/Customer/LL/formels.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
3
tests/Customer/LL/papierContainer.xml
Normal file
3
tests/Customer/LL/papierContainer.xml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<container>
|
||||||
|
</container>
|
||||||
1
tests/Customer/LL/parameters.txt
Normal file
1
tests/Customer/LL/parameters.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
@ -45,6 +45,7 @@ class CalcTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->engine->setVariable('produktart_nopresentationpdf', 61);
|
$this->engine->setVariable('produktart_nopresentationpdf', 61);
|
||||||
$this->engine->calc();
|
$this->engine->calc();
|
||||||
|
// file_put_contents("/tmp/t1.txt", print_r($this->engine->getDebugCalcVariables(),true).print_r($this->engine->getDebugCalcFormel(),true));
|
||||||
self::assertSame(199.6, $this->engine->getPrice());
|
self::assertSame(199.6, $this->engine->getPrice());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -415,6 +415,17 @@ class PaperRepostory implements ObjectRepository
|
|||||||
$papier['927996']->setDescription1('57g/m² CF, weiss');
|
$papier['927996']->setDescription1('57g/m² CF, weiss');
|
||||||
$papier['927996']->setDescription2('57g/m² CF, weiss');
|
$papier['927996']->setDescription2('57g/m² CF, weiss');
|
||||||
|
|
||||||
|
$papier['621995'] = new Paper();
|
||||||
|
$papier['621995']->setArtNr('621995');
|
||||||
|
$papier['621995']->setGrammatur('80');
|
||||||
|
$papier['621995']->setPreis('16.93');
|
||||||
|
$papier['621995']->setVolume(1);
|
||||||
|
$papier['621995']->setBreite(450);
|
||||||
|
$papier['621995']->setLaenge(320);
|
||||||
|
$papier['621995']->setStaerke(80);
|
||||||
|
$papier['621995']->setDescription1('80 g/m², Preprint, weiss');
|
||||||
|
$papier['621995']->setDescription2('80 g/m², Preprint, weiss');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $papier[$criteria['artNr']];
|
return $papier[$criteria['artNr']];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user