@php
$establishment = $document->establishment;
$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);
$document_type_dispatcher = App\Models\Tenant\Catalogs\IdentityDocumentType::findOrFail($document->dispatcher->identity_document_type_id);
$logo = "storage/uploads/logos/{$company->logo}";
if($establishment->logo) {
$logo = "{$establishment->logo}";
}
@endphp
{{--{{ $document_number }}--}}
{{----}}
@if($company->logo)
|
@else
{{-- --}}
|
@endif
|
{{ 'RUC '.$company->number }}
{{ $document->document_type->description }}
{{ $document_number }}
|
{{ $company->name }} |
{{ ($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 : '' }} |
Motivo Traslado: {{ $document->transfer_reason_type->description }} |
|
Fecha Emisión: {{ $document->date_of_issue->format('Y-m-d') }} |
PUNTO DE PARTIDA |
PUNTO DE LLEGADA |
Fecha Inicio de Traslado: {{ $document->date_of_shipping->format('Y-m-d') }} |
Razón Social: {{ $document->customer->name }} |
Dirección: {{ $document->origin->location_id }} - {{ $document->origin->address }} |
{{$document->customer->identity_document_type->description}}: {{ $document->customer->number }} |
|
Dirección: {{ $document->delivery->location_id }} - {{ $document->delivery->address }} |
TRANSPORTE |
CONDUCTOR |
Nombre y/o razón social: {{ $document->dispatcher->name }} |
{{$document_type_driver->description}}: {{ $document->driver->number }} |
{{ $document_type_dispatcher->description }}: {{ $document->dispatcher->number }} |
@if($document->driver->license)
Licencia del conductor: {{ $document->driver->license }} |
@endif
Modalidad de Transporte: {{ $document->transport_mode_type->description }} |
@if($document->secondary_license_plates)
@if($document->secondary_license_plates->semitrailer)
Número de placa semirremolque: {{ $document->secondary_license_plates->semitrailer }} |
@endif
@endif
Número de placa del vehículo: {{ $document->license_plate }} |
Item |
Código |
Descripción |
Unidad |
Cantidad |
@foreach($document->items as $row)
{{ $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
|
@endforeach
Peso Bruto Total({{ $document->unit_type_id }}): {{ $document->total_weight }} |
Número de Bultos: {{ $document->packages_number }} |
OBSERVACIONES |
{{ $document->observations }} |
|
Autorizado por la SUNAT |
|
Representacion impresa de {{ $document->document_type->description }} |
@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->reference_order_form_id)
@if($document->order_form)
ORDEN DE PEDIDO |
{{ ($document->order_form) ? $document->order_form->number_full : "" }} |
@endif
@endif