up
This commit is contained in:
@@ -29,12 +29,8 @@ class EditTintoreria extends EditRecord
|
||||
->maxValue(fn () => $this->getRecord()->faltantes ?? 0)
|
||||
->helperText(fn () => 'Máximo: ' . ($this->getRecord()->faltantes ?? 0))
|
||||
->default(fn () => $this->getRecord()->faltantes ?? 0),
|
||||
Forms\Components\TextInput::make('prendas_defectuosas')
|
||||
->numeric()
|
||||
->minValue(0)
|
||||
->maxValue(fn ($get) => (int) ($get('cantidad') ?? 0))
|
||||
->helperText('Opcional. Se restará del total recibido.'),
|
||||
Forms\Components\Textarea::make('notas'),
|
||||
Forms\Components\Textarea::make('notas')
|
||||
->helperText('Si hay prendas defectuosas, regístralas en la pestaña Reprocesos'),
|
||||
])
|
||||
->action(function (array $data): void {
|
||||
$record = $this->getRecord();
|
||||
@@ -44,7 +40,7 @@ class EditTintoreria extends EditRecord
|
||||
'referencia_type' => \App\Models\Tintoreria::class,
|
||||
'referencia_id' => $record->id,
|
||||
'cantidad' => (int) $data['cantidad'],
|
||||
'prendas_defectuosas' => (int) ($data['prendas_defectuosas'] ?? 0),
|
||||
'prendas_defectuosas' => 0,
|
||||
'fecha_recepcion' => $data['fecha_recepcion'],
|
||||
'notas' => $data['notas'] ?? null,
|
||||
]);
|
||||
|
||||
+2
-9
@@ -30,14 +30,8 @@ class RecepcionesRelationManager extends RelationManager
|
||||
->maxValue(fn () => $this->getOwnerRecord()?->faltantes ?? 0)
|
||||
->helperText(fn () => 'Máximo: ' . ($this->getOwnerRecord()?->faltantes ?? 0)),
|
||||
|
||||
TextInput::make('prendas_defectuosas')
|
||||
->label('Faltantes')
|
||||
->numeric()
|
||||
->minValue(0)
|
||||
->maxValue(fn ($get) => (int) ($get('cantidad') ?? 0))
|
||||
->helperText('Opcional. Se restará del total recibido.'),
|
||||
|
||||
Textarea::make('notas'),
|
||||
Textarea::make('notas')
|
||||
->helperText('Si hay prendas defectuosas, regístralas en la pestaña Reprocesos'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -48,7 +42,6 @@ class RecepcionesRelationManager extends RelationManager
|
||||
TextColumn::make('id')->label('#'),
|
||||
TextColumn::make('fecha_recepcion')->dateTime()->label('Fecha'),
|
||||
TextColumn::make('cantidad')->label('Cantidad'),
|
||||
TextColumn::make('prendas_defectuosas')->label('Faltantes'),
|
||||
TextColumn::make('usuario.name')->label('Usuario'),
|
||||
TextColumn::make('notas')->limit(50)->wrap(),
|
||||
TextColumn::make('created_at')->dateTime()->label('Creado'),
|
||||
|
||||
Reference in New Issue
Block a user