Files
intranet/resources/views/ventas/escrituras/informe.blade.php

95 lines
3.6 KiB
PHP
Raw Normal View History

2020-12-01 17:23:13 -03:00
@extends('layout.base')
@section('content')
<div class="panel panel-default">
<div class="panel-heading"><a href="{{url('', ['p' => 'ventas', 'a' => 'show', 'venta' => $venta->id])}}">Escritura - {{$venta->unidad()->descripcion}} - {{$venta->proyecto()->descripcion}}</a></div>
<div class="panel-body">
El departamento {{$venta->unidad()->descripcion}}:<br />
@if (count($venta->propiedad()->estacionamientos()) > 0)
@if (count($venta->propiedad()->estacionamientos()) > 1)
tiene los estacionamientos
@foreach ($venta->propiedad()->estacionamientos() as $i => $est)
@if ($i == count($venta->propiedad()->estacionamientos()) - 1)
y
@elseif ($i > 0)
,
@endif
{{$est->descripcion}}
@endforeach
@else
tiene el estacionamiento {{$venta->propiedad()->estacionamientos()[0]->descripcion}}
@endif
@else
no tiene estacionamientos
@endif
y
@if (count($venta->propiedad()->bodegas()) > 0)
@if (count($venta->propiedad()->bodegas()) > 1)
tiene las bodegas
@foreach ($venta->propiedad()->bodegas() as $i => $est)
@if ($i == count($venta->propiedad()->bodegas()) - 1)
y
@elseif ($i > 0)
,
@endif
{{$est->descripcion}}
@endforeach
@else
tiene la bodega {{$venta->propiedad()->bodegas()[0]->descripcion}}.
@endif
@else
no tiene bodegas.
@endif
<br />
<br />
<b>PRECIO</b> {{format('ufs', $venta->valor('ufs'))}} UF.<br/>
@if ($venta->pie != 0)
<b>PIE</b> {{count($venta->pie()->cuotas())}} cuota{{(count($venta->pie()->cuotas()) > 1) ? 's que suman' : ' de'}}
$ {{format('pesos', $venta->pie()->valorPagado('pesos'))}} equivalente a {{format('ufs', $venta->pieReajustado())}} UF.<br />
@if ($venta->pie()->reajuste != 0)
<b>REAJUSTE</b>
@if ($venta->pie()->reajuste()->estado()->estado >= 1)
$ {{format('pesos', $venta->pie()->reajuste()->valor)}} el {{format('shortDate', $venta->pie()->reajuste()->fecha)}}
equivalente a {{format('ufs', $venta->pie()->reajuste()->valor('ufs'))}} UF.
@else
{{format('ufs', $venta->pie()->reajuste()->valor('ufs'))}} UF por pagar.
@endif
<br />
@endif
@endif
@if ($venta->escritura != 0)
<b>ESCRITURA</b>
@if ($venta->escritura()->pago()->estado()->estado >= 1)
$ {{format('pesos', $venta->escritura()->pago()->valor)}} el {{format('shortDate', $venta->escritura()->pago()->fecha)}}
equivalente a {{format('ufs', $venta->escritura()->pago()->valor('ufs'))}} UF.
@else
{{format('ufs', $venta->escritura()->pago()->valor('ufs'))}} UF por pagar.
@endif
<br />
@endif
@if ($venta->saldo() / $venta->valor_uf > 0.01)
(DEVOLVER {{format('ufs', $venta->saldo())}} UF).<br />
@endif
@if ($venta->anticipo() > 0)
<b>TOTAL ANTICIPO</b> {{format('ufs', $venta->anticipo())}} UF.<br />
@endif
@if ($venta->bono_pie != 0)
<b>BONO</b> {{format('ufs', $venta->bonoPie()->pago()->valor('ufs'))}} UF.<br />
@endif
@if ($venta->subsidio != 0)
<b>SUBSIDIO</b> {{format('ufs', $venta->subsidio()->pago()->valor('ufs'))}} UF con ahorro y
{{format('ufs', $venta->subsidio()->subsidio()->valor('ufs'))}} UF con subsidio.<br />
@endif
@if ($venta->credito != 0)
Saldo {{format('ufs', $venta->credito()->pago()->valor('ufs'))}} UF con <b>CR&Eacute;DITO</b> en {{$venta->credito()->pago()->banco()->nombreCompleto()}}.<br />
@endif
<b>TOTAL</b> {{format('ufs', $venta->pagado())}} UF.
@if ($venta->saldo() > 0.0001)
<br />
<br />
Diferencia {{format('ufs', $venta->saldo())}} UF ({{\App\Helper\Format::number(($venta->saldo()) / $venta->valor_uf * 100, 2)}}%).
@endif
</div>
</div>
@endsection