@php $cont = 0; @php $qtd = 0; @php $qtd_alt = 0; @php $vlr = 0; @php $vlr_alt = 0; @php $st = 0; @php $des = 0; @php $acr = 0; @php $ipi = 0; @php $total_real = 0; @php $max = 0; @php $liq_troca = floatval($info['VALOR_LIQUIDO_TROCA']); @php $liq_dev = floatval($info['VALOR_LIQUIDO_DEVOLUCAO']); @php $paginas = count($info['ITENS']) == 0 ? 0 : array_chunk($info['ITENS'], count($info['ITENS'])); @php $itens = $info['ITENS']; @php $modelos = $info['MODELOS_ITENS']; @php $montar_html= $info['COPY'];
@if($info['CLIENTE_ID'] > 0 && !($info['COLABORADOR_ID'] > 0))
===============================================================================
PRE-PEDIDO {{str_pad($info['PDV_CONFERENCIA_ID'],10,"0",STR_PAD_LEFT)}}
===============================================================================
@php echo barCodeDir(str_pad($info['PDV_CONFERENCIA_ID'],10,"0",STR_PAD_LEFT), 'CODE_128', 1, 2, 40);

{{$info['ESTABELECIMENTO']}}

CLIENTE: {{str_pad($info['CLIENTE_ID'],5,"0",STR_PAD_LEFT)}} - {{$info['CLIENTE_RAZAOSOCIAL']}}
@if($info['CORRETOR_ID'] > 0)

CORRETOR: {{str_pad($info['CORRETOR_ID'],4,"0",STR_PAD_LEFT)}} - {{$info['CORRETOR_NOME']}}
@endif
===============================================================================
PRE-PEDIDO {{str_pad($info['PDV_CONFERENCIA_ID'],10,"0",STR_PAD_LEFT)}}
===============================================================================
@php echo barCodeDir(str_pad($info['PDV_CONFERENCIA_ID'],10,"0",STR_PAD_LEFT), 'CODE_128', 1, 2, 40);

{{$info['ESTABELECIMENTO']}}

CLIENTE: {{str_pad($info['CLIENTE_ID'],5,"0",STR_PAD_LEFT)}} - {{$info['CLIENTE_RAZAOSOCIAL']}}
@if($info['CORRETOR_ID'] > 0)

CORRETOR: {{str_pad($info['CORRETOR_ID'],4,"0",STR_PAD_LEFT)}} - {{$info['CORRETOR_NOME']}}
@endif
@endif @if($info['COLABORADOR_ID'] > 0)
==============================================================================
PRE-PEDIDO {{str_pad($info['PDV_CONFERENCIA_ID'],10,"0",STR_PAD_LEFT)}}
==============================================================================

{{$info['ESTABELECIMENTO']}}

COLABORADOR: {{str_pad($info['COLABORADOR_ID'],5,"0",STR_PAD_LEFT)}} - {{$info['COLABORADOR_NOME']}}
@if($info['CORRETOR_ID'] > 0)

CORRETOR: {{str_pad($info['CORRETOR_ID'],4,"0",STR_PAD_LEFT)}} - {{$info['CORRETOR_NOME']}}
@endif
==============================================================================
PRE-PEDIDO {{str_pad($info['PDV_CONFERENCIA_ID'],10,"0",STR_PAD_LEFT)}}
==============================================================================

{{$info['ESTABELECIMENTO']}}

COLABORADOR: {{str_pad($info['COLABORADOR_ID'],5,"0",STR_PAD_LEFT)}} - {{$info['COLABORADOR_NOME']}}
@if($info['CORRETOR_ID'] > 0)

CORRETOR: {{str_pad($info['CORRETOR_ID'],4,"0",STR_PAD_LEFT)}} - {{$info['CORRETOR_NOME']}}
@endif
@endif @foreach ($itens AS $ITENS) @php $qtd = $qtd + $ITENS['QUANTIDADE']; @php $total_real = $total_real + $ITENS['VALOR_LIQUIDO']; @endforeach
# PRODUTO QTD VL.UNIT VL.ITEM
{{$ITENS['FSEQUENCIA']}} {{$ITENS['DESC_PRODUTO_ID']}} - {{$ITENS['PRODUTO_DESCRICAO']}} {{number_format($ITENS['QUANTIDADE'],0,',','.')}} R$ {{number_format($ITENS['VALOR_UNITARIO'],2,',','.')}} R$ {{number_format($ITENS['VALOR_LIQUIDO'],2,',','.')}} {{$ITENS['VALOR_DESCONTO'] > 0 ? '('.number_format($ITENS['VALOR_DESCONTO'],2,',','.').')' : ''}}
@foreach ($itens AS $ITENS) @endforeach
# PRODUTO QTD VL.UNIT VL.ITEM
{{$ITENS['FSEQUENCIA']}} {{$ITENS['DESC_PRODUTO_ID']}} - {{$ITENS['PRODUTO_DESCRICAO']}} {{number_format($ITENS['QUANTIDADE'],0,',','.')}} R$ {{number_format($ITENS['VALOR_UNITARIO'],2,',','.')}} R$ {{number_format($ITENS['VALOR_LIQUIDO'],2,',','.')}} {{$ITENS['VALOR_DESCONTO'] > 0 ? '('.number_format($ITENS['VALOR_DESCONTO'],2,',','.').')' : ''}}

QTD. PEÇAS {{number_format($qtd,0,',','.')}}

TOTAL DO PRÉ-PEDIDO R$ {{number_format($total_real,2,',','.')}}
@if($info['PERFIL_ANALISE_LIMITE_CREDITO'] == 1) @if($liq_troca > 0)

TOTAL DAS TROCAS ABERTAS (-R$ {{number_format($liq_troca,2,',','.')}})
@endif @if($liq_dev > 0)

TOTAL DAS TROCAS FECHADAS (-R$ {{number_format($liq_dev,2,',','.')}})
@endif

VALOR LÍQUIDO A PAGAR R$ {{number_format(($total_real - ($liq_troca + $liq_dev)),2,',','.')}}
@endif

VENDEDOR: {{$info['DESC_VENDEDOR']}}

{{$info['ESTABELECIMENTO_CIDADE']}}, {{formatdateMonth($info['DATAHORA_F'])}}

QTD. PEÇAS {{number_format($qtd,0,',','.')}}

TOTAL DO PRÉ-PEDIDO R$ {{number_format($total_real,2,',','.')}}
@if($info['PERFIL_ANALISE_LIMITE_CREDITO'] == 1) @if($liq_troca > 0)

TOTAL DAS TROCAS ABERTAS (-R$ {{number_format($liq_troca,2,',','.')}})
@endif @if($liq_dev > 0)

TOTAL DAS TROCAS FECHADAS (-R$ {{number_format($liq_dev,2,',','.')}})
@endif

VALOR LÍQUIDO A PAGAR R$ {{number_format(($total_real - ($liq_troca + $liq_dev)),2,',','.')}}
@endif

VENDEDOR: {{$info['DESC_VENDEDOR']}}

{{$info['ESTABELECIMENTO_CIDADE']}}, {{formatdateMonth($info['DATAHORA_F'])}}
_____________________________________________________
Cliente
_____________________________________________________
Cliente