Files
intranet/resources/views/print/devolucion.blade.php
2020-12-01 17:23:13 -03:00

137 lines
3.5 KiB
PHP

@extends('layout.base')
@section('content')
<div id="print">
<div class="title">Devoluci&oacute;n Por Pago Excesivo</div>
<br /><br />
<table class="data-box">
<tbody>
<tr>
<td>Fecha</td>
<?php setlocale(LC_TIME, 'es'); $f = \Carbon\Carbon::today(config('app.timezone'))?>
<td>{{$f->formatLocalized('%A, %d de %B de %Y')}}</td>
</tr>
<tr>
<td>Inmobiliaria</td>
<td>{{$venta->proyecto()->inmobiliaria()->razon}}</td>
</tr>
<tr>
<td>Proyecto</td>
<td>{{$venta->proyecto()->descripcion}}</td>
</tr>
<tr>
<td>Propiedad</td>
<td>{{$venta->unidad()->descripcion}}</td>
</tr>
<tr>
<td>Propietario</td>
<td>{{$venta->propietario()->nombreCompleto()}}</td>
</tr>
</tbody>
</table>
<br />
<label for="pago">Detalle de Pago</label>
<table class="details" id="pago">
<thead>
<tr>
<th>Pago</th>
<th>Detalle</th>
<th>Valor Pagado</th>
</tr>
</thead>
<tbody>
<?php $sum = 0 ?>
@if ($venta->pie)
<?php $sum += $venta->pie()->valorAbonado('ufs') ?>
<tr>
<td>Pie</td>
<td>@if ($venta->pie()->cuotas > 1) {{count($venta->pie()->abonadas())}} cuotas @else contado @endif</td>
<td>{{format('ufs', $venta->pie()->valorAbonado('ufs'), null, true)}}</td>
</tr>
@if ($venta->pie()->reajuste and $venta->pie()->reajuste()->estado()->estado == 2)
<?php $venta->pie()->reajuste()->valor('ufs') ?>
<tr>
<td>Reajuste de Pie</td>
<td></td>
<td>{{format('ufs', $venta->pie()->reajuste()->valor('ufs'), null, true)}}</td>
</tr>
@endif
@endif
@if ($venta->escritura and $venta->escritura()->estado()->estado == 2)
<?php $venta->pie()->escritura()->valor('ufs') ?>
<tr>
<td>Abono en Escritura</td>
<td></td>
<td>{{format('ufs', $venta->escritura()->valor('ufs'), null, true)}}</td>
</tr>
@endif
@if ($venta->subsidio)
<?php $sum += $venta->subsidio()->total('ufs') ?>
<tr>
<td>Subsidio</td>
<td>Ahorro: {{format('ufs', $venta->subsidio()->pago()->valor('ufs'), null, true)}}</td>
<td>{{format('ufs', $venta->subsidio()->total('ufs'), null, true)}}</td>
</tr>
@endif
@if ($venta->bono_pie)
<?php $sum += $venta->bonoPie()->pago()->valor('ufs') ?>
<tr>
<td>Bono Pie</td>
<td></td>
<td>{{format('ufs', $venta->bonoPie()->pago()->valor('ufs'))}}</td>
</tr>
@endif
@if ($venta->credito)
<?php $sum += $venta->credito()->pago()->valor('ufs') ?>
<tr>
<td>Cr&eacute;dito</td>
<td>Banco: {{$venta->credito()->pago()->banco()->nombre}}</td>
<td>{{format('ufs', $venta->credito()->pago()->valor('ufs'), null, true)}}</td>
</tr>
@endif
<tr class="total">
<td colspan="2">TOTAL</td>
<td>{{format('ufs', $sum, null, true)}}</td>
</tr>
</tbody>
</table>
<br />
<div class="data">Valor Venta</div>
<div class="data-value">{{format('ufs', $venta->valor('ufs'), null, true)}}</div>
<br class="clear" />
<div class="data">Devoluci&oacute;n</div>
<div class="data-value">{{format('ufs', $venta->saldo('ufs'), null, true)}}</div>
<br class="clear" />
<br />
<div class="data">Valor de UF a la fecha</div>
<div class="data-value">$ {{format('ufs', $uf = uf($f)->uf->value)}}</div>
<br class="clear" />
<br />
<div class="total">Total a Devolver</div>
<div class="total-value">{{format('pesos', $uf * $venta->saldo('ufs'), null, true)}}</div>
<br class="clear" />
<br />
<br />
<br />
<label for="firma">Recibido Conforme</label>
<table class="signature" id="firma">
<tr>
<td>Nombre</td>
<td></td>
</tr>
<tr>
<td>RUT</td>
<td></td>
</tr>
<tr>
<td>Fecha</td>
<td></td>
</tr>
<tr class="triple">
<td>Firma</td>
<td></td>
</tr>
</table>
</div>
@endsection