@extends('layouts.backend.template') @section('content')

Balance de Comprobante de Egreso

Esto será llevado a PDF

Detalle del balance

@php $debitTotals = 0; $creditTotals = 0; $noRepeatPucs = []; @endphp @foreach($pucs as $key => $puc) @foreach ($ascendingPucs[$puc] as $index => $ascendingPuc) @if (!in_array($ascendingPuc, $noRepeatPucs) and !in_array($puc, $noRepeatPucs)) @php array_push($noRepeatPucs, $ascendingPuc); @endphp @endif @endforeach @php $debitTotals += $debits[$puc]; $creditTotals += $credits[$puc]; $finalBalance = $credits[$puc] - $debits[$puc] - $initialBalance; array_push($noRepeatPucs, $puc); @endphp @endforeach
Código Nombre Cuenta Saldo Inicial Débitos Créditos Saldo Final
{!! $ascendingPuc !!} {!! $ascendingDescriptions[$puc][$index] !!} -- -- -- --
{!! $puc !!} {!! $descriptions[$puc] !!} {!! number_format($initialBalance, 2, ",", ".") !!} {!! number_format($debits[$puc], 2, ",", ".") !!} {!! number_format($credits[$puc], 2, ",", ".") !!} {!! number_format($finalBalance, 2, ",", ".") !!}
Totales -- {!! number_format($debitTotals, 2, ",", ".") !!} {!! number_format($creditTotals, 2, ",", ".") !!} --
@endsection