@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
