{{ __("Désignation") }} {{ __("Unité") }} {{ __("Quantité") }} {{ __("Montant HT") }} {{ __("Total") }} @php $total_ht = 0; $total_category = 0; @endphp @foreach($articles as $index => $item) @if ($item['cusInvDet_title']==1) {{-- Gestion du titre --}} @php $total_category = 0; @endphp {!! $item['cusInvDet_name'] !!} @else @php $total_line = $item['cusInvDet_amountHT']*$item['cusInvDet_qty']; $total_category += $total_line; $total_ht += $total_line @endphp {{$item['cusInvDet_order']}} {!! $item['cusInvDet_name'] !!} {!! $item['cusInvDet_unit']!='0' ? $item['cusInvDet_unit'] : '' !!} {!! $item['cusInvDet_qty']!='0' ? $item['cusInvDet_qty'] : '' !!} {!! $item['cusInvDet_amountHT']!='0' ? $item['cusInvDet_amountHT'] : ' €' !!} {{ number_format((float)$total_line, 2, '.', '') }} € @if(empty($articles[$index+ 1]) || ( isset($articles[$index+ 1]) && ($articles[$index+ 1]['cusInvDet_title']==1))) {{-- --}} {{ __("Sous-total") }} {{ number_format((float)$total_category, 2, '.', '') }} € @endif @endif @endforeach @php $total_tva = $total_ht*$customer_invoice->cusInv_tva/100; @endphp {{ __("Montant total HT") }} {{ number_format((float)$total_ht, 2, '.', '') }} € {{ __("TVA") }} {!! $customer_invoice->cusInv_tva !!}% {{ number_format((float)$total_tva, 2, '.', '') }} € {{ __("Montant total TTC") }} {{ number_format((float)$total_ht+$total_tva, 2, '.', '') }} €