{{-- NOTA DEBITO ELECTRONICA Nro: {{$resolution->prefix}} - {{$request->number}} --}} @if(isset($request->head_note))

{{$request->head_note}}

@endif
@if($customer->company->country->id == 46) @else @endif
CC o NIT: {{$customer->company->identification_number}}-{{$request->customer['dv'] ?? NULL}}
Cliente: {{$customer->name}}
Regimen: {{$customer->company->type_regime->name}}
Obligación: {{$customer->company->type_liability->name}}
Dirección: {{$customer->company->address}}
Ciudad:{{$customer->company->municipality->name}} - {{$customer->company->country->name}} {{$customer->company->municipality_name}} - {{$customer->company->state_name}} - {{$customer->company->country->name}}
Telefono: {{$customer->company->phone}}
Email: {{$customer->email}}
@if(isset($request['order_reference']['id_order'])) @endif @if(isset($request['order_reference']['issue_date_order'])) @endif @if(isset($healthfields)) @endif @if(isset($request['number_account'])) @endif
Forma de Pago: {{$paymentForm->name}}
Medio de Pago: {{$paymentForm->nameMethod}}
Plazo Para Pagar: {{$paymentForm->duration_measure}} Dias
Fecha Vencimiento: {{$paymentForm->payment_due_date}}
Numero Pedido: {{$request['order_reference']['id_order']}}
Fecha Pedido: {{$request['order_reference']['issue_date_order']}}
Inicio Periodo Facturacion: {{$healthfields->invoice_period_start_date}}
Fin Periodo Facturacion: {{$healthfields->invoice_period_end_date}}
Número de cuenta: {{ $request['number_account'] }}
@if(isset($request['order_reference']['id_order'])) @endif @if(isset($request['order_reference']['issue_date_order'])) @endif @if(isset($healthfields)) @endif
Numero Pedido: {{$request['order_reference']['id_order']}}
Fecha Pedido: {{$request['order_reference']['issue_date_order']}}
Inicio Periodo Facturacion: {{$healthfields->invoice_period_start_date}}
Fin Periodo Facturacion: {{$healthfields->invoice_period_end_date}}

Referencia: {{$billing_reference->number}} - Fecha: {{$billing_reference->issue_date}}

CUFE: {{$billing_reference->uuid}}


@isset($healthfields)
INFORMACION REFERENCIAL SECTOR SALUD
@foreach($healthfields->users_info as $item) @endforeach
Cod Prestador Datos Usuario Info. Contrat./Cobertura Nros. Autoriz./MIPRES Info. de Pagos

{{$item->provider_code}}

Nro ID: {{$item->identification_number}}

Nombre: {{$item->first_name}} {{$item->surname}}

Tipo Documento: {{$item->health_type_document_identification()->name}}

Tipo Usuario: {{$item->health_type_user()->name}}

Modalidad Contratacion: {{$item->health_contracting_payment_method()->name}}

Nro. Contrato: {{$item->contract_number}}

Cobertura: {{$item->health_coverage()->name}}

Nros Autorizacion: {{$item->autorization_numbers}}

Nro MIPRES: {{$item->mipres}}

Entrega MIPRES: {{$item->mipres_delivery}}

Nro Poliza: {{$item->policy_number}}

Copago: {{number_format($item->co_payment, 2)}}

Cuota Moderardora: {{number_format($item->moderating_fee, 2)}}

Cuota Recuperacion: {{number_format($item->recovery_fee, 2)}}

Pagos Compartidos: {{number_format($item->shared_payment, 2)}}


@endisset @foreach($request['debit_note_lines'] as $item) @inject('um', 'App\UnitMeasure') @if(isset($item['tax_totals'][0]['tax_amount'])) @else @endif @if(isset($item['tax_totals'][0]['tax_amount'])) @else @endif @if(isset($item['allowance_charges'])) @else @endif @endforeach
# Código Descripcion Cantidad UM Val. Unit IVA/IC Dcto Val. Item
{{$ItemNro}} {{$item['code']}} @if(isset($item['notes'])) {{$item['description']}}

Nota: {{$item['notes']}}

@else {{$item['description']}} @endif
{{number_format($item['invoiced_quantity'], 2)}} {{$um->findOrFail($item['unit_measure_id'])['name']}}{{number_format($item['price_amount'] - ($item['tax_totals'][0]['tax_amount'] / $item['invoiced_quantity']), 2)}}{{number_format($item['price_amount'], 2)}}{{number_format($item['tax_totals'][0]['tax_amount'], 2)}}{{number_format(0, 2)}}{{number_format($item['allowance_charges'][0]['amount'], 2)}} {{number_format($item['invoiced_quantity'] * $item['price_amount'] - $item['allowance_charges'][0]['amount'], 2)}}{{number_format("0", 2)}} {{number_format($item['invoiced_quantity'] * $item['price_amount'], 2)}}

Impuestos Retenciones Totales
@if(isset($request->tax_totals)) @foreach($request->tax_totals as $item) @inject('tax', 'App\Tax') @endforeach @else @endif
Tipo Base Porcentaje Valor
{{$tax->findOrFail($item['tax_id'])['name']}} {{number_format($item['taxable_amount'], 2)}} {{number_format($item['percent'], 2)}}% {{number_format($item['tax_amount'], 2)}}
@if(isset($withHoldingTaxTotal)) @foreach($withHoldingTaxTotal as $item) @inject('tax', 'App\Tax') @endforeach @endif
Tipo Base Porcentaje Valor
{{$tax->findOrFail($item['tax_id'])['name']}} {{number_format($item['taxable_amount'], 2)}} {{number_format($item['percent'], 2)}}% {{number_format($item['tax_amount'], 2)}}
@if(isset($request->requested_monetary_totals['allowance_total_amount'])) @else @endif @if(isset($request->tarifaica)) @if(isset($request->requested_monetary_totals['allowance_total_amount'])) @else @endif @else @endif
Concepto Valor
Nro Lineas: {{$ItemNro}}
Base: {{number_format($request->requested_monetary_totals['line_extension_amount'], 2)}}
Impuestos: {{number_format($TotalImpuestos, 2)}}
Retenciones: {{number_format($TotalRetenciones, 2)}}
Descuentos:{{number_format($request->requested_monetary_totals['allowance_total_amount'], 2)}}{{number_format(0, 2)}}
Total Nota:{{number_format(round($request->requested_monetary_totals['payable_amount'] + $request->requested_monetary_totals['allowance_total_amount'], 2), 2)}}{{number_format(round($request->requested_monetary_totals['payable_amount'] + 0, 2), 2)}}{{number_format(round($request->requested_monetary_totals['payable_amount'], 2), 2)}}

@inject('Varios', 'App\Custom\NumberSpellOut')

NOTAS:

{{$notes}}


@if(isset($request->tarifaica)) @if(isset($request->requested_monetary_totals['allowance_total_amount']))

SON: {{$Varios->convertir(round($request->requested_monetary_totals['payable_amount'] + $request->requested_monetary_totals['allowance_total_amount'], 2), $request->idcurrency)}} M/CTE*********.

@else

SON: {{$Varios->convertir(round($request->requested_monetary_totals['payable_amount'] + 0, 2), $request->idcurrency)}} M/CTE*********.

@endif @else @if(isset($request->requested_monetary_totals['allowance_total_amount']))

SON: {{$Varios->convertir(round($request->requested_monetary_totals['payable_amount'] + $request->requested_monetary_totals['allowance_total_amount'], 2), $request->idcurrency)}} M/CTE*********.

@else

SON: {{$Varios->convertir(round($request->requested_monetary_totals['payable_amount'] + 0, 2), $request->idcurrency)}} M/CTE*********.

@endif @endif

@if(isset($request->disable_confirmation_text)) @if(!$request->disable_confirmation_text)

CUALQUIER INQUIETUD SOBRE ESTE DOCUMENTO AL TELEFONO {{$company->phone}} o al e-mail {{$user->email}}

FIRMA ACEPTACIÓN:


CC:


FECHA:

@endif @endif