@foreach($pedido as $pe) @php $datos = \DTE::getDatosVentaDTE($pe->transaccion_id, $pe->dte_canal_id); $productos = \DTE::getProductosVentaDTE($pe->transaccion_id, $pe->dte_canal_id, $detalles_id); @endphp ClickRepuestos - Pedido Nº {{ $pe->pedido_id }} @include('dashboard.inc.css-pdf')
@if(count($empresa) > 0) @foreach($empresa as $e)
@if(!empty($e->empresa_logo) && file_exists(storage_path('app/logos/'.$e->empresa_logo))) @else

{{ $e->empresa_nombre }}

@endif
{{ $e->empresa_nombre }}
@if(!empty($e->rut)) RUT: {{ \FCR::num_cl($e->rut).'-'.$e->rut_digito_verificador }}
@endif Dirección: {{ $e->domicilio_direccion }}
Email: {{ $e->datos_contacto_email }}
Teléfono: {{ $e->datos_contacto_telefono }}
@endforeach @else

ClickRepuestos

ClickRepuestos
@endif

PEDIDO

Nº {{ $pe->pedido_id }}

@if(!empty($datos['rut'])) @endif @if(!empty($datos['comuna'])) @endif @if(!empty($datos['direccion'])) @endif
Nombre: {{ $datos['nombre'] }}
Correo: {{ $datos['email'] }}
Fono: {{ $datos['telefono'] }}
RUT: {{ $datos['rut'] }}
Comuna: {{ $datos['comuna'].', '.$datos['region'] }}
Dirección: {{ $datos['direccion'] }}
Folio: {{ $pe->pedido_id }}
Canal de Venta: {{ $pe->dte_canal_nombre }}
Sucursal: {{ $pe->sucursal_nombre }}
Dirección Sucursal: {{ $pe->domicilio_direccion }}
Fecha emisión: {{ \FCR::fecha_completa($pe->fecha_pedido.' '.$pe->hora_pedido) }}
@if(count($productos) > 0)
@php $subtotal = 0; @endphp @foreach($productos as $p) @php $subtotal += $p['total']; @endphp @endforeach
Código Descripción Cantidad Precio Normal Dscto Precio Oferta Subtotal
{{ $p['sku'] }} {{ $p['nombre'] }} {{ $p['cantidad'] }} ${{ \FCR::num_cl($p['precio_normal']) }} {{ \FCR::porcentajeDscto($p['precio_normal'], $p['precio_oferta']) }} ${{ \FCR::num_cl($p['precio_oferta']) }} ${{ \FCR::num_cl($p['total']) }}
@endif
Observaciones

{{ $datos['observaciones'] }}

Total del pedido
Subtotal: ${{ \FCR::num_cl($subtotal) }}
Neto: ${{ \FCR::num_cl(\FCR::num_neto($subtotal)) }}
IVA: ${{ \FCR::num_cl(\FCR::num_iva($subtotal)) }}
Total: ${{ \FCR::num_cl($subtotal) }}
@endforeach