@foreach ($venta as $v) ClickRepuestos - Venta Nº {{ $v->folio }} @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 }}
@if (!empty($e->datos_contacto_telefono)) Teléfono: {{ $e->datos_contacto_telefono }}
@endif
@endforeach @else

ClickRepuestos

ClickRepuestos
@endif

VENTA

Nº {{ $v->folio }}

@if (!empty($v->rut)) @endif @if (!empty($v->comuna_nombre)) @endif @if (!empty($v->domicilio_direccion)) @endif
Nombre: {{ $v->usuario_nombre }}
Correo: {{ $v->datos_contacto_email }}
Fono: {{ $v->datos_contacto_telefono }}
RUT: {{ \FCR::num_cl($v->rut) . '-' . $v->rut_digito_verificador }}
Comuna: {{ $v->comuna_nombre . ', ' . $v->region_nombre }}
Dirección: {{ $v->domicilio_direccion }}
@if (!empty($v->forma_pago_nombre)) @endif @if (!empty($v->tipo_pago)) @endif @if (!empty($v->dte_fecha_emision)) @endif @if (!empty($v->dte_fecha_vencimiento)) @endif
Folio: {{ $v->folio }}
Tipo: {{ $v->dte_tipo_nombre }}
Forma de Pago: {{ $v->forma_pago_nombre }}
Tipo de Pago: {{ ucwords($v->tipo_pago) }}
Fecha emisión: {{ \FCR::solo_fecha($v->dte_fecha_emision) }}
Fecha vencimiento: {{ \FCR::solo_fecha($v->dte_fecha_vencimiento) }}
@if (count($productos) > 0)
@php $total = 0; $subtotal = 0; $descuento = 0; @endphp @foreach ($productos as $p) @if (!empty($p->dte_detalle_descripcion)) @else @endif @php $total += $p->dte_detalle_total; $descuento += $p->dte_detalle_descuento; $subtotal = $total - $descuento; @endphp @endforeach
Código Descripción Cantidad Precio Normal Dscto Precio Oferta Subtotal
{{ $p->producto_codigo_sku }}{{ $p->dte_detalle_descripcion }}{{ $p->url_h1 }}{{ $p->dte_detalle_cantidad }} ${{ \FCR::num_cl($p->dte_detalle_precio) }} {{ \FCR::porcentajeDscto($p->dte_detalle_precio, $p->dte_detalle_oferta) }} ${{ \FCR::num_cl($p->dte_detalle_oferta) }} ${{ \FCR::num_cl($p->dte_detalle_total) }}
@endif
Observaciones

{{ $v->dte_observaciones }}

@if (count($productos) > 0)
Total de venta
@if ($descuento > 0) @endif
Subtotal: ${{ \FCR::num_cl($subtotal) }}
Neto: ${{ \FCR::num_cl(\FCR::num_neto($subtotal)) }}
IVA: ${{ \FCR::num_cl(\FCR::num_iva($subtotal)) }}
Descuento: ${{ \FCR::num_cl($descuento) }}
Total: ${{ \FCR::num_cl($total) }}
@endif
@endforeach