@foreach ($taxTitles as $taxTitle) @endforeach @foreach ($documents as $document) @foreach ($taxTitles as $taxe) @endforeach @endforeach
ID FECHA DE EMISIÓN CLIENTE DOCUMENTO BASE DESCUENTO{{$taxTitle->name}}
{{$document->id}} {{$document->date_issue}} {{$document->client->name}}
{{$document->type_document->name}}
{{$document->prefix}}{{$document->number}} @if ($document->type_document_id != 1) ({{$document->reference->prefix}}{{$document->reference->number}}) @endif
{{number_format($document->sale, 2, '.', ',')}} {{number_format($document->total_discount, 2, '.', ',')}} @if ($exist = collect($document->taxes)->where('id', $taxe->id)->first()) {{number_format((($exist->is_retention) ? $exist->retention : $exist->total), 2, '.', ',')}} @else {{number_format(0, 2, '.', ',')}} @endif