Update ConfeccionResource.php
This commit is contained in:
@@ -81,21 +81,6 @@ class ConfeccionResource extends Resource
|
||||
$set('total_pagar', $cantidad && $valor ? $cantidad * $valor : 0);
|
||||
}),
|
||||
|
||||
DatePicker::make('fecha_recepcion'),
|
||||
|
||||
TextInput::make('cantidad_recibida')
|
||||
->numeric()
|
||||
->reactive()
|
||||
->afterStateUpdated(function ($state, $set, $get) {
|
||||
$valor = $get('valor_por_prenda') ?? 0;
|
||||
$cantidad = $state ?? $get('cantidad_enviada');
|
||||
$set('total_pagar', $cantidad && $valor ? $cantidad * $valor : 0);
|
||||
}),
|
||||
|
||||
TextInput::make('prendas_defectuosas')
|
||||
->numeric()
|
||||
->default(0),
|
||||
|
||||
TextInput::make('valor_por_prenda')
|
||||
->numeric()
|
||||
->prefix('$')
|
||||
@@ -113,6 +98,27 @@ class ConfeccionResource extends Resource
|
||||
->default(0),
|
||||
])
|
||||
->columns(2),
|
||||
|
||||
Section::make('Recepción y Calidad')
|
||||
->description('Campos que se diligencian al recibir la confección en el taller o bodega')
|
||||
->schema([
|
||||
DatePicker::make('fecha_recepcion'),
|
||||
|
||||
TextInput::make('cantidad_recibida')
|
||||
->numeric()
|
||||
->reactive()
|
||||
->afterStateUpdated(function ($state, $set, $get) {
|
||||
$valor = $get('valor_por_prenda') ?? 0;
|
||||
$cantidad = $state ?? $get('cantidad_enviada');
|
||||
$set('total_pagar', $cantidad && $valor ? $cantidad * $valor : 0);
|
||||
}),
|
||||
|
||||
TextInput::make('prendas_defectuosas')
|
||||
->numeric()
|
||||
->default(0),
|
||||
])
|
||||
->columns(2)
|
||||
->collapsed(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user