@extends('metronic.base') @section('titulo') credito fiscal @endsection @section('content') @include('sessions') @include('compra.modals.modalFacturarCV') @php $habilitado = 'readonly'; @endphp @if ($documento->posteado != 1) @php $habilitado = ''; @endphp @if (count($detallesCV) > 0) @else @endif @endif

@if ($tipo == 1) Comprobante de Crédito Fiscal para la orden de compra {{ $documento->oc->codigo }} @else Factura para la orden de compra {{ $documento->oc->codigo }} @endif

@csrf

@csrf


@if ($documento->state !== 'FACTURADO')

Detalle

@if (count($select) == 0) @else
@csrf
@endif
@endif

Detalles facturados

@php $contIva = 0; $contST = 0; $contCNS = 0; $contCE = 0; $contCG = 0; @endphp @if (count($detallesCV) > 0) @foreach ($detallesCV as $key=> $item) @endforeach {{-- {{-- --}}
Cantidad Descripción P/U No sujeto Exenta Gravada Iva Total Eliminar
{{ $item->cantidad }} {{ $item->descripcion }} {{ number_format($item->precio_unitario, 2) }} @if ($item->impuesto == 2) {{ number_format($item->precio_unitario * $item->cantidad, 2) }} @php $contST = $contST + $item->precio_unitario * $item->cantidad; $contCNS = $contCNS + $item->precio_unitario * $item->cantidad; @endphp @else 0.00 @endif @if ($item->impuesto == 3) {{ number_format($item->precio_unitario * $item->cantidad, 2) }} @php $contST = $contST + $item->precio_unitario * $item->cantidad; $contCE = $contCE + $item->precio_unitario * $item->cantidad; @endphp @else 0.00 @endif @if ($item->impuesto == 1) {{ number_format($item->precio_unitario * $item->cantidad, 2) }} @php $contIva = $contIva + $item->precio_unitario * $item->cantidad * 0.13; $contST = $contST + $item->precio_unitario * $item->cantidad; $contCG = $contCG + $item->precio_unitario * $item->cantidad; @endphp @else 0.00 @endif {{ number_format($item->iva, 2) }} {{ number_format($item->precio_unitario * $item->cantidad + $item->iva, 2) }} @include('compra.modals.deleteServiceDocumento')
${{ number_format($detalle->venta_nosujeta, 2) ?? ''}} ${{ number_format($detalle->venta_exenta, 2) ?? ''}} ${{ number_format($detalle->venta_gravada, 2) ?? ''}} ${{ number_format($detalle->iva, 2) ?? '-'}} ${{ number_format($detalle->venta_total, 2) ?? ''}}

RESUMEN


13% IVA: ${{ number_format($detalle->iva, 2) ?? '-'}}

SUB-TOTAL: ${{ number_format($detalle->sub_total, 2) ?? '' }}

IVA PERCIBIDO: ${{ number_format($detalle->iva_percibido, 2) ?? ''}}

IVA RETENIDO: ${{ number_format($detalle->iva_retenido, 2) ?? ''}}

COMPRA NO SUJETA: ${{ number_format($detalle->venta_nosujeta, 2) ?? ''}}

COMPRA EXENTA: ${{ number_format($detalle->venta_exenta, 2) ?? ''}}

COMPRA GRAVADA: ${{ number_format($detalle->venta_gravada, 2) ?? ''}}


COMPRA TOTAL: ${{ number_format($detalle->venta_total, 2) ?? ''}}
--}}
@else @endif
@php if ($detalle->iva == 0) { $detalle->iva = $contIva; } if ($detalle->sub_total == 0) { $detalle->sub_total = $contST; } if ($detalle->venta_nosujeta == 0) { $detalle->venta_nosujeta = $contCNS; } if ($detalle->venta_exenta == 0) { $detalle->venta_exenta = $contCE; } if ($detalle->venta_gravada == 0) { $detalle->venta_gravada = $contCG; } if ($detalle->venta_total == 0) { $detalle->venta_total = $detalle->iva + $detalle->sub_total; } @endphp {{--

Resumen

@if ($detalle->sub_total == 0) @else @endif
@csrf
@if ($documento->state !== 'FACTURADO')
@endif
--}} @endsection