@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); // $document_type_dispatcher = App\Models\Tenant\Catalogs\IdentityDocumentType::findOrFail($document->dispatcher->identity_document_type_id); $allowed_items = 60; $quantity_items = $document->items()->count(); $cycle_items = $allowed_items - $quantity_items * 5; $total_weight = 0; @endphp
{{--
|
@else
{{-- ![]() |
@endif
{{ $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 : '' }} |
{{ 'R.U.C. ' . $company->number }}{{ $document->document_type->description }}{{ $document_number }} |
DESTINATARIO | |||
Razón Social: {{ $customer->name }} | @if ($document->reference_document)COMPROBANTE: {{ $document->reference_document->document_type->description }} {{ $document->reference_document->number_full }} | @else@endif | |
RUC: {{ $customer->number }} | @if ($document->reference_document) @if ($document->reference_document->purchase_order)O. COMPRA: {{ $document->reference_document->purchase_order }} | @else@endif @else | @endif |
Dirección: {{ $customer->address }} {{ $customer->district_id !== '-' ? ', ' . $customer->district->description : '' }} {{ $customer->province_id !== '-' ? ', ' . $customer->province->description : '' }} {{ $customer->department_id !== '-' ? '- ' . $customer->department->description : '' }} |
ENVIO | |
Fecha Emisión: {{ $document->date_of_issue->format('d/m/Y') }} |
PUNTO DE PARTIDA |
Fecha de Traslado: {{ $document->date_of_shipping->format('d/m/Y') }} | |
Motivo Traslado: {{ $document->transfer_reason_type->description }} |
PUNTO DE LLEGADA |
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 }} |
|
|
# | CODIGO | DETALLE | UND | LOTE | F. VENC. | CANT. | PESO |
---|---|---|---|---|---|---|---|
{{ $loop->iteration }} | {{ $row->item->internal_id }} |
{!! $row->item->description !!}
@if ($row->relation_item->attributes)
@foreach ($row->relation_item->attributes as $attr)
@if ($attr->attribute_type_id === '5032')
@php
$total_weight += $attr->value * $row->quantity;
$total_weight_line += $attr->value * $row->quantity;
@endphp
@endif
{!! $attr->description !!} : {{ $attr->value }} @endforeach @endif |
{{ symbol_or_code($row->item->unit_type_id) }} |
@inject('itemLotGroup', 'App\Services\ItemLotsGroupService')
@if ($row->item->IdLoteSelected)
@php
$lote = $itemLotGroup->getLote($row->item->IdLoteSelected,"@");
$fechaVencimiento = $itemLotGroup->getLotDateOfDue($row->item->IdLoteSelected);
$loteParts = explode('/', $lote);
// $fechaParts = explode('/', $fechaVencimiento);
@endphp
@foreach ($loteParts as $part)
{{ $part }}
@endforeach
@endif
|
@inject('itemLotGroup', 'App\Services\ItemLotsGroupService')
@if ($row->item->IdLoteSelected)
@php
$lote = $itemLotGroup->getLote($row->item->IdLoteSelected,"@");
$fechaVencimiento = $itemLotGroup->getLotDateOfDue($row->item->IdLoteSelected);
// $loteParts = explode('/', $lote);
$fechaParts = explode('/', $fechaVencimiento);
@endphp
@foreach ($fechaParts as $part)
{{ $part }}
@endforeach
@endif
|
@if ((int) $row->quantity != $row->quantity) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif | {{ $row->item->weight }} |
|
|
|
|
|
Términos y condiciones del servicio{!! $document->terms_condition !!} |