@extends('layouts.main') @section('body') @php( $page = 1 ) @php( $curline = 1 ) @php( $limite1 = 15 ) @php( $limite2 = 23 ) @php( $limite3 = 32 ) @php( $line_length = 90 ) @php( $total_prods = 0 ) @include('pdf.facturas.cfdi32.sections.header') @include('pdf.facturas.cfdi32.sections.tableHeader') @foreach ($xml['Comprobante']['Conceptos']['Concepto']['@atributos'] as $row) @if( strlen($row['descripcion']) >= $line_length || @$row['aduanas'][0]['@attributes']['numero'] ) @if( strlen($row['descripcion']) >= $line_length ) @php( $curline += (strlen($row['descripcion']) / $line_length) ) @else @php( $curline += 1 ) @endif @if( strlen($row['descripcion']) >= $line_length && @$row['aduanas'][0]['@attributes']['numero'] ) @php( $curline += 1 ) @endif @else @php( $curline++ ) @endif @php( $total_prods += $row['cantidad'] ) @include('pdf.facturas.cfdi32.sections.tableRow', $row) @if($curline >= $limite3)
Página {{ $page }}
@php( $page++ ) @include('pdf.facturas.cfdi32.sections.header') @include('pdf.facturas.cfdi32.sections.tableHeader') @php( $curline = 1 ) @endif @endforeach @php( $total_notes = count($xml['Comprobante']['@atributos']['Observaciones']) ) @if( $total_notes > 3 ) @php( $curline += ($count_notes - 3) ) @endif @if($curline <= $limite1) @php( $need_line = ($limite1 - $curline) - 1 ) @for($i=0; $i<$need_line; $i++) @endfor
{{ number_format($total_prods, 2, '.', ',') }}  
 
@include('pdf.facturas.cfdi32.sections.totales') @include('pdf.facturas.cfdi32.sections.footer') @elseif($curline <= $limite2) @include('pdf.facturas.cfdi32.sections.totales')

@include('pdf.facturas.cfdi32.sections.header')


@include('pdf.facturas.cfdi32.sections.footer') @elseif($curline <= $limite3)

@include('pdf.facturas.cfdi32.sections.header') @include('pdf.facturas.cfdi32.sections.totales') @include('pdf.facturas.cfdi32.sections.footer') @endif @stop