@php $establishment = $document->establishment; $customer = $document->customer; //$path_style = app_path('CoreFacturalo'.DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'pdf'.DIRECTORY_SEPARATOR.'style.css'); $left = ($document->series) ? $document->series : $document->prefix; $tittle = $left.'-'.str_pad($document->number, 8, '0', STR_PAD_LEFT); $payments = $document->payments; @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" 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
NOTA DE VENTA

{{ $tittle }}

@if($customer->telephone !== null) @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')}}
UBIGEO O/C CONDICIONES DE PAGO VENDEDOR ESTADO
@php $payment = 0; @endphp @foreach($payments as $row) {{ $row->payment_method_type->description }} @endforeach {{ $document->user->name }} @if ($document->total_canceled) CANCELADO @else PENDIENTE DE PAGO @endif
@if ($document->guides)
{{--Guías:--}} @foreach($document->guides as $guide) @if(isset($guide->document_type_description)) @else @endif @endforeach
{{ $guide->document_type_description }}{{ $guide->document_type_id }}: {{ $guide->number }}
@endif @foreach($document->items as $row) @endforeach
CÓDIGO MARCA DESCRIPCIÓN CANT. U.M. P.U IMPORTE
{{ $row->relation_item->internal_id }} {{ $row->relation_item->brand != null ? $row->relation_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) }}