up
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CajaStoreRequest 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 [
|
||||
'monto_inicial' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'monto_final' => ['nullable', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'fecha_apertura' => ['required'],
|
||||
'fecha_cierre' => ['nullable'],
|
||||
'estado' => ['required', 'in:Abierta,Cerrada'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CajaUpdateRequest 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 [
|
||||
'monto_inicial' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'monto_final' => ['nullable', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'fecha_apertura' => ['required'],
|
||||
'fecha_cierre' => ['nullable'],
|
||||
'estado' => ['required', 'in:Abierta,Cerrada'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CategoriumStoreRequest 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 [
|
||||
'nombre' => ['required', 'string', 'max:255'],
|
||||
'descripcion' => ['nullable', 'string'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CategoriumUpdateRequest 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 [
|
||||
'nombre' => ['required', 'string', 'max:255'],
|
||||
'descripcion' => ['nullable', 'string'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ClienteStoreRequest 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 [
|
||||
'nombre' => ['required', 'string', 'max:255'],
|
||||
'correo' => ['nullable', 'string', 'max:255', 'unique:clientes,correo'],
|
||||
'telefono' => ['nullable', 'string', 'max:20'],
|
||||
'direccion' => ['nullable', 'string'],
|
||||
'tipo_documento' => ['required', 'in:DNI,RUC,PASAPORTE'],
|
||||
'numero_documento' => ['required', 'string', 'max:20', 'unique:clientes,numero_documento'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ClienteUpdateRequest 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 [
|
||||
'nombre' => ['required', 'string', 'max:255'],
|
||||
'correo' => ['nullable', 'string', 'max:255', 'unique:clientes,correo'],
|
||||
'telefono' => ['nullable', 'string', 'max:20'],
|
||||
'direccion' => ['nullable', 'string'],
|
||||
'tipo_documento' => ['required', 'in:DNI,RUC,PASAPORTE'],
|
||||
'numero_documento' => ['required', 'string', 'max:20', 'unique:clientes,numero_documento'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CompraStoreRequest 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'],
|
||||
'proveedor_id' => ['nullable', 'integer', 'exists:proveedores,id'],
|
||||
'total' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'estado' => ['required', 'in:Recibida,Pendiente,Anulada'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CompraUpdateRequest 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'],
|
||||
'proveedor_id' => ['nullable', 'integer', 'exists:proveedores,id'],
|
||||
'total' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'estado' => ['required', 'in:Recibida,Pendiente,Anulada'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class DetalleCompraStoreRequest 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 [
|
||||
'compra_id' => ['required', 'integer', 'exists:compras,id'],
|
||||
'producto_id' => ['required', 'integer', 'exists:productos,id'],
|
||||
'cantidad' => ['required', 'integer'],
|
||||
'precio_unitario' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'subtotal' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class DetalleCompraUpdateRequest 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 [
|
||||
'compra_id' => ['required', 'integer', 'exists:compras,id'],
|
||||
'producto_id' => ['required', 'integer', 'exists:productos,id'],
|
||||
'cantidad' => ['required', 'integer'],
|
||||
'precio_unitario' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'subtotal' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class DetalleVentumStoreRequest 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 [
|
||||
'venta_id' => ['required', 'integer', 'exists:ventas,id'],
|
||||
'producto_id' => ['required', 'integer', 'exists:productos,id'],
|
||||
'cantidad' => ['required', 'integer'],
|
||||
'precio_unitario' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'subtotal' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class DetalleVentumUpdateRequest 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 [
|
||||
'venta_id' => ['required', 'integer', 'exists:ventas,id'],
|
||||
'producto_id' => ['required', 'integer', 'exists:productos,id'],
|
||||
'cantidad' => ['required', 'integer'],
|
||||
'precio_unitario' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'subtotal' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class InventarioStoreRequest 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 [
|
||||
'producto_id' => ['required', 'integer', 'exists:productos,id'],
|
||||
'stock_actual' => ['required', 'integer'],
|
||||
'stock_minimo' => ['required', 'integer'],
|
||||
'ubicacion' => ['nullable', 'string', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class InventarioUpdateRequest 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 [
|
||||
'producto_id' => ['required', 'integer', 'exists:productos,id'],
|
||||
'stock_actual' => ['required', 'integer'],
|
||||
'stock_minimo' => ['required', 'integer'],
|
||||
'ubicacion' => ['nullable', 'string', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class MovimientoCajaStoreRequest 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 [
|
||||
'caja_id' => ['required', 'integer', 'exists:cajas,id'],
|
||||
'tipo' => ['required', 'in:Ingreso,Egreso'],
|
||||
'monto' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'descripcion' => ['nullable', 'string'],
|
||||
'fecha' => ['required'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class MovimientoCajaUpdateRequest 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 [
|
||||
'caja_id' => ['required', 'integer', 'exists:cajas,id'],
|
||||
'tipo' => ['required', 'in:Ingreso,Egreso'],
|
||||
'monto' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'descripcion' => ['nullable', 'string'],
|
||||
'fecha' => ['required'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ProductoStoreRequest 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 [
|
||||
'nombre' => ['required', 'string', 'max:255'],
|
||||
'descripcion' => ['nullable', 'string'],
|
||||
'codigo_barras' => ['required', 'string', 'max:50', 'unique:productos,codigo_barras'],
|
||||
'precio_compra' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'precio_venta' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'stock' => ['required', 'integer'],
|
||||
'categoria_id' => ['required', 'integer', 'exists:categorias,id'],
|
||||
'estado' => ['required', 'in:activo,inactivo'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ProductoUpdateRequest 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 [
|
||||
'nombre' => ['required', 'string', 'max:255'],
|
||||
'descripcion' => ['nullable', 'string'],
|
||||
'codigo_barras' => ['required', 'string', 'max:50', 'unique:productos,codigo_barras'],
|
||||
'precio_compra' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'precio_venta' => ['required', 'numeric', 'between:-99999999.99,99999999.99'],
|
||||
'stock' => ['required', 'integer'],
|
||||
'categoria_id' => ['required', 'integer', 'exists:categorias,id'],
|
||||
'estado' => ['required', 'in:activo,inactivo'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ProveedorStoreRequest 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 [
|
||||
'nombre' => ['required', 'string', 'max:255'],
|
||||
'contacto' => ['nullable', 'string', 'max:255'],
|
||||
'telefono' => ['nullable', 'string', 'max:20'],
|
||||
'correo' => ['nullable', 'string', 'max:255', 'unique:proveedors,correo'],
|
||||
'direccion' => ['nullable', 'string'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ProveedorUpdateRequest 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 [
|
||||
'nombre' => ['required', 'string', 'max:255'],
|
||||
'contacto' => ['nullable', 'string', 'max:255'],
|
||||
'telefono' => ['nullable', 'string', 'max:20'],
|
||||
'correo' => ['nullable', 'string', 'max:255', 'unique:proveedors,correo'],
|
||||
'direccion' => ['nullable', 'string'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SettingStoreRequest 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 [
|
||||
'logo' => ['nullable', 'string'],
|
||||
'description' => ['nullable', 'string'],
|
||||
'primary_color' => ['nullable', 'string'],
|
||||
'secondary_color' => ['nullable', 'string'],
|
||||
'created_at' => ['nullable'],
|
||||
'updated_at' => ['nullable'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SettingUpdateRequest 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 [
|
||||
'logo' => ['nullable', 'string'],
|
||||
'description' => ['nullable', 'string'],
|
||||
'primary_color' => ['nullable', 'string'],
|
||||
'secondary_color' => ['nullable', 'string'],
|
||||
'created_at' => ['nullable'],
|
||||
'updated_at' => ['nullable'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class VentumUpdateRequest 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'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user