@php
$establishment = $document->establishment;
$configuration = \App\Models\Tenant\Configuration::first();
$configurations = \App\Models\Tenant\Configuration::first();
$company_name = $company->name;
$company_owner = null;
if ($configurations->trade_name_pdf) {
$company_name = $company->trade_name;
$company_owner = $company->name;
}
$establishment__ = \App\Models\Tenant\Establishment::find($document->establishment_id);
$logo = $establishment__->logo ?? $company->logo;
if ($logo === null && !file_exists(public_path("$logo}"))) {
$logo = "{$company->logo}";
}
if ($logo) {
$logo = "storage/uploads/logos/{$logo}";
$logo = str_replace("storage/uploads/logos/storage/uploads/logos/", "storage/uploads/logos/", $logo);
}
$customer = $document->customer;
//$path_style = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.'style.css');
$document_number = $document->series.'-'.str_pad($document->number, 8, '0', STR_PAD_LEFT);
$document_type_driver = App\Models\Tenant\Catalogs\IdentityDocumentType::findOrFail($document->driver->identity_document_type_id);
$configuration = \App\Models\Tenant\Configuration::first();
$configuration = \App\Models\Tenant\Configuration::first();
$configurations = \App\Models\Tenant\Configuration::first();
$company_name = $company->name;
$company_owner = null;
if ($configurations->trade_name_pdf) {
$company_name = $company->trade_name;
$company_owner = $company->name;
}
$company_name = $company->name;
$company_owner = null;
if ($configurations->trade_name_pdf) {
$company_name = $company->trade_name;
$company_owner = $company->name;
}
@endphp
{{--{{ $document_number }}--}}
{{----}}
@if($configuration->header_image)
 header_image}"))}};base64, {{base64_encode(file_get_contents(public_path("storage/uploads/header_images/{$configuration->header_image}")))}}" alt="{{$configuration->id}}" >
{{--  logo}"))}};base64, {{base64_encode(file_get_contents(public_path("storage/uploads/logos/{$company->logo}")))}}" alt="{{$company->name}}" class="company_logo" style="max-width: 150px;"> --}}
|
{{ 'RUC '.$company->number }}
{{ $document->document_type->description }}
{{ $document_number }}
|
@else
{{-- --}}
|
{{ 'RUC '.$company->number }}
{{ $document->document_type->description }}
{{ $document_number }}
|
@endif
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: {{ $document->origin->location_id }} - {{ $document->origin->address }} |
P.Llegada: {{ $document->delivery->location_id }} - {{ $document->delivery->address }} |
TRANSPORTE |
Nombre y/o razón social: {{ $document->dispatcher->name }} |
{{ $document_type_driver->description }}: {{ $document->dispatcher->number }} |
Número de placa del vehículo: {{ $document->license_plate }} |
Conductor: {{ $document->driver->number }} |
Item |
Código |
Descripción |
Unidad |
Cantidad |
@foreach($document->items as $row)
{{ $loop->iteration }} |
{{ $row->item->internal_id }} |
{{ $row->item->description }} |
{{ symbol_or_code($row->item->unit_type_id) }} |
@if(((int)$row->quantity != $row->quantity))
{{ $row->quantity }}
@else
{{ number_format($row->quantity, 0) }}
@endif
|
@endforeach
OBSERVACIONES |
{{ $document->observations }} |
@if ($document->reference_document)
@if($document->reference_document)
{{$document->reference_document->document_type->description}} |
{{ ($document->reference_document) ? $document->reference_document->number_full : "" }} |
@endif
@endif
@if ($document->data_affected_document)
@php
$document_data_affected_document = $document->data_affected_document;
$number = (property_exists($document_data_affected_document,'number'))?$document_data_affected_document->number:null;
$Series = (property_exists($document_data_affected_document,'Series'))?$document_data_affected_document->series:null;
$document_type_id = (property_exists($document_data_affected_document,'document_type_id'))?$document_data_affected_document->document_type_id:null;
@endphp
@if($number !== null && $Series !== null && $document_type_id !== null)
@php
$documentType = App\Models\Tenant\Catalogs\DocumentType::find($document_type_id);
$textDocumentType = $documentType->getDescription();
@endphp
{{$textDocumentType}} |
{{$Series }}-{{$number}} |
@endif
@endif
@if ($document->terms_condition)
Términos y condiciones del servicio
{!! $document->terms_condition !!}
|
@endif