This commit is contained in:
2021-12-01 21:04:06 -03:00
parent 1230c02f60
commit 7e01974ec8
201 changed files with 15370 additions and 0 deletions

View File

@ -0,0 +1,62 @@
@extends('layout.base')
@section('content')
<div class="row page-heading">
<h3>Agregar Pagar&eacute;
<a href="{{nUrl('proyectos', 'construccion', ['proyecto' => $proyecto->id])}}">
<span class="glyphicon small glyphicon-chevron-up"></span>
</a>
</h3>
</div>
<br />
<form class="form-horizontal" method="post" action="{{nUrl('pagares', 'do_add', ['proyecto' => $proyecto->id])}}">
<div class="form-group">
<div class="col-md-3">Estado Pago</div>
<div class="col-md-1"><input type="text" name="estado_pago" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">N&uacute;mero</div>
<div class="col-md-3"><input type="text" name="numero" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Moneda</div>
<div class="col-md-2">
<select name="moneda" class="form-control">
<option value="UF">UF</option>
<option value="Pesos">Pesos</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-md-3">Capital</div>
<div class="col-md-3"><input type="text" name="capital" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Tasa [%]</div>
<div class="col-md-1"><input type="text" name="tasa" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Fecha Otorgado</div>
<?php $id = '_banco' ?>
@include('form.fecha')
</div>
<div class="form-group">
<div class="col-md-3">Duraci&oacute;n</div>
<div class="col-md-1"><input type="text" name="duracion" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Fecha Abonado</div>
<?php unset($id) ?>
@include('form.fecha')
</div>
<div class="form-group">
<div class="col-md-3">Monto Abonado [$]</div>
<div class="col-md-3"><input type="text" name="abonado" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-offset-1 col-md-2">
<button class="form-control">Agregar</button>
</div>
</div>
</form>
@endsection

View File

@ -0,0 +1,44 @@
@extends('layout.base')
@section('content')
<div class="row page-heading">
<h3>Agregar Renovaci&oacute;n Pagar&eacute; <a href="{{nUrl('pagares', 'show', ['pagare' => $pagare->id])}}">{{$pagare->id}}</a>
</h3>
</div>
<br />
<form class="form-horizontal" method="post" action="{{nUrl('pagares', 'do_add_renovacion', ['pagare' => $pagare->id])}}">
<div class="form-group">
<div class="col-md-3">Fecha</div>
<?php $id = '_banco' ?>
@include('form.fecha')
</div>
<div class="form-group">
<div class="col-md-3">Duraci&oacute;n [d&iacute;as]</div>
<div class="col-md-1"><input type="text" name="duracion" class="form-control" /></div>
<div class="col-md-3 small">* Pagar&eacute; {{$pagare->duracion}}</div>
</div>
<div class="form-group">
<div class="col-md-3">Monto Insoluto [{{$pagare->moneda()->descripcion}}]</div>
<div class="col-md-3"><input type="text" name="insoluto" class="form-control" value="{{$pagare->capital}}" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Tasa [%]</div>
<div class="col-md-1"><input type="text" name="tasa" class="form-control" /></div>
<div class="col-md-2 small">* Pagar&eacute; {{format('percent', $pagare->tasa, null, true)}} </div>
</div>
<div class="form-group">
<div class="col-md-3">Intereses [$]</div>
<div class="col-md-3"><input type="text" name="intereses" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Fecha Abono</div>
<?php unset($id) ?>
@include('form.fecha')
</div>
<div class="form-group">
<div class="col-md-offset-1 col-md-2">
<button class="form-control">Agregar</button>
</div>
</div>
</form>
@endsection

View File

@ -0,0 +1,66 @@
@extends('layout.base')
@section('content')
<div class="row page-heading">
<h3>Pagar&eacute; <a href="{{nUrl('pageres', 'show', ['pagare' => $pagare->id])}}">{{$pagare->id}}</a></h3>
</div>
<br />
<form class="form-horizontal" method="post" action="{{nUrl('pagares', 'do_edit', ['pagare' => $pagare->id])}}">
<div class="form-group">
<div class="col-md-3">Estado Pago</div>
<div class="col-md-1"><input type="text" name="estado_pago" value="{{$pagare->estado_pago}}" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">N&uacute;mero</div>
<div class="col-md-3"><input type="text" name="numero" value="{{$pagare->id}}" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Moneda</div>
<div class="col-md-2">
<select name="moneda" class="form-control">
<option value="UF"
@if (strtolower($pagare->moneda()->descripcion) == 'uf')
selected="selected"
@endif
>UF</option>
<option value="Pesos"
@if (strtolower($pagare->moneda()->descripcion) == 'pesos')
selected="selected"
@endif
>Pesos</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-md-3">Capital</div>
<div class="col-md-3"><input type="text" name="capital" value="{{$pagare->capital}}" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Tasa [%]</div>
<div class="col-md-1"><input type="text" name="tasa" value="{{$pagare->tasa}}" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Fecha Otorgado</div>
<?php $f = $pagare->fechaBanco(); $id = '_banco' ?>
@include('form.fecha')
</div>
<div class="form-group">
<div class="col-md-3">Duraci&oacute;n</div>
<div class="col-md-1"><input type="text" name="duracion" class="form-control" value="{{$pagare->duracion}}" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Fecha Abonado</div>
<?php $f = $pagare->fecha(); unset($id) ?>
@include('form.fecha')
</div>
<div class="form-group">
<div class="col-md-3">Monto Abonado [$]</div>
<div class="col-md-3"><input type="text" name="abonado" class="form-control" value="{{$pagare->abonado}}" /></div>
</div>
<div class="form-group">
<div class="col-md-offset-1 col-md-2">
<button class="form-control">Editar</button>
</div>
</div>
</form>
@endsection

View File

@ -0,0 +1,45 @@
@extends('layout.base')
@section('content')
<div class="row page-heading">
<h3>Renovaci&oacute;n
{{array_search($renovacion, $renovacion->pagare()->renovaciones()) + 1}}
Pagar&eacute; <a href="{{nUrl('pagares', 'show', ['pagare' => $renovacion->pagare])}}">{{$renovacion->pagare}}</a>
</h3>
</div>
<br />
<form class="form-horizontal" method="post" action="{{nUrl('pagares', 'do_edit_renovacion', ['renovacion' => $renovacion->id])}}">
<div class="form-group">
<div class="col-md-3">Fecha</div>
<?php $f = $renovacion->fechaBanco(); $id = '_banco' ?>
@include('form.fecha')
</div>
<div class="form-group">
<div class="col-md-3">Duraci&oacute;n [d&iacute;as]</div>
<div class="col-md-1"><input type="text" name="duracion" value="{{$renovacion->duracion}}" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Monto Insoluto [{{$renovacion->pagare()->moneda()->descripcion}}]</div>
<div class="col-md-3"><input type="text" name="insoluto" value="{{$renovacion->insoluto}}" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Tasa [%]</div>
<div class="col-md-1"><input type="text" name="tasa" value="{{$renovacion->tasa}}" class="form-control" /></div>
<div class="col-md-2 small">* Pagar&eacute; {{format('percent', $renovacion->pagare()->tasa, null, true)}} </div>
</div>
<div class="form-group">
<div class="col-md-3">Intereses [$]</div>
<div class="col-md-3"><input type="text" name="intereses" value="{{$renovacion->intereses}}" class="form-control" /></div>
</div>
<div class="form-group">
<div class="col-md-3">Fecha Abono</div>
<?php $f = $renovacion->fecha(); unset($id) ?>
@include('form.fecha')
</div>
<div class="form-group">
<div class="col-md-offset-1 col-md-2">
<button class="form-control">Editar</button>
</div>
</div>
</form>
@endsection

View File

@ -0,0 +1,100 @@
@extends('layout.base')
@section('content')
<div class="row page-heading">
<div class="col-md-6 h3">
Pagar&eacute; {{$pagare->id}}
<a href="{{nUrl('proyectos', 'construccion', ['proyecto' => $pagare->proyecto()->id])}}">
<span class="glyphicon small glyphicon-chevron-up"></span>
</a>
</div>
<div class="col-md-6 h3 text-right">
<a href="{{nUrl('pagares', 'edit', ['pagare' => $pagare->id])}}">
<span class="glyphicon glyphicon-edit"></span>
</a>
</div>
</div>
<table class="table table-striped">
<thead></thead>
<tbody>
<tr>
<td>Estado Pago</td>
<td>
{{$pagare->estado_pago}}
</td>
</tr>
<tr>
<td>Moneda</td>
<td>{{$pagare->moneda()->descripcion}}</td>
</tr>
<tr>
<td>Capital</td>
<td>{{format('ufs', $pagare->valor(), null, true)}}</td>
<td>{{format('pesos', $pagare->valor('pesos'), null, true)}}</td>
<td>{{format('shortDate', $pagare->fecha_banco)}}</td>
</tr>
<tr>
<td>Abonado</td>
<td>{{format('ufs', $pagare->abonado(), null, true)}}</td>
<td>{{format('pesos', $pagare->abonado('pesos'), null, true)}}</td>
<td>
@if ($pagare->fecha != '0000-00-00')
{{format('shortDate', $pagare->fecha)}}
@endif
</td>
</tr>
<tr>
<td>Tasa Anualizada</td>
<td colspan="3">{{format('percent', $pagare->tasa, null, true)}}</td>
</tr>
<tr>
<td>Duraci&oacute;n</td>
<td>{{$pagare->duracion}}</td>
<td colspan="2">{{format('shortDate', $pagare->vencimiento()->format('Y-m-d'))}}</td>
</tr>
</tbody>
</table>
@if ($pagare->renovaciones())
<table class="table table-striped">
<thead>
<tr>
<th colspan="3">Renovaciones</th>
</tr>
<tr>
<th>Fecha Renovaci&oacute;n</th>
<th>Intereses Pagados</th>
<th>
<a href="{{nUrl('pagares', 'add_renovacion', ['pagare' => $pagare->id])}}">
<span class="glyphicon glyphicon-plus"></span>
</a>
</th>
</tr>
</thead>
<tbody>
<?php $total = 0 ?>
@foreach ($pagare->renovaciones() as $renovacion)
<?php $total += $renovacion->intereses() ?>
<tr>
<td>
{{format('shortDate', $renovacion->fecha)}}
({{$renovacion->duracion}})
{{format('shortDate', $renovacion->vencimiento()->format('Y-m-d'))}}
</td>
<td>{{format('ufs', $renovacion->intereses(), null, true)}}</td>
<td>
<a href="{{nUrl('pagares', 'edit_renovacion', ['renovacion' => $renovacion->id])}}">
<span class="glyphicon glyphicon-edit"></span>
</a>
</td>
</tr>
@endforeach
<tr>
<td><b>Total</b></td>
<td colspan="2"><b>{{format('ufs', $total, null, true)}}</b></td>
</tr>
</tbody>
</table>
@else
<a href="{{nUrl('pagares', 'add_renovacion', ['pagare' => $pagare->id])}}">Agregar Renovaci&oacute;n</a>
@endif
@endsection