@extends('base') @section('titulo') detalle cotizacion completa @endsection @section('content') @php $TIP=0; $TCP=0; $TIEP=0; $TCEP=0; @endphp @section('extracss') @endsection @section('extrajs') @endsection @include('sessions') @if($cotizacion->estado=='En proceso-Ventas' && count($noAsociados)==0)
@else

LEER POR FAVOR

PARA PODER ENVIAR AL OPERATIVO, DEBE ASOCIAR TODOS LOS COSTOS, A CONTINUACIÓN SE LE LISTAN LOS COSTOS QUE NO HAN SIDO ASOCIADOS, EN LA SECCIÓN DE COSTOS PUEDE IDENTIFICARLOS CON LOS QUE SALEN DE COLOR AMARILLO.

@foreach ($noAsociados as $no) Proveedor: {{ $no->nombreProveedor }} Servicio: {{ $no->serv_name }} Costo: ${{ number_format($no->monto,2) }} @endforeach
@endif
Hoja de Trabajo de {{$cotizacion->inicial->cliente->nombre_cliente}} #{{$cotizacion->inicial->codigo_cotizacion}}
Tenga en cuenta que para poder trasladar la hoja de trabajo a operaciones el cliente debe tener por lo menos llenados su NRC, NIT y nombre comercial.
@csrf
Informacion
Recuerde que debe asignar un operativo para la operacion.
{{-- @foreach ($operativos as $operativo) --}} {{-- @endforeach --}}
{{-- --}}
@if ($cotizacion->estado!='En proceso-Operaciones') @endif @if ($cotizacion->estado == 'En proceso-Operaciones' && $operativoFlag == true) @endif
@if ($flag)
@csrf
Factor
ADVERTENCIA: Cambiar el valor del factor tendra cambios en todo el proceso operativo.
  @if ($cotizacion->estado!='En proceso-Operaciones') @endif @if ($cotizacion->estado == 'En proceso-Operaciones' && $operativoFlag == true) @endif
@endif
@csrf
RECUERDA: Los ingresos que deseas que aparezcan en el BL deben tener marcada la opcion BL al momento de agregarse. Los ingresos heredados de la cotizacion inicial que quieras agregar al BL deberas marcar el recuadro desde la opcion de editar el servicio.Solamente en caso de INGRESOS puede marcarse la opcion del BL
TEN EN CUENTA: Solamente para los COSTOS debe asignarse un proveedor.Luego de agregar el costo debes emparejarlo con un ingreso desde el icono de $.

{{--
--}}

@if ($cotizacion->estado!='En proceso-Operaciones') @endif @if ($cotizacion->estado == 'En proceso-Operaciones' && $operativoFlag == true) @endif

Ingresos Ordinarios
{{$subtotal=0}} {{$iva=0, $cantIva=0, $taxt=0, $sbt=0}}
@php $totalPunitario=0; $totalDescuento=0; $subtotal1=0; $subtotal2=0; $subtotal3=0; $subtotal4=0; $taxt=0; $iva=0; $totalT=0; $totalCantidad=0; $subtotal5=0; @endphp @foreach ($services as $service ) @if($service->tipo == 1 && $service->extra != 1) @php $sbt=0;$cantIva=0;$tax=0; @endphp @php if($service->wm==1){ $sbt=$service->cantidad * $service->monto_real*$cotizacion->inicial->factor; } else{ $sbt = $service->cantidad * $service->monto_real; } if($service->impuesto == 1){ $cantIva=($sbt*0.13); } else{ $cantIva=0; } if($service->tax){ $tax=$sbt*0.05; } else{ $tax=0; } $subtotal5+=($sbt+$tax); $total=$sbt+$cantIva+$tax; @endphp {{-- @if ($service->monto_facturado< $service->monto_real) SIN FACTURAR (FALTANTE: ${{number_format($service->monto_real - $service->monto_facturado,2) }} ) @else FACTURADO @endif --}} @php $totalCantidad+=$service->cantidad; $totalPunitario+=$service->monto; $totalDescuento+=$service->descuento; $taxt += $tax; $iva +=$cantIva; if($service->impuesto == 1) $subtotal1 +=$sbt; if($service->impuesto == 2) $subtotal2 +=$sbt; if($service->impuesto == 3) $subtotal3 +=$sbt; if($service->impuesto == 4) $subtotal4 +=$sbt; $totalT+=$total; $TIP+=$sbt+$tax-$service->descuento; @endphp @endif @endforeach
# Servicio Cantidad Unitario Descuento Venta Gravada IVA No sujeto Exento Exportacion TAX Sub Total Total Facturado Operaciones
{{$service->id}} {{$service->serv_name}} {{$service->cantidad}} $ {{number_format($service->monto,2)}} $ {{number_format($service->descuento,2)}}$ @if($service->impuesto == 1) {{number_format($sbt,3)}} @else 0.00 @endif $ @if($service->impuesto == 1) {{number_format(floor($cantIva*100)/100,3)}} @else 0.00 @endif $ @if($service->impuesto == 2) {{number_format($sbt,2)}} @else 0.00 @endif $ @if($service->impuesto == 3) {{number_format($sbt,2)}} @else 0.00 @endif $ @if($service->impuesto == 4) {{number_format($sbt,2)}} @else 0.00 @endif $ @if($service->tax) {{number_format($tax,2)}} @else 0.00 @endif $ {{number_format($sbt+$tax,2)}} $ {{number_format(floor($total*100)/100,2)}} {{-- AQUI PONER EL NUMERO DE FACTURA ---}} {{$service->documento_code ?? 'No Facturado' }} @if ($cotizacion->estado!='En proceso-Operaciones') @endif @if ($cotizacion->estado == 'En proceso-Operaciones' && $operativoFlag == true) @endif
Monto Total {{ $totalCantidad }} $ {{number_format($totalPunitario, 2 ) }} $ {{number_format($totalDescuento, 2 ) }} $ {{number_format($subtotal1, 2 ) }} $ {{number_format(floor($iva*100)/100,2) }} $ {{number_format($subtotal2, 2 ) }} $ {{number_format($subtotal3, 2 ) }} $ {{number_format($subtotal4, 2 ) }} $ {{number_format($taxt, 2 ) }} $ {{number_format($subtotal5, 2 ) }} {{number_format(floor($totalT*100)/100, 2 ) }}
{{--

Total de ingresos: ${{$subtotal + $iva + $taxt}}

--}}

{{$subtotalC=0}} {{$ivaC=0, $cantIvaC=0, $taxtC=0, $sbtC=0}}
Costos ordinarios @php $totalPunitario=0; $totalDescuentoC=0; $totalPReal=0; $subtotal1=0; $subtotal2=0; $subtotal3=0; $subtotal4=0; $taxt=0; $iva=0; $totalT=0; $totalCantidad=0; $subTotal5=0; @endphp @foreach ($services as $service ) @if($service->tipo == 2 && $service->extra != 1) @php $sbtC=0;$cantIvaC=0;$taxC =0; $descuento=$service->descuento*$service->cantidad; //logica de descuento if($service->wm==1){ $descuento=$descuento*$cotizacion->inicial->factor; } if($service->tax==1){ $descuento=$descuento*1.05; } @endphp @if($service->completa_servicio_id != null) @else @endif @php $sbt = $service->cantidad * ($service->monto-$service->descuento); if($service->impuesto == 1){ $cantIva=$sbt*0.13; } else{ $cantIva=0; } if($service->tax){ $tax=$sbt*0.05; } else{ $tax=0; } $total=$sbt+$cantIva+$tax; $sbt_sinIVA =$sbt+$tax; $subTotal5+=$sbt_sinIVA; @endphp @php $totalCantidad+=$service->cantidad; $totalPunitario+=$service->monto_estimado; $totalPReal+=$service->monto_real; $totalDescuentoC+=$service->descuento; $taxt += $tax; $iva +=$cantIva; if($service->impuesto == 1) $subtotal1 +=$sbt; if($service->impuesto == 2) $subtotal2 +=$sbt; if($service->impuesto == 3) $subtotal3 +=$sbt; if($service->impuesto == 4) $subtotal4 +=$sbt; $totalT+=$total; $TCP+=$sbt+$tax; @endphp @endif @endforeach
Cod. Ingreso Codigo Servicio Cantidad Unitario Estimado Unitario Real Descuento Compra Gravada IVA No sujeto Exento Exportacion TAX Sub Total Total Proveedor Operaciones
{{$service->completa_servicio_id}}N/A{{$service->service_cod}} {{$service->serv_name}} {{$service->cantidad}} $ {{number_format($service->monto_estimado,2)}} $ {{number_format($service->monto_real,2)}} $ {{number_format($service->descuento,2)}}$ @if($service->impuesto == 1) {{number_format($sbt,2)}} @else 0.00 @endif $ @if($service->impuesto == 1) {{number_format($cantIva,2)}} @else 0.00 @endif $ @if($service->impuesto == 2) {{number_format($sbt,2)}} @else 0.00 @endif $ @if($service->impuesto == 3) {{number_format($sbt,2)}} @else 0.00 @endif $ @if($service->impuesto == 4) {{number_format($sbt,2)}} @else 0.00 @endif $ @if($service->tax) {{number_format($tax,2)}} @else 0.00 @endif $ {{number_format($sbt_sinIVA,2)}} $ {{number_format($total,2)}} {{$service->codProveedor}} / {{ $service->nombreProveedor }} @if ($cotizacion->estado!='En proceso-Operaciones') @endif @if ($cotizacion->estado == 'En proceso-Operaciones' && $operativoFlag == true) @endif
Monto Total {{$totalCantidad}} $ {{number_format($totalPunitario, 2 ) }} $ {{number_format($totalPReal, 2 ) }} $ {{number_format($totalDescuentoC, 2 ) }} $ {{number_format($subtotal1, 2 ) }} $ {{number_format($iva, 2 ) }} $ {{number_format($subtotal2, 2 ) }} $ {{number_format($subtotal3, 2 ) }} $ {{number_format($subtotal4, 2 ) }} $ {{number_format($taxt, 2 ) }} $ {{number_format($subTotal5, 2 ) }} $ {{number_format($totalT, 2 ) }}
{{--

Total de costos: ${{$subtotalC + $ivaC + $taxtC}}

--}}
@if ($cotizacion->estado!='En proceso-Operaciones') @endif @if ($cotizacion->estado == 'En proceso-Operaciones' && $operativoFlag == true) @endif
{{$subtotalE=0, $subtotalEC=0}} {{$ivaE=0,$ivaEC=0, $cantIvaE=0, $taxtE=0, $taxtEC=0, $sbtE=0, $sbtEC=0, $taxX=0}}
{{-- --}} @php $TotalT=0; $TotalIVA=0; $STotalT=0; $TotalTC=0; $TotalIVAC=0; $STotalTC=0; @endphp @foreach ($services as $service2) @if($service2->extra == 1) @php $total=0; if($service2->impuesto == 1){ $cantIvaE=$service2->monto*0.13; } else{ $cantIvaE=0; } $total=$service2->monto+$cantIvaE; if($service2->tipo ==1){ $TotalT+=$total; $TotalIVA+=$cantIvaE; $STotalT+=$service2->monto*$service2->cantidad; $TIEP+=$service2->monto; } else { $TotalTC+=$total; $TotalIVAC+=$cantIvaE; $STotalTC+=$service2->monto; $TCEP+=$service2->monto; } @endphp {{-- --}} {{-- --}} @endif @endforeach {{-- --}} {{-- --}}
# Servicio MontoTipoFacturado Operaciones
{{$i}} {{$service2->serv_name}} $ {{number_format($service2->monto*$service2->cantidad,2)}} @if($service2->tax) ${{$taxX = round(( $service2->monto)*0.05,2)}} @else ${{$taxX=0}} @endif @if($service2->tipo ==1) Ingreso @else Costo @endif {{ $service2->facturado }} @if ($cotizacion->estado!='En proceso-Operaciones') @endif @if ($cotizacion->estado == 'En proceso-Operaciones' && $operativoFlag == true) @endif
Monto Total Ingreso $ {{number_format($STotalT, 2 ) }}Ingreso
Monto Total Costo $ {{number_format($STotalTC, 2 ) }} Costo
{{--

Total de costos extra: ${{$subtotalEC + $ivaEC + $taxtEC}}

Total de ingresos extra: ${{$subtotalE + $ivaE + $taxtE}}

--}}
Resumen de operacion {{-- --}}
Rubro Ingreso Costo
Total ingresos -
Total costos -
Total ingresos Extra -
Total costos extra -
PROFFIT
@csrf
Comentarios
@if ($cotizacion->estado!='En proceso-Operaciones') @endif @if ($cotizacion->estado == 'En proceso-Operaciones' && $operativoFlag == true) @endif
{{----------------------------------------------------MODALES----------------------------------------------------------------------------------------------------------------}} @include('cotizacionCompleta.modals.addExtra') @include('cotizacionCompleta.modals.cerrarCotizacion') @include('cotizacionCompleta.modals.deleteService') @include('cotizacionCompleta.modals.editService') @include('cotizacionCompleta.modals.costoReal') @include('cotizacionCompleta.modals.editServiceE') @include('cotizacionCompleta.modals.costoIngreso') @endsection