@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; $accounts = \App\Models\Tenant\BankAccount::all(); $tittle = $document->prefix . '-' . str_pad($document->number ?? $document->id, 8, '0', STR_PAD_LEFT); $count = 0; // dd($establishment); @endphp
@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: 250px;">
{{-- --}}

{{ $company->name }}

{{ $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 !== '-' ? 'Correo: ' . $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
{{ 'R.U.C. ' . $company->number }}


Cotiazción Nº
{{ $tittle }}
Fecha: {{ $document->date_of_issue->format('Y-m-d') }}
{{--

{{ $tittle }}

--}}
@if ($document->payment_method_type && isset($document->payment_method_type->description)) {{ $document->payment_method_type->description }} @else Contado @endif {{-- --}} {{-- @if ($customer->address !== '') @endif --}} {{-- --}}
Empresa: {{ $customer->name }} {{ $customer->identity_document_type->description }}: {{ $customer->number }}
Vendedor: @if ($document->seller->name) {{ $document->seller->name }} @else {{ $document->user->name }} @endif Condición de Pago:
Contacto: @if ($document->contact) {{ $document->contact }} @endif Tiempo de validez: {{ $document->date_of_due }}
Teléfono: @if ($document->phone) {{ $document->phone }} @endif Tiempo de entrega: {{ $document->delivery_date }}
Información: @if ($document->referential_information) {{ $document->referential_information }} @endif {{ $document->delivery_date }}
EMAIL: {{ $customer->email }} Tiempo de entrega: {{ $document->delivery_date }} Vendedor: @if ($document->seller->name) {{ $document->seller->name }} @else {{ $document->user->name }} @endif
Teléfono: {{ $customer->telephone }}
@if ($document->description)
Observación: {{ $document->description }}
@endif

Por medio de la presente reciba usted nuestros más cordiales saludos, y a su vez hacerle llegar la Cotización solicitada de nuestros productos.

@php // dd($document->terms_condition); @endphp @foreach ($document->items as $row) @php // dd($row->attributes); // dd(public_path("storage/uploads/items/{$row->item->attributes->image_small}")); // dd($row->getPrintExtraData()); $extra_string = $row->getPrintExtraData(); // $imagen = $extra_string['image_url']; // dd($extra_string['image_url']); // dd($row_data->image); $count++; @endphp {{-- --}} @endforeach @if ($document->total_exportation > 0) @endif @if ($document->total_free > 0) @endif @if ($document->total_unaffected > 0) @endif @if ($document->total_exonerated > 0) @endif @if ($document->total_taxed > 0) @endif @if ($document->total_discount > 0) @endif
Item Descripción Imagen referencial Cant. Unid. P.Unit Sub. Total
{{ $count }} @if ($row->item->name_product_pdf ?? false) {!! $row->item->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 (isset($row->item->extra_attr_value) && $row->item->extra_attr_value != '')
{{ $row->item->extra_attr_name }}: {{ $row->item->extra_attr_value }} @endif @if ($row->item->is_set == 1)
@inject('itemSet', 'App\Services\ItemSetService') @foreach ($itemSet->getItemsSet($row->item_id) as $item) {{ $item }}
@endforeach @endif
{{-- @foreach ($row->getPrintExtraData() as $row_data) --}} {{-- alt="{{ $company->name }}" alt="" class="item_logo" style="max-width: 150px;"> --}} {{-- @endforeach --}} @if ((int) $row->quantity != $row->quantity) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif {{ symbol_or_code($row->item->unit_type_id) }} {{ $row->item->has_igv != 'true' ? number_format($row->unit_value, 2) : number_format($row->unit_price, 2) }} {{ $row->item->has_igv == 'true' ? number_format($row->total, 2) : number_format($row->total_value, 2) }}
Op. Exportación: {{ $document->currency_type->symbol }} {{ number_format($document->total_exportation, 2) }}
Op. Gratuitas: {{ $document->currency_type->symbol }} {{ number_format($document->total_free, 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) }}
{{ $document->total_prepayment > 0 ? 'Anticipo' : 'Descuento TOTAL' }}: {{ $document->currency_type->symbol }} {{ number_format($document->total_discount, 2) }}
IGV: {{ $document->currency_type->symbol }} {{ number_format($document->total_igv, 2) }}
Total a pagar: {{ $document->currency_type->symbol }} {{ number_format($document->total, 2) }}

. @foreach ($accounts as $account) @endforeach
Banco Moneda Cta. Cte. Cuenta Interbancaria (CCI)
{{ $account->bank->description }} {{ $account->currency_type->description }} {{ $account->number }} {{ $account->cci }}


{!! $document->terms_condition !!}
{{-- {!!$document->terms_condition!!} --}}