@foreach($data as $row) @endforeach
N° Document Nature Date TOT. Brut HT TOT. Remise TOT. HT TOT. TVA TOT. TTC
{{$row['NUMBON']}} {{$row['KNAT']}} {{ \Carbon\Carbon::parse($row['DATEMVT'])->format('d-m-Y') }} {{$row['BRUT_HT']}} {{$row['REMISE'] == '0,000'?'':$row['REMISE']}} {{$row['NET_HT']}} {{ (float)$row['TOT_TVA'] == 0 ? '' : $row['TOT_TVA']}} {{ (float)$row['TOT_TTC'] == 0 ? '' : $row['TOT_TTC']}}


@if($type == 2) @php $totTtcValue = (float) str_replace(',', '.', str_replace(' ', '', (string) $ttc)); $retsValue = (float) str_replace(',', '.', str_replace(' ', '', (string) $rets)); $netAPayer = $totTtcValue - $retsValue; $displayRets = $retsValue > 0 ? $rets : ''; @endphp @if($retsValue > 0) @endif @endif
Total BRUT {{$brut}}
Total REMISE {{$remise}}
Total HT {{$ht}}
Total TVA {{$tva == '0,000'?'0':$tva}}
Timbre {{$timbre}}
Total TTC {{$ttc}}
RS {{$displayRets}}
Net à payer {{ number_format($netAPayer, 3, ',', ' ') }}