{{-- FACTURA 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}}
Régimen: {{$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}}
Teléfono: {{$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 @if(isset($request['deliveryterms'])) @inject('currency', 'App\TypeCurrency') @endif
Forma de Pago: {{$paymentForm->name}}
Medio de Pago: {{$paymentForm->nameMethod}}
Plazo Para Pagar: {{$paymentForm->duration_measure}} Dias
Fecha Vencimiento: {{$paymentForm->payment_due_date}}
Número Pedido: {{$request['order_reference']['id_order']}}
Fecha Pedido: {{$request['order_reference']['issue_date_order']}}
Inicio Periodo Facturación: {{$healthfields->invoice_period_start_date}}
Fin Periodo Facturación: {{$healthfields->invoice_period_end_date}}
Número de cuenta: {{$request['number_account'] }}
Terminos de Entrega: {{$request['deliveryterms']['loss_risk_responsibility_code']}} - {{ $request['deliveryterms']['loss_risk'] }}
T.R.M: {{number_format($request['calculationrate'], 2)}}
Fecha T.R.M: {{$request['calculationratedate']}}
Tipo Moneda: {{$currency->findOrFail($request['idcurrency'])['name']}}

@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}}

Modalidad Contratación: {{$item->health_contracting_payment_method()->name}}

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

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

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

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

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

Anticipos: {{number_format($item->advance_payment, 2)}}


@endisset @foreach($request['invoice_lines'] as $item) @inject('um', 'App\UnitMeasure') @if($item['description'] == 'Administración' or $item['description'] == 'Imprevisto' or $item['description'] == 'Utilidad') @if(isset($item['allowance_charges']))
# Código Descripción Cant Val. Unit IVA/IC Dcto Val. Item
{{$ItemNro}} {{$item['code']}} {{$item['description']}} {{number_format($item['price_amount'], 2)}} {{number_format($item['tax_totals'][0]['tax_amount'], 2)}}