@php $pages = $transaction->pages; $nb_page_trans = $transaction->nb_page; $total_debit = 0; $total_credit = 0; $i = 0; $p = 0; @endphp @foreach ($pages as $operations) @include('guichet.pdf.entete-journal')
TRANSACTIONS
@php $st_debit = 0; $st_credit = 0; $p++; @endphp @foreach ($operations as $operation) @php $i++ ; $solde_after = $operation->solde_avant + $operation->debit - $operation->credit; $st_debit += $operation->debit; $st_credit += $operation->credit; $total_debit = $st_debit; $total_credit = $st_credit; @endphp @endforeach @if($nb_page_trans > 1) @endif @if($nb_page_trans == $p) @endif
N° COMPTE LIBELLE N° PIECE ENCAISSEMENT DECAISSEMENT
{{ $i }} {{ $operation->compte_id }} {{ $operation->libelle }} {{ $operation->num_piece }} {{App\Lib\Format::number($operation->credit)}} {{App\Lib\Format::number($operation->debit)}}
SOUS-TOTAL {{ App\Lib\Format::number($st_credit, 2, ',',' ') }} {{ App\Lib\Format::number($st_debit, 2, ',',' ') }}
TOTAL {{ App\Lib\Format::number($total_credit, 2, ',',' ') }} {{ App\Lib\Format::number($total_debit, 2, ',',' ') }}
@include('guichet.pdf.footer')
{{$p + $page_decompte + $page_credit}} / {{$nb_page_total}}
@if($nb_page_trans > $p)
@endif @endforeach