@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; } $logo = "storage/uploads/logos/{$company->logo}"; if($establishment->logo) { $logo = "{$establishment->logo}"; } $supplier = $document->supplier; $operation_data = $document->operation_data; $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); @endphp {{-- {{ $document_number }} --}} @if($company->logo) @else @endif
logo}"))}};base64, {{base64_encode(file_get_contents(public_path("storage/uploads/logos/{$company->logo}")))}}" alt="{{$company->name}}" class="company_logo" style="max-width: 150px;">

{{ $company_name }}

{{ 'RUC '.$company->number }}
@if ($company_owner)
De: {{ $company_owner }}
@endif
{{ ($establishment->address !== '-')? $establishment->address : '' }}
{{ ($establishment->email !== '-')? $establishment->email : '' }}
{{ ($establishment->telephone !== '-')? $establishment->telephone : '' }}
{{ $document->document_type->description }}

{{ $document_number }}

Vendedor: {{ $supplier->name }} Fecha de emisión: {{ $document->date_of_issue->format('Y-m-d') }}
{{ $supplier->identity_document_type->description }}: {{ $supplier->number }}
Dirección: {{ $supplier->address }} {{ ($supplier->district_id !== '-')? '- '.$supplier->district->description : '' }} {{ ($supplier->province_id !== '-')? '- '.$supplier->province->description : '' }} {{ ($supplier->department_id !== '-')? '- '.$supplier->department->description : '' }}
Tipo de Dirección: {{ $operation_data->address_type->description }}
Moneda: {{ $document->currency_type->description }}
Datos de la operación
Dirección: {{ $operation_data->address }} {{ ($operation_data->district_id !== '-')? '- '.$operation_data->district->description : '' }} {{ ($operation_data->province_id !== '-')? '- '.$operation_data->province->description : '' }} {{ ($operation_data->department_id !== '-')? '- '.$operation_data->department->description : '' }}
Tipo de Dirección: {{ $operation_data->address_type->description }}
@foreach($document->items as $row) @endforeach @if($document->total_unaffected > 0) @endif @if($document->total_exonerated > 0) @endif @if($document->total_taxed > 0) @endif
Cod. Cant. Unidad Descripción V.Unit P.Unit Total
{{ $row->item->internal_id }} {{ $row->quantity }} {{ symbol_or_code($row->item->unit_type_id) }} {!! $row->item->description !!} {{ number_format($row->unit_value, 2) }} {{ number_format($row->unit_price, 2) }} {{ number_format($row->total, 2) }}
Op. Inafectas: {{ $document->currency_type->symbol }} {{ number_format($document->total_unaffected, 2) }}
Op. Exoneradas: {{ $document->currency_type->symbol }} {{ number_format($document->total_exonerated, 2) }}
Op. Gravadas: {{ $document->currency_type->symbol }} {{ number_format($document->total_taxed, 2) }}
IGV: {{ $document->currency_type->symbol }} {{ number_format($document->total_igv, 2) }}
Importe total: {{ $document->currency_type->symbol }} {{ number_format($document->total, 2) }}
@foreach($document->legends as $row)

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

@endforeach