This commit is contained in:
lizandrogd
2026-01-19 19:59:24 -05:00
parent 6dc472b8b7
commit 1eb41c5725
3 changed files with 46 additions and 15 deletions
@@ -23,7 +23,12 @@ class RecepcionesRelationManager extends RelationManager
{
return $form->schema([
DateTimePicker::make('fecha_recepcion')->required(),
TextInput::make('cantidad')->numeric()->required()->minValue(1),
TextInput::make('cantidad')
->numeric()
->required()
->minValue(1)
->maxValue(fn () => $this->getOwnerRecord()?->faltantes ?? 0)
->helperText(fn () => 'Máximo: ' . ($this->getOwnerRecord()?->faltantes ?? 0)),
Textarea::make('notas'),
]);
}