@@ -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.');
|
||||
|
||||
Reference in New Issue
Block a user