Show associated part for PartLots in log target column.

This commit is contained in:
Jan Böhmer 2020-03-28 18:50:16 +01:00
parent 9035d97996
commit 71fa827784

View file

@ -47,6 +47,7 @@ use App\Entity\Base\AbstractDBElement;
use App\Entity\Base\AbstractNamedDBElement;
use App\Entity\LogSystem\AbstractLogEntry;
use App\Entity\Parameters\AbstractParameter;
use App\Entity\Parts\PartLot;
use App\Entity\PriceInformations\Orderdetail;
use App\Entity\PriceInformations\Pricedetail;
use App\Exceptions\EntityNotSupportedException;
@ -128,6 +129,8 @@ class LogEntryTargetColumn extends AbstractColumn
$on = $target->getElement();
} elseif ($target instanceof AbstractParameter && $target->getElement() !== null) {
$on = $target->getElement();
} elseif ($target instanceof PartLot && $target->getPart() !== null) {
$on = $target->getPart();
} elseif ($target instanceof Orderdetail && $target->getPart() !== null) {
$on = $target->getPart();
} elseif ($target instanceof Pricedetail && $target->getOrderdetail() !== null && $target->getOrderdetail()->getPart() !== null) {