@extends('layouts.app') @section('title', 'Gastos') @section('content')

Gastos

@if($cajaAbierta) @else Abre tu caja primero @endif
@if(session('success')) @endif
@foreach($gastos as $item)
{{ $item->fecha }}
{{ $item->concepto->nombre ?? 'Sin concepto' }}
Gs. {{ number_format($item->total, 0, ',', '.') }}

{{ $item->descripcion }}

@if($item->detalles->count() > 0) {{ $item->detalles->first()->cuenta->denominacion ?? 'Cuenta' }} @else Sin cuenta @endif
@if($item->anulado != 'SI') @php $det = $item->detalles->first(); @endphp
@csrf @method('DELETE')
@else ANULADO @endif
@endforeach
@endsection