@php $establishment = $document->establishment; $customer = $document->customer; $invoice = $document->invoice; //$path_style = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.'style.css'); $accounts = \App\Models\BankAccount::all(); $tittle = $document->prefix.'-'.str_pad($document->id, 8, '0', STR_PAD_LEFT); @endphp {{--{{ $tittle }}--}} {{----}} @if($company->logo)
logo}"))}};base64, {{base64_encode(file_get_contents(public_path("storage/uploads/logos/{$company->logo}")))}}" alt="{{$company->name}}" class="company_logo_ticket contain">
{{--@else--}} {{--
--}} {{----}} {{--
--}} @endif
{{ $company->name }}
@isset($establishment->trade_address)
{{ ($establishment->trade_address !== '-')? 'Dirección: '.$establishment->trade_address : '' }} {{ ($establishment->district_id !== '-')? ', '.$establishment->district->description : '' }} {{ ($establishment->province_id !== '-')? ', '.$establishment->province->description : '' }} {{ ($establishment->department_id !== '-')? '- '.$establishment->department->description : '' }}
@endisset

{{ ($establishment->telephone !== '-')? 'Tél.: '.$establishment->telephone : '' }}

{{ ($establishment->email !== '-')? 'Email: '.$establishment->email : '' }}

COTIZACIÓN

{{ $tittle }}
@if($document->date_of_due) @endif @if($document->delivery_date) @endif @if ($customer->address !== '') @endif @if ($document->shipping_address) @endif @if ($customer->telephone) @endif @if ($document->payment_method_type) @endif @if ($document->account_number) @endif @if ($document->sale_opportunity) @endif @if ($document->description) @endif @if ($document->purchase_order) @endif @if ($document->quotation_id) @endif

Fecha:

{{ \Carbon\Carbon::parse($document->date_of_issue)->format('d-m-Y') }} Hora: {{ \Carbon\Carbon::parse($document->created_at)->format('h:m:s') }}

F. Vencimiento:

{{ $document->date_of_due }}

F. Entrega:

{{ $document->delivery_date }}

Cliente:

{{ $customer->name }}

{{ $customer->identity_document_type->description }}:

{{ $customer->number }}

Dirección:

{{ $customer->address }} {{ ($customer->district_id !== '-')? ', '.$customer->district->description : '' }} {{ ($customer->province_id !== '-')? ', '.$customer->province->description : '' }} {{ ($customer->department_id !== '-')? '- '.$customer->department->description : '' }}

Dir. Envío:

{{ $document->shipping_address }}

Teléfono:

{{ $customer->telephone }}

Pago:

{{ $document->payment_method_type->description }}

N° Cuenta:

{{ $document->account_number }}

O. Venta:

{{ $document->sale_opportunity->number_full }}

Atendido por:

{{ $document->user->name }}

Tratamiento:

{{ $document->description }}

Orden de Compra:

{{ $document->purchase_order }}

Cotización:

{{ $document->quotation->identifier }}

@foreach($document->items as $row) @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
CANTIDAD DESCRIPCIÓN P.UND__ TOTAL
@if(((int)$row->quantity != $row->quantity)) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif {!!$row->item->description!!} @if (!empty($row->item->presentation)) {!!$row->item->presentation->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
{{ number_format($row->unit_price, 2) }} {{ number_format($row->total, 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) }}
SUBTOTAL: {{ $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) }}
IVA: {{ $document->currency_type->symbol }} {{ number_format($document->total_igv, 2) }}
TOTAL : {{ $document->currency_type->symbol }} {{ number_format($document->total,2) }}
DESCUENTO: {{ $document->currency_type->symbol }} {{ number_format($document->apply_discount, 2) }}
TOTAL A PAGAR: {{ $document->currency_type->symbol }} {{ number_format($document->total-$document->apply_discount, 2) }}
@foreach(array_reverse((array) $document->legends) as $row) @if ($row->code == "1000") @if (count((array) $document->legends)>1) @endif @else @endif @endforeach
Son: {{ $row->value }} {{ $document->currency_type->description }}
Leyendas
{{$row->code}}: {{ $row->value }}

@foreach($accounts as $account) {{$account->bank->description}} {{$account->currency_type->description}}
N°: {{$account->number}} @if($account->cci) - CCI: {{$account->cci}} @endif
@endforeach