{{--

{{ DB::table('empresas')->count() == 0 ? 'SISCOM ' : DB::table('empresas')->first()->razon_social }}

{{ $empresa->direccion_fiscal }}

-------------------------

--}}

RUC {{ DB::table('empresas')->count() == 0 ? '- ' : DB::table('empresas')->first()->ruc }}

{{ $sede->nombre }}

{{ $sede->direccion }}

Teléfono: {{ $sede->telefono }}


{{ $documento->nombreDocumento() }}

{{ $documento->serie . '-' . $documento->correlativo }}


@if ($documento->observacion) @endif
F. EMISIÓN : {{ getFechaFormato($documento->fecha_documento, 'd/m/Y') }} {{ date_format($documento->created_at, 'H:i') }}
F. VENC. : {{ getFechaFormato($documento->fecha_vencimiento, 'd/m/Y') }}
CLIENTE : {{ $documento->clienteEntidad->nombre }}
{{ $documento->tipo_documento_cliente }} : {{ $documento->clienteEntidad->documento }}
DIRECCIÓN : {{ $documento->clienteEntidad->direccion }}
TELÉFONO : {{ $documento->clienteEntidad->telefono_movil }}
PLACA : {{ $documento->observacion }}
ATENDIDO POR : {{ $documento->user->usuario }}
ALMACÉN : {{ $documento->almacen_nombre }}

@if (!$documento->es_anticipo) @foreach ($detalles as $item) @if ($documento->tipo_venta_id == 129) @if ($item->cantidad - $item->detalles->sum('cantidad') > 0) @endif @else @endif @endforeach @endif @if ($documento->es_anticipo) @foreach ($detalles as $item) @if ($documento->tipo_venta_id == 129) @if ($item->cantidad - $item->detalles->sum('cantidad') > 0) @endif @else @endif @endforeach @endif @if ($documento->anticipo_consumido_id) @endif @if ($documento->monto_embalaje != 0) @endif @if ($documento->monto_envio != 0) @endif @if ($documento->tipo_venta_id != 129) @if ($documento->monto_descuento != 0) @endif @if (!empty($documento->retencion)) @endif @else @if ($documento->monto_descuento != 0) @endif @endif
CANT UM DESCRIPCION P.UNIT. TOTAL
{{ number_format($item->cantidad - $item->detalles->sum('cantidad'), 2) }} {{ $item->unidad }} {{ $item->nombre_producto . '-' . $item->nombre_modelo . '-' . $item->nombre_color . '-' . $item->nombre_talla }} {{ number_format($item->precio_unitario, 2) }} {{ number_format(($item->cantidad - $item->detalles->sum('cantidad')) * $item->precio_unitario, 2) }}
{{ number_format($item->cantidad, 2) }} {{ $item->unidad }} {{ $item->nombre_producto . '-' . $item->nombre_modelo . '-' . $item->nombre_color . '-' . $item->nombre_talla }} {{ number_format($item->precio_unitario, 2) }} {{ number_format($item->importe, 2) }}
- NIU {{ 'PAGO ANTICIPADO' }} - -
{{ number_format($item->cantidad - $item->detalles->sum('cantidad'), 2) }} {{ $item->unidad }} {{ $item->nombre_producto . '-' . $item->nombre_modelo . '-' . $item->nombre_color . '-' . $item->nombre_talla }} {{ number_format($item->precio_unitario, 2) }} {{ number_format(($item->cantidad - $item->detalles->sum('cantidad')) * $item->precio_unitario, 2) }}
{{ number_format($item->cantidad, 2) }} {{ $item->unidad }} {{ $item->nombre_producto . '-' . $item->nombre_modelo . '-' . $item->nombre_color . '-' . $item->nombre_talla }} {{ number_format($item->precio_unitario, 2) }} {{ number_format($item->importe, 2) }}
{{ 1 }} NIU {{ 'ANTICIPO: FACTURA NRO. ' . $documento->anticipo_consumido_serie . '-' . $documento->anticipo_consumido_correlativo }} {{ number_format($documento->anticipo_monto_consumido * -1, 2) }} {{ number_format($documento->anticipo_monto_consumido * -1, 2) }}
{{ number_format(1, 2) }} NIU EMBALAJE {{ number_format($documento->monto_embalaje, 2) }} {{ number_format($documento->monto_embalaje, 2) }}
{{ number_format(1, 2) }} NIU ENVÍO {{ number_format($documento->monto_envio, 2) }} {{ number_format($documento->monto_envio, 2) }}
Descuento: S/. {{ number_format($documento->monto_descuento, 2) }}
Sub Total: S/. {{ number_format($documento->total, 2) }}
IGV: S/. {{ number_format($documento->total_igv, 2) }}
Total: S/. {{ number_format($documento->total + $documento->retencion->impRetenido, 2) }}
Imp. Retenido: S/. {{ number_format($documento->retencion->impRetenido, 2) }}
Total a pagar: S/. {{ number_format($documento->total_pagar, 2) }}
Descuento: S/. {{ number_format($documento->monto_descuento, 2) }}
Total a pagar: S/. {{ number_format($documento->total_pagar - $documento->notas->sum('mtoImpVenta'), 2) }}

{{ $documento->legenda }}


@if ($documento->tipo_pago_nombre != 'EFECTIVO' && $documento->estado_pago == 'PAGADA')
FORMA PAGO : {{ $documento->pago_1_tipo_pago_nombre }}
N° OPERACION : {{ $documento->pago_1_nro_operacion }}
FECHA DE PAGO : {{ $documento->pago_1_fecha_operacion }}
HORA DE PAGO : {{ $documento->pago_1_hora_operacion }}
@endif
@if ($despacho)
AGENCIA : {{ $despacho->empresa_envio_nombre }}
SEDE : {{ $despacho->sede_envio_nombre }}
DIRECCIÓN : {{ $despacho->direccion_entrega }}
DISTRITO : {{ $despacho->distrito }}
PROVINCIA : {{ $despacho->provincia }}
DEPARTAMENTO : {{ $despacho->departamento }}
DESTINATARIO NOMBRE : {{ $despacho->destinatario_nombre }}
DESTINATARIO DOC : {{ $despacho->destinatario_tipo_doc . '-' . $despacho->destinatario_nro_doc }}
@endif

@if ($mostrar_cuentas === 'SI')
@foreach ($empresa->bancos as $banco)

{{ $banco->descripcion }} {{ $banco->tipo_moneda }} N°: {{ $banco->num_cuenta }} CCI: {{ $banco->cci }}

@endforeach
@endif @if (strtoupper($documento->condicion->descripcion) == 'CREDITO' || strtoupper($documento->condicion->descripcion) == 'CRÉDITO')
Informacion del crédito
Monto neto pendiente de pago : S/. {{ number_format($documento->total_pagar - $documento->notas->sum('mtoImpVenta'), 2) }}
Total de cuotas : 1
N° Cuota Fec. Venc. Monto
1 {{ $documento->fecha_vencimiento }} {{ number_format($documento->total_pagar - $documento->notas->sum('mtoImpVenta'), 2) }}
@endif @if (!empty($documento->retencion))
Información de la retención
Base imponible de la Retención:    S/. {{ number_format($documento->total + $documento->retencion->impRetenido, 2) }} Porcentaje de retención:    {{ $documento->clienteEntidad->tasa_retencion }}% Monto de la Retención:    S/. {{ number_format($documento->retencion->impRetenido, 2) }}
@endif

@if ($documento->ruta_qr) @endif @if ($documento->hash)

Código Hash: {{ $documento->hash }}

@endif