@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; } $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); $accounts = \App\Models\Tenant\BankAccount::where('show_in_documents', true)->get(); // dd($document->reference_document->total); // dd($document->total); @endphp {{--{{ $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 : '' }}
{{ $document->document_type->description }}
RUC: {{$company->number }}
Nº {{ $document_number }}
REFERENCIA DE FACTURA: @if ($document->reference_document) @if($document->reference_document) {{$document->reference_document->document_type->description}} {{ ($document->reference_document) ? $document->reference_document->number_full : "" }} @endif @endif
DESTINATARIO
{{-- linea1 --}}
Razon Social
: {{ $customer->name }}
{{-- linea2 --}}
{{ $customer->identity_document_type->description }}
: {{ $customer->number }}
Teléfono
: {{ $customer->telephone }}
E-mail registrado
: {{ $customer->email }}
{{-- linea3 --}}
Nº de factura
: @if ($document->reference_document) @if($document->reference_document) {{ ($document->reference_document) ? $document->reference_document->number_full : "" }} @endif @endif
Nº Orden de compra
Fecha de emisión
: {{ $document->date_of_issue->format('Y-m-d') }}
{{-- linea4 --}}
Motivo de Traslado
: {{ $document->transfer_reason_type->description }}
Modalidad traslado
: {{ $document->transport_mode_type->description }}
Fecha traslado
: {{ $document->date_of_issue->format('Y-m-d') }}
Dirección de partida
: {{ $document->origin->location_id }} - {{ $document->origin->address }}
Dirección de llegada
: {{ $document->delivery->location_id }} - {{ $document->delivery->address }}
@if($document->transport_mode_type_id === '01') @php $document_type_dispatcher = App\Models\Tenant\Catalogs\IdentityDocumentType::findOrFail($document->dispatcher->identity_document_type_id); @endphp
Transportista
: {{ $document->dispatcher->name }}
{{ $document_type_dispatcher->description }}
: {{ $document->dispatcher->number }}
Domicilio
:
@else
Conductor
: @if($document->driver->number) {{ $document->driver->number }} @endif
Licencia
: @if($document->driver->license) {{ $document->driver->license }} @endif
Placa Vehiculo
: @if($document->transport_data) {{ $document->transport_data['plate_number'] }} @endif
Marca
: @if($document->secondary_license_plates) @if($document->secondary_license_plates->semitrailer) {{ $document->secondary_license_plates->semitrailer }} @endif @endif
{{-- @if($document->transport_data) Número de placa del vehículo: {{ $document->transport_data['plate_number'] }} @endif @if($document->driver->number) Conductor: {{ $document->driver->number }} @endif @if($document->secondary_license_plates) @if($document->secondary_license_plates->semitrailer) Número de placa semirremolque: {{ $document->secondary_license_plates->semitrailer }} @endif @endif @if($document->driver->license) Licencia del conductor: {{ $document->driver->license }} @endif --}} @endif
Total Cantidad de bultos
: @if($document->packages_number) {{ $document->packages_number }} @endif
Total peso bruto ({{ $document->unit_type_id }})
: {{ $document->total_weight }}
OBSERVACIONES
@if($document->observations) {{ $document->observations }} @endif
 
@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
COMENTARIOS
DETALLES DEL PEDIDO CON I.G.V
VALOR DE PEDIDO VALOR DE LA FACTURA NIVEL DE SERVICIO
{{$document->reference_document->total}} {{$document->reference_document->total}} 100%
{{-- --}}
Para transacciones @if(in_array($document->reference_document->document_type->id,['01','03'])) . @foreach($accounts as $account) @endforeach
Banco Moneda Cta. Cte. Cuenta Interbancaria (CCI)
{{$account->description}} {{$account->currency_type->description}} {{$account->number}} {{$account->cci}}
@endif @foreach(array_reverse( (array) $document->reference_document->legends) as $row) @if ($row->code == "1000")


Son: {{ $row->value }} {{ $document->reference_document->currency_type->description }}

@if (count((array) $document->reference_document->legends)>1)

Leyendas

@endif @else

{{$row->code}}: {{ $row->value }}

@endif @endforeach
SUBTOTAL: {{ $document->reference_document->currency_type->symbol }} {{ number_format($document->reference_document->subtotal, 2) }}
IGV: {{ $document->reference_document->currency_type->symbol }} {{ number_format($document->reference_document->total_igv, 2) }}
TOTAL A PAGAR: {{ $document->reference_document->currency_type->symbol }} {{ number_format($document->reference_document->total, 2) }}
Los tiempos de entrega se pueden retrasar ocasionalmente por diferente imprevistos A la firma /sello del presente documentos se tiene por recibida la conformidad de la mercaderia.



...............................
FIRMA/SELLO
No se aceptan reclamaciones posteriores a la firma de este documento, favor de verificar que su mercaderia le recibió completa y en buen estado.
@if($document->qr)
@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) @endif
ORDEN DE PEDIDO
{{ ($document->order_form) ? $document->order_form->number_full : "" }}
@endif @if ($document->reference_sale_note_id) @if($document->sale_note) @endif
NOTA DE VENTA
{{ ($document->sale_note) ? $document->sale_note->number_full : "" }}
@endif --}}