@php
$SymboleMonnaie = null;
$typeOpe = null;
$libelleTypeOpe = null;
$ttMontantDeviseDevise = 0;
$ttMontantDeviseTypeOpe = 0;
$ttNbreDonnee = count($donneesLigne);
function returnThDevise($libSymboleMonnaie){
return '
| '.$libSymboleMonnaie.' |
';
}
function returnThTypeOpe($libLibelleTypeOpe){
return '
| '.$libLibelleTypeOpe.' |
';
}
function returnTdEcriture($ligne){
return '
| '.$ligne -> Code.' |
'.$ligne -> NumeroPiece.' |
'.date('d/m/Y', strtotime($ligne -> DateEcriture)).' |
'.$ligne -> NumeroCompteImpute.' |
'.$ligne -> NomClient.' |
'.$ligne -> NumeroDocument.' |
'.formatNumeriquePerf($ligne -> MontantDevise).' |
';
}
@endphp
@foreach($donneesLigne as $key => $ligne)
@if($ligne -> SymboleMonnaie != $SymboleMonnaie)
@if($key > 0)
|
{{ $ligne -> Code }}
|
{{ $libelleTypeOpe }} - Sous-total : {{ formatNumeriquePerf($ttMontantDeviseTypeOpe) }}
|
|
TOTAL
|
{{ formatNumeriquePerf($ttMontantDeviseDevise) }}
|
@php
$ttMontantDeviseTypeOpe = 0;
$ttMontantDeviseDevise = 0;
@endphp
@endif
@php
$SymboleMonnaie = $ligne -> SymboleMonnaie;
$typeOpe = $ligne -> typeOpe;
$libelleTypeOpe = $ligne -> libelleTypeOpe;
@endphp
{!! returnThDevise($ligne -> SymboleMonnaie) !!}
{!! returnThTypeOpe($ligne -> libelleTypeOpe) !!}
| Journal |
N° doc |
Date |
Tiers |
Référence document |
Montant |
@endif
@if($ligne -> typeOpe != $typeOpe)
|
{{ $ligne -> Code }}
|
{{ $libelleTypeOpe }} - Sous-total : {{ formatNumeriquePerf($ttMontantDeviseTypeOpe) }}
|
{!! returnThTypeOpe($ligne -> libelleTypeOpe) !!}
| Journal |
N° doc |
Date |
Tiers |
Référence document |
Montant |
@php
$SymboleMonnaie = $ligne -> SymboleMonnaie;
$typeOpe = $ligne -> typeOpe;
$ttMontantDeviseTypeOpe = 0;
$libelleTypeOpe = $ligne -> libelleTypeOpe;
@endphp
@endif
{!! returnTdEcriture($ligne) !!}
@php
$ttMontantDeviseTypeOpe += $ligne -> MontantDevise;
$ttMontantDeviseDevise += $ligne -> MontantDevise;
@endphp
@if($key == $ttNbreDonnee - 1)
|
{{ $ligne -> Code }}
|
{{ $libelleTypeOpe }} - Sous-total : {{ formatNumeriquePerf($ttMontantDeviseTypeOpe) }}
|
|
TOTAL
|
{{ formatNumeriquePerf($ttMontantDeviseDevise) }}
|
@endif
@endforeach