@php $establishment = $document->establishment; $customer = $document->customer; $document_number = $document->prefix.'-'.str_pad($document->id, 8, '0', STR_PAD_LEFT); $document_type_driver = App\Models\Tenant\Catalogs\IdentityDocumentType::findOrFail($document->driver->identity_document_type_id); $address_full_delivery = Modules\Order\Services\AddressFullService::getDescription($document->delivery->location_id[2]); $address_full_origin= Modules\Order\Services\AddressFullService::getDescription($document->origin->location_id[2]); @endphp @if($company->logo) @else @endif
logo}"))}};base64, {{base64_encode(file_get_contents(public_path("storage/uploads/logos/{$company->logo}")))}}" alt="{{$company->name}}" alt="{{ $company->name }}" class="company_logo" style="max-width: 300px"> {{----}}

{{ $company->name }}

{{ 'RUC '.$company->number }}

{{ ($establishment->address !== '-')? $establishment->address : '' }} {{ ($establishment->district_id !== '-')? ', '.$establishment->district->description : '' }} {{ ($establishment->province_id !== '-')? ', '.$establishment->province->description : '' }} {{ ($establishment->department_id !== '-')? '- '.$establishment->department->description : '' }}
{{ ($establishment->email !== '-')? $establishment->email : '' }}
{{ ($establishment->telephone !== '-')? $establishment->telephone : '' }}

ORDEN DE PEDIDO

{{ $document_number }}

DESTINATARIO
Razón Social: {{ $customer->name }}
RUC: {{ $customer->number }} {{ ($customer->district_id !== '-')? ', '.$customer->district->description : '' }} {{ ($customer->province_id !== '-')? ', '.$customer->province->description : '' }} {{ ($customer->department_id !== '-')? '- '.$customer->department->description : '' }}
Dirección: {{ $customer->address }}
ENVIO
Fecha Emisión: {{ $document->date_of_issue->format('Y-m-d') }} Fecha Inicio de Traslado: {{ $document->date_of_shipping->format('Y-m-d') }}
Motivo Traslado: {{ $document->transfer_reason_type->description }} Modalidad de Transporte: {{ $document->transport_mode_type->description }}
Peso Bruto Total({{ $document->unit_type_id }}): {{ $document->total_weight }} Número de Bultos: {{ $document->packages_number }}
P.Partida: {{ $address_full_origin }}, {{ $document->origin->address }} P.Llegada: {{ $address_full_delivery }}, {{ $document->delivery->address }}
TRANSPORTE
Nombre y/o razón social: {{ $document->dispatcher->name }} {{ $document->dispatcher->identity_document_type->description }}: {{ $document->dispatcher->number }}
Conductor: {{ $document->driver->name }} - {{ $document->driver->number }} Licencia: {{ $document->driver->license }} Teléfono: {{ $document->driver->telephone }}
N° placa del vehiculo: {{ $document->license_plates->license_plate_1 }} N° registro: {{ $document->license_plates->register_number_1 }}
N° placa semirremolque: {{ $document->license_plates->license_plate_2 }} N° registro: {{ $document->license_plates->register_number_2 }}
@foreach($document->items as $row) @endforeach
Item Código Descripción Unidad Cantidad
{{ $loop->iteration }} {{ $row->item->internal_id }} {{ $row->item->description }} {{ $row->item->unit_type_id }} @if(((int)$row->quantity != $row->quantity)) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif
OBSERVACIONES
{{ $document->observations }}
@if($document->qr) @else @endif @if($company->img_firm) img_firm}"))}};base64, {{base64_encode(file_get_contents(public_path("storage/uploads/firms/{$company->img_firm}")))}}" alt="{{$company->name}}" alt="{{ $company->name }}" class="company_logo" style="max-width: 300px"> @else @endif