Fecha de elaboración: {{ \Carbon\Carbon::parse($createdAt)->format("d/m/Y") }}
@php $debitTotals = 0; $creditTotals = 0; $finalTotals = 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 = $initialBalance - $credits[$puc] + $debits[$puc]; // $finalTotals += $finalBalance; array_push($noRepeatPucs, $puc); @endphp @php if ($key < count($pucs) - 1) { $initialBalance = $finalBalance; } @endphp @endforeach
Codigo Nombre Cuenta Saldo Inicial Debitos Creditos Saldo Final
{!! $ascendingPuc !!} {!! $ascendingDescriptions[$puc][$index] !!}
{!! $puc !!} {!! $descriptions[$puc] !!} {!! number_format($initialBalance, 2, ",", ".") !!} {!! $debits[$puc] > 0 ? number_format($debits[$puc], 2, ",", ".") : "--" !!} {!! $credits[$puc] > 0 ? number_format($credits[$puc], 2, ",", ".") : "--" !!} {!! number_format($finalBalance, 2, ",", ".") !!}
TOTAL $ {!! number_format($initialBalance, 0, ",", ".") !!} $ {!! number_format($debitTotals, 0, ",", ".") !!} $ {!! number_format($creditTotals, 0, ",", ".") !!} $ {!! number_format($finalBalance, 0, ",", ".") !!}



  Recibido: ___________________________
C.C. o NIT: __________________________
Fecha: ________/__________/__________
              DIA         MES          AÑO


Balance de egresos generado automáticamente