@if(isset($__user))

@if ($__user->name) {{ $__user->name }} @endif

@if($__user->email) {{ $__user->email }} @endif

@if($__user->phone) {{ $__user->phone }} @endif

@if ($__user->address)

{{ $__user->address }}

@endif @if ($__user->document)

{{ $__user->document }}

@endif

@endif

@if($order->delivery_note == \App\Models\Order::DELIVERY_NOTE_YES) Nota de entrega @else Pedido @endif

Número: {{ $order->number_format }} {{$is_copy ? ' (COPIA)' : ''}}

Fecha: {{ $order->created_format }}


Cliente: {{ $order->client ? $order->client->name : '' }}

RIF: {{ $order->client ? $order->client->document : '' }}

Dirección: {{ $order->client ? $order->client->address : '' }}


@php $iva_8 = 0; $iva_16 = 0; $iva_31 = 0; @endphp @foreach($order->details as $item) @php if ($item->product->exento == \App\Models\Product::NO_EXENTO) { $iva_product = (($item->subtotal * $item->product->iva_porcentage) / 100); if ($item->product->iva == \App\Models\Product::IVA_DIECISEIZ) { $iva_16 += $iva_product; } else if ($item->product->iva == \App\Models\Product::IVA_OCHO) { $iva_8 += $iva_product; } else if ($item->product->iva == \App\Models\Product::IVA_TREINTAIUNO) { $iva_31 += $iva_product; } } @endphp

{{ $item->product ? $item->product->name : '' }} {{ $item->color ? (', '.$item->color->name) : '' }} {{ $item->size ? (', '.$item->size->name) : '' }}

Código {{ $item->product ? $item->product->code : '' }}

{{ Money::formatQuantity($item->quantity) }} x {{ Money::get(Money::convertFrom($item->price,$conversion),'') }} @if($item->discount > 0) - {{Money::get(Money::convertFrom($item->discount,$conversion),'')}} ({{Money::get($item->discount_percentage,'')}}%) @endif

{{ Money::get(Money::convertFrom($item->total,$conversion),'') }}

@endforeach
@if($order->discount_percentage > 0) @endif @if( !is_null($order->iva )) @if($iva_16 > 0) @endif @if($iva_8 > 0) @endif @if($iva_31 > 0) @endif @endif
Subtotal {{ Money::get(Money::convertFrom($order->subtotal,$conversion),$currency_symbol) }}
% de descuento ({{ Money::getFormat($order->discount_percentage) }}%) -{{Money::get(Money::convertFrom($order->discount,$conversion),$currency_symbol)}}
IVA (16%): {{ Money::get(Money::convertFrom($iva_16,$conversion),$currency_symbol) }}
IVA (8%): {{ Money::get(Money::convertFrom($iva_8,$conversion),$currency_symbol) }}
IVA (31%): {{ Money::get(Money::convertFrom($iva_31,$conversion),$currency_symbol) }}
TOTAL {{ $currency_symbol }} {{ Money::get(Money::convertFrom($order->total,$conversion),$currency_symbol) }}

Condic. Pago: @if (count($order->payments) > 0 || $order->status_payment == \App\Models\Order::TO_PAY) @if ($order->status_payment == \App\Models\Order::TO_PAY) CRÉDITO @else CRÉDITO PAGADO @endif @else CONTADO @endif

@if (count($order->payment_methods) > 0) @if (count($order->payments) > 0 || $order->status_payment == \App\Models\Order::TO_PAY)

Pagos iniciales:

@else

Pagos al contado:

@endif @foreach($order->payment_methods as $item)

Pago: {{ Money::get(Money::convertFrom($item->amount,$conversion),$currency_symbol) }}

{{ $item->method ? $item->method->name : '' }}

{{ \Carbon\Carbon::parse($item->created_at)->format('d/m/Y H:i') }}

@endforeach @endif {{-- @if (count($order->payments) > 0 || $order->status_payment == \App\Models\Order::TO_PAY) @if (count($order->payments) > 0)

Pagos por cuotas:

@foreach($order->payments as $item)

Pago: {{ Money::get(Money::convertFrom($item->amount,$conversion),$currency_symbol) }}

{{ $item->method ? $item->method->name : '' }}

{{ \Carbon\Carbon::parse($item->created_at)->format('d/m/Y H:i') }}

@endforeach @endif @endif --}} @if($order->status_payment == \App\Models\Order::TO_PAY)

Esta factura cancelada total o parcialmente en moneda distinta a la de curso legal en el país, puede estar sujeta al IGTF del 3 % según normativa legal vigente

@endif

Realizado por: {{ $user_register->name ?? ''}}

@if($order->statusText === 'Rechazado' || $order->statusText === 'Anulado')

{{ $order->statusText }}

Motivo: {{ $order->comments }}

@endif

{{ $order->admin ? $order->admin->sell_note : '' }}