Implementa regras de investimento por empresa com dupla aprovacao
This commit is contained in:
@@ -134,7 +134,7 @@ class ReceiptWorkflow
|
||||
throw ValidationException::withMessages(['items' => 'Descreva as reservas, danos ou divergências de qualidade.']);
|
||||
}
|
||||
$stockItem = ! empty($input['stock_item_id']) ? StockItem::query()->lockForUpdate()->findOrFail($input['stock_item_id']) : null;
|
||||
$physical = in_array($source->purchase_type, ['consumable', 'other', 'spare_part']);
|
||||
$physical = in_array($source->purchase_type, ['consumable', 'other', 'spare_part', 'equipment']);
|
||||
if ($source->purchase_type === 'spare_part') {
|
||||
if (! $source->spare_part_id || ! $source->equipment_id) {
|
||||
throw ValidationException::withMessages(['items' => 'Peça sem associação autorizada na ordem. A recepção está bloqueada.']);
|
||||
|
||||
Reference in New Issue
Block a user