@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
