This commit is contained in:
2020-12-01 17:23:13 -03:00
parent 09e8c226bb
commit 9852a8cbdc
274 changed files with 24706 additions and 0 deletions

View File

@ -0,0 +1,49 @@
@extends('layout.base')
@section('content')
<div class="page-heading">
<h2>Comisiones - {{$proyecto->descripcion}}</h2>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>Departamento</th>
<th>Propietario</th>
<th class="text-center">Estacionamientos</th>
<th class="text-center">Bodegas</th>
<th colspan="2" class="text-center">Precio</th>
<th colspan="2" class="text-center">Comisi&oacute;n</th>
<th>Operador</th>
</tr>
<tr>
<th colspan="4"></th>
<th class="text-right">Promesa</th>
<th class="text-right">Neto</th>
<th class="text-center">%</th>
<th class="text-right">UF</th>
</tr>
</thead>
<tbody>
@foreach ($ventas as $venta)
<tr>
<td><a href="{{nUrl('ventas', 'show', ['venta' => $venta->id])}}">{{$venta->unidad()->descripcion}}</a></td>
<td>{{$venta->propietario()->nombreCompleto()}}</td>
<td class="text-center">{{implode(' - ', $venta->propiedad()->estacionamientos('array'))}}</td>
<td class="text-center">{{implode(' - ', $venta->propiedad()->bodegas('array'))}}</td>
<td class="text-right">{{format('ufs', $venta->valor_uf, null, true)}}</td>
<td class="text-right">{{format('ufs', $venta->valorCorredora(), null, true)}}</td>
<td class="text-center">1,5 %</td>
<td class="text-right">{{format('ufs', $venta->valorCorredora() * 1.5 / 100, null, true)}}</td>
<td>{{($venta->agente != 0 and $venta->agente()->agente != 1) ? $venta->agente()->agente()->descripcion : ''}}</td>
</tr>
@endforeach
<tr>
<td colspan="4"><b>Total</b></td>
<td class="text-right"><b>{{format('ufs', $totales->precio, null, true)}}</b></td>
<td class="text-right"><b>{{format('ufs', $totales->neto, null, true)}}</b></td>
<td class="text-center"><b>1,5 %</b></td>
<td class="text-right"><b>{{format('ufs', $totales->comision, null, true)}}</b></td>
</tbody>
</table>
<!-- <a href="{{nUrl('informes', 'comisiones_xlsx', ['ventas' => implode(',', $ids)])}}">Excel</a> -->
@endsection

View File

@ -0,0 +1,68 @@
@extends('layout.base')
@section('content')
<h2>Contabilidad</h2>
<form action="#" class="form-horizontal">
<div class="form-group">
<div class="col-md-1">Mes</div>
<div class="col-md-3"><select name="mes" class="form-control">
<option value="">Todo</option>
<?php $f = Carbon\Carbon::today(); ?>
@for ($y = date('Y'); $y >= date('Y') - 5; $y --)
@for ($m = 12; $m > 0; $m --)
@if ($y == date('Y') and $m >= date('m'))
@continue
@endif
<option value="{{$y}}-{{$m}}" @if ($m == $f->month-1 and $y == $f->year) selected="selected" @endif>{{ucwords(strftime('%B - %Y', mktime(0, 0, 0, $m, 1, $y)))}}</option>
@endfor
@endfor
</select></div>
</div>
</form>
<div id="proyectos">
@include('informes.proyectos', ['a' => 'contabilidad'])
</div>
@endsection
@push('scripts')
<script type="text/javascript">
function changeUrl(url, field, change) {
if (url.indexOf(field) > -1) {
var nurl = [];
var info = url.split('&');
$.each(info, function(k, v) {
if (v.indexOf(field) == -1) {
nurl.push(v);
} else {
if (change != '') {
nurl.push(field + '=' + change);
}
}
});
nurl = nurl.join('&');
return nurl;
} else {
if (change != '') {
nurl = url + '&' + field + '=' + change;
return nurl;
}
}
return url;
}
function updateUrls(select, link_id) {
var f = $("select[name='" + select + "']").val();
var links = $('#' + link_id + ' a');
links.each(function(k, v) {
url = $(v).attr('href');
nurl = changeUrl(url, 'fecha', f);
$(v).attr('href', nurl);
});
}
$(document).ready(function() {
$("select[name='mes']").change(function(e) {
updateUrls('mes', 'proyectos');
});
updateUrls('mes', 'proyectos');
});
</script>
@endpush

View File

@ -0,0 +1,6 @@
@extends('layout.base')
@section('content')
<h2>Escrituras</h2>
@include('informes.proyectos', ['a' => 'escrituras'])
@endsection

View File

@ -0,0 +1,6 @@
@extends('layout.base')
@section('content')
<h2>Gantt de Entregas</h2>
@include('informes.proyectos', ['a' => 'gantt_entregas'])
@endsection

View File

@ -0,0 +1,25 @@
@extends('layout.base')
@section('content')
<div class="page-heading">
<h2>Comisiones</h2>
</div>
<br />
<form class="form-horizontal" method="post" action="{{nUrl('informes', 'comisiones')}}">
<div class="form-group">
<div class="col-md-2">Proyecto</div>
<div class="col-md-3"><select class="form-control" name="proyecto">
@foreach ($proyectos as $proyecto)
<option value="{{$proyecto->id}}">{{$proyecto->descripcion}}</option>
@endforeach
</select></div>
</div>
<div class="form-group">
<div class="col-md-2">Unidades</div>
<div class="col-md-5"><textarea name="unidades" class="form-control" rows="5"></textarea></div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-2"><button type="submit" class="form-control">Buscar</button>
</div>
</form>
@endsection

View File

@ -0,0 +1,12 @@
<div class="panel panel-default">
<div class="panel-heading">Proyectos</div>
<ul class="list-group">
@foreach ($proyectos as $proyecto)
<li class="list-group-item">
<a href="{{url('', ['p' => 'informes', 'a' => $a, 'proyecto' => $proyecto->id])}}">
{{$proyecto->descripcion}} - {{$proyecto->inmobiliaria()->abreviacion}}
</a>
</li>
@endforeach
</ul>
</div>

View File

@ -0,0 +1,6 @@
@extends('layout.base')
@section('content')
<h2>Resciliaciones</h2>
@include('informes.proyectos', ['a' => 'resciliaciones'])
@endsection

View File

@ -0,0 +1,8 @@
@extends('layout.base')
@section('content')
<h2>Resumen para Contabilidad</h2>
<div id="proyectos">
@include('informes.proyectos', ['a' => 'resumen_contabilidad'])
</div>
@endsection

View File

@ -0,0 +1,6 @@
@extends('layout.base')
@section('content')
<h2>Ventas</h2>
@include('informes.proyectos', ['a' => 'ventas'])
@endsection