@extends('layouts.admin') @section('content')
CAJA INDEPENDIENTE
@php $t_e=0; $t_s=0; @endphp @foreach ($data as $d) @php if ($d->tipo === 'ENTRADA') { $t_e += $d->valor; } if ($d->tipo === 'SALIDA') { $t_s += $d->valor; } @endphp @endforeach
Tipo Descripcion Valor Fecha
{{$d->tipo}} {{$d->descripcion}} {{$d->valor}} {{$d->created_at}}
@csrf @method('DELETE') @can('delete-caja-independiente') @endcan

TOTAL ENTRADAS: Q. {{number_format($t_e, 2)}}

TOTAL SALIDAS: Q. {{number_format($t_s, 2)}}

@endsection