@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}"; } //$path_style = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.'style.css'); $tittle = $document->prefix . '-' . str_pad($document->number??$document->id, 8, '0', STR_PAD_LEFT); @endphp {{-- {{ $tittle }} --}} {{-- --}} @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 }}

@if ($company_owner) De: {{ $company_owner }} @endif
{{ '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 : '' }}
@isset($establishment->trade_address)
{{ $establishment->trade_address !== '-' ? 'D. Comercial: ' . $establishment->trade_address : '' }}
@endisset
{{ $establishment->telephone !== '-' ? 'Central telefónica: ' . $establishment->telephone : '' }}
{{ $establishment->email !== '-' ? : ' . $establishment->email : '' }}
@isset($establishment->web_address)
{{ $establishment->web_address !== '-' ? 'Web: ' . $establishment->web_address : '' }}
@endisset @isset($establishment->aditional_information)
{{ $establishment->aditional_information !== '-' ? $establishment->aditional_information : '' }}
@endisset
{{ get_document_name('quotation', 'Cotización') }}

{{ $tittle }}

@foreach ($document->suppliers as $idx => $supplier) @php $name = \App\Models\Tenant\Person::find($supplier->supplier_id)->name; @endphp @endforeach
{{ $idx == 0 ? 'PROVEEDOR:' : '' }} {{ $name }}
Vendedor: {{ $document->user->name }}
@foreach ($document->items as $row) @endforeach
Cant. Unidad Descripción
@if ((int) $row->quantity != $row->quantity) {{ $row->quantity }} @else {{ number_format($row->quantity, 2) }} @endif {{ symbol_or_code($row->item->unit_type_id) }} {!! $row->item->description !!} @if (!empty($row->item->presentation)) {!! $row->item->presentation->description !!} @endif