Fix Calc
This commit is contained in:
parent
1a379d8ffd
commit
f2bf130ab6
@ -113,6 +113,16 @@ class Valid
|
||||
$valid = true;
|
||||
}
|
||||
}
|
||||
|
||||
if($nextShouldBeValid) {
|
||||
foreach($option->getOptions() as $opt) {
|
||||
if($opt->isValid()) {
|
||||
$opt->setIsSelected(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$option->processValue();
|
||||
$option->setIsValid($valid);
|
||||
|
||||
|
||||
@ -55,4 +55,14 @@ class CalcTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
public function testCalcPriceDefaultChangeSecound(): void
|
||||
{
|
||||
$this->engine->setVariable('print', '885731');
|
||||
$this->assertSame(50.29, $this->engine->getPrice());
|
||||
$this->engine->setVariable('print', '885731');
|
||||
$this->engine->setVariable('auflage', '40329547');
|
||||
$this->assertSame(276.48, $this->engine->getPrice());
|
||||
$this->engine->setVariable('print', '885730');
|
||||
$this->assertSame(11.22, $this->engine->getPrice());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user