commit compras 2711
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-27 13:49:31 +02:00
parent dc73540558
commit e709d900d1
81 changed files with 5352 additions and 107 deletions
+3
View File
@@ -170,6 +170,9 @@ class SupplyPlanning
$order = isset($data['purchase_order_id']) ? PurchaseOrder::query()->whereKey($data['purchase_order_id'])->firstOrFail() : null;
if ($order !== null) {
app(OrderCancellationWorkflow::class)->assertOperational($order);
if ($kind === 'import' && in_array($action, ['transit', 'release'], true)) {
app(ImportParties::class)->assertCurrent($actor, $order, $old->record_key);
}
}
if (in_array($kind, ['agreement', 'contract'], true) && $state === 'approved') {
$this->check($supplier !== null && $supplier->eligible(), 'supplier_id', 'O fornecedor deve estar activo e com revisão documental vigente.');