@extends('layouts.app') @section('content')
@if(session('status'))
{{session('status')}}
@endif @if(session('error'))
{{session('error')}}
@endif

@if (json_decode(Auth::user()->permisos)->puede_visualizar_gastos == 'on') @if($gastos->count() > 0)
@foreach($gastos as $gasto) @endforeach
ID Valor Caja Tipo Usuario Fecha ID cierre Acciones
#{{$gasto->id}} $ {{number_format($gasto->valor)}} {{$gasto->caja->nombre}} {{$gasto->tipo->titulo}}
{{$gasto->user->name}}
{{date_format(date_create($gasto->created_at),'d/m/Y h:i A')}} @if($gasto->id_cierre != null) #{{$gasto->id_cierre}} @else N/A @endif
@if (json_decode(Auth::user()->permisos)->puede_eliminar_gastos == 'on') @if($gasto->id_cierre == null && Auth::user()->id == $gasto->id_user) @endif @endif
{{$gastos->appends(['search' => $search])->links()}}
@else
No hay gastos registrados.

Registrar mi primer gasto
@endif @else
No puedes ver esta información.

@endif
@endsection @section('scripts') @endsection