@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); } //$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); $logo = "storage/uploads/logos/{$company->logo}"; if ($establishment->logo) { $logo = "{$establishment->logo}"; } @endphp {{-- {{ $document_number }} --}} {{-- --}} @if ( $document->state_type->id == '11' || $document->state_type->id == '09' || $document->state_type->id == '55' || $document->state_type->id == '01' || $document->state_type->id == '03')
anulado
@endif @if ($document->soap_type_id == '01')
anulado
@endif @if ($company->logo)
{{ $company->name }}
{{-- @else --}} {{--
--}} {{-- --}} {{--
--}} @endif @if ($company_owner) @endif

{{ $company_name }}

De: {{ $company_owner }}
{{ '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 : '' }}

GUÍA DE REMISIÓN TRANSPORTISTA

{{ $document_number }}

@if ($document->packages_number) @endif @if ($document->flete_payer) @endif {{--@if ($document->subcontract_company) @endif--}}
ENVIO
Fecha Emisión: {{ $document->date_of_issue->format('Y-m-d') }}
Fecha Inicio de Traslado: {{ $document->date_of_shipping->format('Y-m-d') }}
Peso Bruto Total({{ $document->unit_type_id }}): {{ $document->total_weight }}
Número de Bultos: {{ $document->packages_number }}
P.Partida: {{ optional($document->sender_address_data)['address'] }} @if (isset($document->sender_address_data) && isset($document->sender_address_data['location_id'])) {{ func_get_location($document->sender_address_data['location_id']) }} @endif
P.Llegada: {{ optional($document->receiver_address_data)['address'] }} @if (isset($document->receiver_address_data) && isset($document->receiver_address_data['location_id'])) {{ func_get_location($document->receiver_address_data['location_id']) }} @endif
Datos del Remitente: {{ $document->sender_data['name'] }} - {{ $document->sender_data['number'] }}
Datos del Destinatario: {{ $document->receiver_data['name'] }} - {{ $document->receiver_data['number'] }}
Pagador del flete: {{ $document->flete_payer->name ?? '' }}
RUC/Doc. del pagador: {{ $document->flete_payer->number ?? '' }}
Subcontratista: {{ $document->subcontract_company->name ?? '' }}
RUC/Doc. del subcontratista: {{ $document->subcontract_company->number ?? '' }}
Documentos relacionados:
@foreach ($document->dispatches_related as $related) Guía remitente {{ $related->serie_number }} RUC: {{ $related->company_number }}
@endforeach
@if ($company->mtc_auth) @endif @if ($document->transport_data) @if ($document->transport_data['configuration']) @endif @endif @if (isset($document->transport_data['auth_plate_primary'])) @endif @if (isset($document->transport_data['tuc'])) @endif @if ($document->tracto_carreta) @endif @if (isset($document->secondary_transport_data['secondary_plate_number'])) @else @if (isset($document->transport_data['secondary_plate_number'])) @endif @endif @if (isset($document->secondary_transport_data['auth_plate_secondary'])) @else @if (isset($document->transport_data['auth_plate_secondary'])) @endif @endif @if (isset($document->transport_data['auth_plate_secondary'])) @endif @if ($document->driver->name) @endif @if ($document->driver->number) @endif @if ($document->driver->license) @endif @isset($document->secondary_driver->name) @endisset {{--@if ($document->observations) @endif--}}
TRANSPORTE
Número de autorización MTC: {{ $company->mtc_auth }}
Número de placa del vehículo: {{ $document->transport_data['plate_number'] }}
Modelo del vehículo: {{ $document->transport_data['model'] }}
Configuración vehícular: {{ $document->transport_data['configuration'] }}
Autorización de placa principal: {{ $document->transport_data['auth_plate_primary'] }}
Tarjeta Única de Circulación Principal: @php $tuc = ''; if (isset($document->transport_data['tuc'])) { $tuc = $document->transport_data['tuc']; } @endphp {{ $tuc }}
Marca de tracto carreta: {{ $document->tracto_carreta }}
Número de placa secundaria del vehículo: {{ $document->secondary_transport_data['secondary_plate_number'] }}
Número de placa secundaria del vehículo: {{ $document->transport_data['secondary_plate_number'] }}
Autorización de placa secundaria: {{ $document->secondary_transport_data['auth_plate_secondary'] }}
Autorización de placa secundaria: {{ $document->transport_data['auth_plate_secondary'] }}
Tarjeta Única de Circulación secundaria: @php $tuc = ''; if (isset($document->transport_data['tuc_secondary'])) { $tuc = $document->transport_data['tuc_secondary']; } @endphp {{ $tuc }}
Nombre Conductor: {{ $document->driver->name }}
Documento Conductor: {{ $document->driver->number }}
Licencia del conductor: {{ $document->driver->license }}
Nombre Conductor Secundario: {{ $document->secondary_driver->name }}
Documento Conductor Secundario: {{ $document->secondary_driver->number }}
Observaciones: {{ $document->observations }}
@foreach ($document->items as $row) @endforeach
Item Código Descripción Modelo Unidad Cantidad
{{ $loop->iteration }} {{ $row->item->internal_id }} @if ($row->name_product_pdf) {!! $row->name_product_pdf !!} @else {!! $row->item->description !!} @endif @if ($row->attributes) @foreach ($row->attributes as $attr)
{!! $attr->description !!} : {{ $attr->value }} @endforeach @endif @if ($row->discounts) @foreach ($row->discounts as $dtos)
{{ $dtos->factor * 100 }}% {{ $dtos->description }} @endforeach @endif @if ($row->relation_item->is_set == 1)
@inject('itemSet', 'App\Services\ItemSetService') @foreach ($itemSet->getItemsSet($row->item_id) as $item) {{ $item }}
@endforeach @endif @if ($document->has_prepayment)
*** Pago Anticipado *** @endif
{{ $row->item->model ?? '' }} {{ symbol_or_code($row->item->unit_type_id) }} @if ((int) $row->quantity != $row->quantity) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif
@if ($document->observations)
OBSERVACIONES
{{ $document->observations }}
@endif @if ($document->qr)
@endif
@php $document_description = null; if (is_object($document)) { if ($document && $document->prefix == 'NV') { $document_description = 'NOTA DE VENTA ELECTRÓNICA'; } if ($document && $document->document_type_id && $document->document_type) { $document_description = $document->document_type->description; } } @endphp @if ($document_description) @else @endif
Representación impresa de la {{ $document_description }}
Esta puede ser consultada en {!! url('/buscar') !!}
Representación impresa del Comprobante de Pago Electrónico.
Esta puede ser consultada en {!! url('/buscar') !!}
@if ($configurations->terms_condition_dispatches)
Términos y condiciones del servicio
{!! $configurations->terms_condition_dispatches !!}
@endif