@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 {{--{{ $document_number }}--}} {{----}} @if($document->state_type->id == '11')
anulado
@endif
@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
@foreach($document->items as $row) @endforeach
CÓDIGO MARCA DESCRIPCIÓN CANT. U.M. P.U IMPORTE
{{ $row->item->internal_id }} {{ $row->m_item->brand != null ? $row->m_item->brand->name : '' }} @if($row->name_product_pdf) {!!$row->name_product_pdf!!} @else {!!$row->item->description!!} @endif @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 --}} @if($row->item->is_set == 1)
@inject('itemSet', 'App\Services\ItemSetService') {{join( "-", $itemSet->getItemsSet($row->item_id) )}} @endif
@if(((int)$row->quantity != $row->quantity)) {{ $row->quantity }} @else {{ number_format($row->quantity, 0) }} @endif {{ $row->item->unit_type_id }} {{ number_format($row->unit_price, 2) }} {{ number_format($row->total, 2) }}
SON: @foreach(array_reverse( (array) $document->legends) as $row) @if ($row->code == "1000") {{ $row->value }} {{ $document->currency_type->description }} @else {{$row->code}}: {{ $row->value }} @endif @endforeach
OBSERVACIONES: @if($document->additional_information) @foreach($document->additional_information as $information) @if ($information) {{ $information }} @endif @endforeach @endif
IMPORTE BRUTO DESCUENTOS TOTAL VALOR VENTA I.G.V. 18% TOTAL PRECIO VENTA PAGO A CUENTA NETO A PAGAR
@if($document->total_taxed > 0) {{ $document->currency_type->symbol }} {{ number_format($document->total_taxed, 2) }} @endif @if($document->total_discount > 0) {{ $document->currency_type->symbol }} {{ number_format($document->total_discount, 2) }} @endif @if($document->total_taxed > 0) {{ $document->currency_type->symbol }} {{ number_format($document->total_taxed, 2) }} @endif {{ $document->currency_type->symbol }} {{ number_format($document->total_igv, 2) }} {{ $document->currency_type->symbol }} {{ number_format($document->total, 2) }} {{ $document->currency_type->symbol }} {{ number_format($document->total, 2) }}
@foreach($accounts as $account) @endforeach
Banco Moneda Código de Cuenta Interbancaria Código de Cuenta
{{$account->bank->description}} {{$account->currency_type->description}} @if($account->cci) {{$account->cci}} @endif {{$account->number}}
Representación Impresa de {{ isset($document->document_type) ? $document->document_type->description : 'Comprobante Electrónico' }} {{ isset($document->hash) ? 'Código Hash: '.$document->hash : '' }}
Para consultar el comprobante ingresar a {!! url('/buscar') !!}