@php $establishment = $document->establishment; $customer = $document->customer; $invoice = $document->invoice; $document_base = ($document->note) ? $document->note : null; //$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); $accounts = \App\Models\Tenant\BankAccount::all(); if($document_base) { $affected_document_number = ($document_base->affected_document) ? $document_base->affected_document->series.'-'.str_pad($document_base->affected_document->number, 8, '0', STR_PAD_LEFT) : $document_base->data_affected_document->series.'-'.str_pad($document_base->data_affected_document->number, 8, '0', STR_PAD_LEFT); } else { $affected_document_number = null; } $payments = $document->payments; $document->load('reference_guides'); $total_payment = $document->payments->sum('payment'); $balance = ($document->total - $total_payment) - $document->payments->sum('change'); @endphp
@if($company->logo)
logo}"))}};base64, {{base64_encode(file_get_contents(public_path("storage/uploads/logos/{$company->logo}")))}}" alt="{{$company->name}}" class="company_logo" style="max-width: 100px;">
@endif
{{ $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 !== '-')? 'Telf. '.$establishment->telephone : '' }}
{{ ($establishment->email !== '-')? '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

{{ 'RUC '.$company->number }}

{{ $document->document_type->description }}


{{ $document_number }}

@if($customer->telephone !== '-') @endif
SEÑOR(ES): {{ $customer->name }}
DIRECCIÓN: @if ($customer->address !== '') {{ $customer->address }} {{ ($customer->district_id !== '-')? ', '.$customer->district->description : '' }} {{ ($customer->province_id !== '-')? ', '.$customer->province->description : '' }} {{ ($customer->department_id !== '-')? '- '.$customer->department->description : '' }} @endif
TELÉFONO: {{ $customer->telephone}}
RUC: {{$customer->number}}
MONEDA: {{ $document->currency_type->description }}
FECHA: {{$document->date_of_issue->format('Y-m-d')}} @if($invoice) FECHA VENC.: {{$invoice->date_of_due->format('Y-m-d')}} @endif
UBIGEO O/C CONDICIONES DE PAGO VENDEDOR GUÍA DE REMISIÓN AGENCIA DE TRANSPORTE
@php $payment = 0; @endphp @foreach($payments as $row) {{ $row->payment_method_type->description }} @endforeach {{ $document->user->name }} @if ($document->guides) @foreach($document->guides as $guide) {{ $guide->number }} @endforeach @endif @if ($document->reference_guides) @foreach($document->reference_guides as $guide) {{ $guide->number }} @endforeach @endif
@if($document->state_type->id == '11')
anulado
@else @if($company->logo)
logo}"))}};base64, {{base64_encode(file_get_contents(public_path("storage/uploads/logos/{$company->logo}")))}}" alt="logo" class="" style="opacity: 0.1;">
@endif @endif