@extends('ventas.base') @section('venta_subtitle') Resumen Escritura @endsection @section('venta_content')
El departamento {{$venta->propiedad()->departamentos()[0]->descripcion}}:
@php $estacionamientos = $venta->propiedad()->estacionamientos(); @endphp @if (count($estacionamientos) === 0) no tiene estacionamientos @else tiene {{count($estacionamientos) === 1 ? 'el' : 'los'}} estacionamiento{{count($estacionamientos) === 1 ? '': 's'}} {{implode(', ', array_map(function(Incoviba\Model\Venta\Unidad $unidad) { return $unidad->descripcion; }, $estacionamientos))}} @endif y @php $bodegas = $venta->propiedad()->bodegas(); @endphp @if (count($bodegas) === 0) no tiene bodegas @else tiene {{count($bodegas) === 1 ? 'la' : 'las'}} bodega{{count($bodegas) === 1 ? '' : 's'}} {{implode(', ', array_map(function(Incoviba\Model\Venta\Unidad $unidad) { return $unidad->descripcion; }, $bodegas))}} @endif

PRECIO {{$format->ufs($venta->valor)}}

@if (isset($venta->formaPago()->pie)) @php($pie = $venta->formaPago()->pie) PIE {{$pie->cuotas}} cuotas que suman {{$format->pesos($pie->pagado('pesos'))}} equivalente a {{$format->ufs($pie->pagado())}}.
@endif @if (isset($venta->formaPago()->escritura)) @php($escritura = $venta->formaPago()->escritura) ESCRITURA {{$format->pesos($escritura->pago->valor)}} el {{$escritura->fecha->format('d-m-Y')}} equivalente a {{$format->ufs($escritura->pago->valor())}}
@endif
TOTAL ANTICIPO {{$format->ufs($venta->formaPago()->anticipo())}}
@if (isset($venta->formaPago()->bonoPie)) @php($bono = $venta->formaPago()->bonoPie) BONO PIE {{$format->ufs($bono->pago->valor())}}
@endif @if (isset($venta->formaPago()->credito)) @php($credito = $venta->formaPago()->credito) CRÉDITO {{$format->ufs($credito->pago->valor())}} en Banco {{$credito->pago->banco->nombre}}
@endif
TOTAL {{$format->ufs($venta->formaPago()->total())}} @if (($venta->formaPago()->total() - $venta->valor) !== 0)

Diferencia {{$format->ufs($venta->formaPago()->total() - $venta->valor)}}. ({{$format->percent(($venta->formaPago()->total() - $venta->valor) / $venta->valor * 100)}}) @endif
@endsection