31 lines
777 B
PHP
31 lines
777 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class VentumStoreRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'fecha' => ['required'],
|
|
'cliente_id' => ['nullable', 'integer', 'exists:clientes,id'],
|
|
'total' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
|
'tipo_pago' => ['required', 'in:Efectivo,Tarjeta,Transferencia'],
|
|
'estado' => ['required', 'in:Pagado,Pendiente,Anulado'],
|
|
];
|
|
}
|
|
}
|