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

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

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

Central telefónica: {{ DB::table('empresas')->count() == 0 ? '-' : DB::table('empresas')->first()->celular }}

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

{{ $documento->nombreDocumento() }}

{{ ($documento->contingencia == '0' ? $documento->serie : $documento->serie_contingencia).'-'.$documento->correlativo }}


@if ($documento->observacion) @endif
FECHA DE EMISIÓN : {{ getFechaFormato( $documento->fecha_documento ,'d/m/Y') }} {{ date_format($documento->created_at, 'H:i') }}
FECHA DE VENCIMIENTO : {{ getFechaFormato( $documento->fecha_vencimiento ,'d/m/Y') }}
CLIENTE : {{ $documento->clienteEntidad->nombre }}
{{ $documento->tipo_documento_cliente}} : {{ $documento->clienteEntidad->documento }}
DIRECCIÓN : {{ $documento->clienteEntidad->direccion }}
MODO DE PAGO : {{ $documento->formaPago() }}
PLACA : {{ $documento->observacion }}
ATENDIDO POR : {{ $documento->user->user->persona ? $documento->user->user->persona->getApellidosYNombres() : $documento->user->usuario }}

@foreach($detalles as $item) @if($documento->tipo_venta == 129) @if ($item->cantidad - $item->detalles->sum('cantidad') > 0) {{-- --}} {{-- --}} @endif @else {{-- --}} {{-- --}} @endif @endforeach @if ($documento->monto_embalaje!=0) @endif @if ($documento->monto_envio!=0) @endif @if($documento->tipo_venta != 129) @if ($documento->monto_descuento!=0) @endif @if (!empty($documento->retencion)) @endif @else @endif
CANT UM DESCRIPCION P. UNIT. TOTAL
{{ number_format($item->cantidad - $item->detalles->sum('cantidad'), 2) }} {{ $item->unidad }} {{ $item->nombre_producto }}{{ $item->precio_nuevo }}{{ number_format($item->precio_unitario,2) }}{{ number_format(($item->cantidad - $item->detalles->sum('cantidad')) * $item->precio_nuevo, 2) }}{{ number_format(($item->cantidad - $item->detalles->sum('cantidad')) * $item->precio_unitario, 2) }}
{{ number_format($item->cantidad, 2) }} {{ $item->unidad }} {{ $item->nombre_producto }}{{ $item->precio_nuevo }}{{ number_format($item->precio_unitario, 2) }}{{ $item->valor_venta }}{{ number_format($item->importe, 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 {{ $documento->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 - $documento->notas->sum('mtoImpVenta'), 2) }}
Total a pagar: S/. {{ number_format($documento->total_pagar - $documento->notas->sum('mtoImpVenta'), 2) }}

SON: {{ $legends[0]['value'] }}


@foreach($empresa->bancos as $banco)

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

@endforeach @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 - $documento->notas->sum('mtoImpVenta'), 2) }}
Total de cuotas : 1
N° Cuota Fec. Venc. Monto
1 {{ $documento->fecha_vencimiento }} {{ number_format($documento->total - $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