fix double slack notification
This commit is contained in:
parent
0bc2024494
commit
fb293a6b9a
@ -110,11 +110,14 @@ class SlackNotifySubscriber implements EventSubscriberInterface
|
|||||||
if ($stock) {
|
if ($stock) {
|
||||||
$prio = 0;
|
$prio = 0;
|
||||||
foreach ($stock as $item) {
|
foreach ($stock as $item) {
|
||||||
$w = $this->warehouseRepository->findOneBy(['id' => $item->getWarehouse()->getId()]);
|
//Nur wenn Bestand vorhanden
|
||||||
|
if ($item->getInstock() > 0) {
|
||||||
|
$w = $this->warehouseRepository->findOneBy(['id' => $item->getWarehouse()->getId()]);
|
||||||
|
|
||||||
if ($w->getPrio() > $prio) {
|
if ($w->getPrio() > $prio) {
|
||||||
$warehouse = $w->getName();
|
$warehouse = $w->getName();
|
||||||
$prio = $w->getPrio();
|
$prio = $w->getPrio();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user