@extends('ventas.base') @section('venta_subtitle') Cuotas - Pie @endsection @push('page_scripts') @endpush @section('venta_content') @if (count($asociadas) > 0)
# | Fecha | Fecha ISO | Banco | Identificador | Valor | Valor UF | Estado | Fecha Estado | Fecha Estado ISO | |
---|---|---|---|---|---|---|---|---|---|---|
{{$cuota->numero}} | {{$cuota->pago->fecha->format('d-m-Y')}} | {{$cuota->pago->fecha->format('Y-m-d')}} | {{$cuota->pago->banco->nombre}} | {{$cuota->pago->identificador}} | {{$format->pesos($cuota->pago->valor)}} | @if (in_array($cuota->pago->currentEstado->tipoEstadoPago->descripcion, ['depositado', 'abonado']) and $cuota->pago->currentEstado->fecha <= $now) {{$format->ufs($cuota->pago->valor())}} @else ~{{$format->ufs($cuota->pago->valor / $uf_venta)}} @endif | pago->currentEstado->tipoEstadoPago->descripcion === 'abonado' ? ' class="green"' : ($cuota->pago->currentEstado->tipoEstadoPago->descripcion === 'depositado' ? ' class="yellow"' : ($cuota->pago->currentEstado->tipoEstadoPago->activo !== 1 ? ' class="red"' : ''))) !!}> {{ucwords($cuota->pago->currentEstado->tipoEstadoPago->descripcion)}} |
@if (in_array($cuota->pago->currentEstado->tipoEstadoPago->descripcion, ['abonado', 'anulado', 'reemplazado']))
{{$cuota->pago->currentEstado->fecha->format('d-m-Y')}}
@elseif (!in_array($cuota->pago->currentEstado->tipoEstadoPago->descripcion, ['anulado', 'reemplazado']))
@if ($cuota->pago->currentEstado->tipoEstadoPago->descripcion === 'depositado')
{{$cuota->pago->currentEstado->fecha->format('d-m-Y')}}
@endif
@if ($cuota->pago->currentEstado->tipoEstadoPago->descripcion === 'depositado')
@endif
|
{{$cuota->pago->currentEstado->fecha->format('Y-m-d')}} | @if ($cuota->pago->currentEstado->tipoEstadoPago->descripcion !== 'anulado') @endif |
TOTAL | {{$format->pesos($total_pesos = array_reduce($venta->formaPago()->pie->cuotas(vigentes: true), function(int $sum, Incoviba\Model\Venta\Cuota $cuota) { return $sum + $cuota->pago->valor; }, 0))}} | {{$format->ufs($total = array_reduce($venta->formaPago()->pie->cuotas(vigentes: true), function(float $sum, Incoviba\Model\Venta\Cuota $cuota) use ($now, $uf_venta) { return $sum + (($cuota->pago->fecha > $now or $cuota->pago->uf === null) ? $cuota->pago->valor / $uf_venta : $cuota->pago->valor()); }, 0.0))}} | ||||||||
TOTAL PAGADO | {{$format->pesos($pagado_pesos = array_reduce($venta->formaPago()->pie->cuotas(pagadas: true, vigentes: true), function(int $sum, Incoviba\Model\Venta\Cuota $cuota) { return $sum + $cuota->pago->valor; }, 0))}} | {{$format->ufs($pagado = array_reduce($venta->formaPago()->pie->cuotas(pagadas: true, vigentes: true), function(float $sum, Incoviba\Model\Venta\Cuota $cuota) { return $sum + $cuota->pago->valor(); }, 0.0))}} |
{{ $format->percent(($total > 0) ? $pagado / $total : 0, 2, true) }} Pie {{ $format->percent($pagado / $venta->valor, 2, true) }} Promesa |
|||||||
POR PAGAR | {{$format->pesos($total_pesos - $pagado_pesos)}} | {{$format->ufs($total - $pagado)}} | {{$format->percent(($total > 0) ? ($total - $pagado) / $total * 100 : 0, 2)}}* |