commit melhorias compras3
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-22 10:56:58 +02:00
parent 4fac443dda
commit efd97e265b
130 changed files with 8917 additions and 363 deletions
+3
View File
@@ -103,6 +103,9 @@ final class InternalRequisitionPort implements RequisitionPort
public function policy(array $record): array
{
$r = $this->model($record['id']);
if ($r->getAttribute('draft_input') !== null || $r->getAttribute('cost_center_id') === null || $r->needed_by === null || $r->subtotal_minor === null || $r->total_minor === null) {
throw ValidationException::withMessages(['submission' => 'Complete os campos e as linhas do rascunho antes de submeter. Não foram criadas aprovações ou reservas.']);
}
if ($this->actor->department_id !== $r->department_id) {
throw ValidationException::withMessages(['submission' => 'O departamento do solicitante mudou. Reveja o rascunho e o centro de custo antes de submeter.']);
}