mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for inventory notifications
This commit is contained in:
parent
a963fe1aee
commit
6a60c89b38
@ -80,9 +80,9 @@ class AdjustProductInventory implements ShouldQueue
|
|||||||
$p->in_stock_quantity -= $item->quantity;
|
$p->in_stock_quantity -= $item->quantity;
|
||||||
$p->saveQuietly();
|
$p->saveQuietly();
|
||||||
|
|
||||||
if ($p->stock_notification_threshold && $p->in_stock_quantity <= $p->stock_notification_threshold) {
|
if ($this->company->stock_notification && $p->stock_notification && $p->stock_notification_threshold && $p->in_stock_quantity <= $p->stock_notification_threshold) {
|
||||||
$this->notifyStockLevels($p, 'product');
|
$this->notifyStockLevels($p, 'product');
|
||||||
} elseif ($this->company->stock_notification_threshold && $p->in_stock_quantity <= $this->company->stock_notification_threshold) {
|
} elseif ($this->company->stock_notification && $p->stock_notification && $this->company->inventory_notification_threshold && $p->in_stock_quantity <= $this->company->inventory_notification_threshold) {
|
||||||
$this->notifyStocklevels($p, 'company');
|
$this->notifyStocklevels($p, 'company');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user