@php use Modules\Factcolombia1\Helpers\DocumentHelper; @endphp @foreach($taxes as $tax) @endforeach @foreach($taxes as $tax) @endforeach @php $global_total_exempt = 0; @endphp @foreach($summary_records as $record) @php $net_total = 0; $total = 0; $total_exempt = 0; $first_document = $record['first_document']; $ordered_documents = $record['ordered_documents']; $row_first_document = $first_document->getDataReportSalesBook(); foreach ($ordered_documents as $document) { $totals = $document->getDataReportSummarySalesBook(); $net_total += $totals['net_total']; $total += $totals['total']; $total_exempt += $totals['total_exempt']; } $global_total_exempt += $total_exempt; @endphp {{-- TOTALES --}} {{-- TOTALES --}} {{-- IMPUESTOS --}} @foreach($taxes as &$tax) @php $sum_taxable_amount = 0; $sum_tax_amount = 0; foreach ($ordered_documents as $document) { $item_values = $document->getItemValuesByTax($tax->id); $sum_taxable_amount += $item_values['taxable_amount']; $sum_tax_amount += $item_values['tax_amount']; } $tax->global_taxable_amount += $sum_taxable_amount; $tax->global_tax_amount += $sum_tax_amount; @endphp @endforeach {{-- IMPUESTOS --}} @endforeach
IMPUESTO #{{ $loop->iteration }}
{{ $tax->name }} - ({{ $tax->rate }}%)
Fact. Inicial Fact. Final Total/Neto Total
+
Impuesto
Total/ExcentoBase Impuesto
{{$row_first_document['type_document_name']}}
{{ $record['prefix'] }}-{{$record['first_document']->number}}
{{$row_first_document['type_document_name']}}
{{ $record['prefix'] }}-{{$record['last_document']->number}}
{{ $first_document->generalApplyNumberFormat($net_total) }} {{ $first_document->generalApplyNumberFormat($total) }} {{ $first_document->generalApplyNumberFormat($total_exempt) }} {{ $first_document->generalApplyNumberFormat($sum_taxable_amount) }} {{ $first_document->generalApplyNumberFormat($sum_tax_amount) }}


@foreach($taxes as $tax) @endforeach
BASE IMPUESTO
TOTAL VENTAS EXENTAS {{ DocumentHelper::applyNumberFormat($global_total_exempt) }} 0.00
TOTAL VENTAS IMPUESTO #{{ $loop->iteration }} {{--
--}} - {{ $tax->name }} ({{ $tax->rate }}%)
{{ DocumentHelper::applyNumberFormat($tax->global_taxable_amount) }} {{ DocumentHelper::applyNumberFormat($tax->global_tax_amount) }}