43 lines
2.1 KiB
PHP
43 lines
2.1 KiB
PHP
@extends('layout.base')
|
|
|
|
@section('content')
|
|
<div class="row page-heading">
|
|
<h3>Ventas de <a href="{{url('', ['p' => 'proyectos', 'a' => 'show', 'proyecto' => $proyecto->id])}}">{{$proyecto->descripcion}}</a> [{{count($ventas)}}]</h3>
|
|
</div>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr class="section-heading">
|
|
<th>@include('ventas.sort_title', ['title' => 'Departamento'])</th>
|
|
<th>@include('ventas.sort_title', ['title' => 'Propietario'])</th>
|
|
<th>@include('ventas.sort_title', ['title' => 'Valor [UF]'])</th>
|
|
<th>@include('ventas.sort_title', ['title' => 'Tipología'])</th>
|
|
<th>@include('ventas.sort_title', ['title' => 'UF/m²'])</th>
|
|
<th>@include('ventas.sort_title', ['title' => 'Fecha Venta'])</th>
|
|
<th>@include('ventas.sort_title', ['title' => 'Estado'])</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($ventas as $venta)
|
|
<tr>
|
|
<td>
|
|
<a href="?p=ventas&a=show&venta={{$venta->id}}">
|
|
{{trim(array_reduce($venta->propiedad()->departamentos(), function($carry, $item) {
|
|
return implode(' - ', [$carry, $item->descripcion]);
|
|
}), ' -')}}
|
|
{{(count($venta->propiedad()->estacionamientos('array')) > 0) ? ' - E' . implode(', ', $venta->propiedad()->estacionamientos('array')) : ''}}
|
|
{{(count($venta->propiedad()->bodegas('array')) > 0) ? ' - B' . implode(', ', $venta->propiedad()->bodegas('array')) : ''}}
|
|
<span class="glyphicon glyphicon-chevron-right small"></span>
|
|
</a>
|
|
</td>
|
|
<td><a href="?p=search&q={{urlencode('"' . $venta->propietario()->nombreCompleto() . '"')}}">{{$venta->propietario()->nombreCompleto()}} <span class="glyphicon glyphicon-search small"></span></a></td>
|
|
<td>{{\App\Helper\Format::ufs($venta->valor_uf)}}</td>
|
|
<td>{{$venta->propiedad()->unidad()->tipologia()->tipologia()->descripcion}} ({{format('m2', $venta->propiedad()->unidad()->tipologia()->m2())}} m²)</td>
|
|
<td>{{\App\Helper\Format::ufs($venta->uf_m2())}}</td>
|
|
<td>{{$venta->fecha()->format('d-m-Y')}}</td>
|
|
<td>{{ucwords($venta->estado()->tipo()->descripcion)}}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@endsection
|