This commit is contained in:
2026-11-03 11:51:44 +02:00
parent badaada043
commit e753f7a0a4
309 changed files with 14537 additions and 529 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ class AutomaticPurchases
public function canReview(User $actor, SupplyRecord $rule, string $action = 'approve'): bool
{
if ($actor->tenant_id !== $rule->tenant_id || $rule->kind !== 'auto_rule' || ! in_array($action, ['approve', 'suspend'], true)
if (! $this->ready() || $actor->tenant_id !== $rule->tenant_id || $rule->kind !== 'auto_rule' || ! in_array($action, ['approve', 'suspend'], true)
|| ! app(SupplyPlanning::class)->allows($actor, 'supply_review')) {
return false;
}