@extends('layout')
@section('title', 'Factura de Pago')
@section('content')
<div class="col-sm-12 col-md-10 col-lg-10 col-xl-10">
    <h3 class="text-center titulo">Factura</h3>
    <div class="borde-forma">
        <form id="form" method="post" accept-charset="utf-8" action="#">
            <p class="parrafo-forma">Los campos marcados con <strong class="requerido">*</strong> son obligatorios.</p>
            {{ csrf_field() }}
            <div class="form-group row">
                <label for="sltTipoFactura" class="col-form-label col-md-1 col-lg-1 col-xl-1 text-right">
                    <strong class="requerido">*</strong>Tipo Factura:
                </label>
                <div class="col-md-3 col-lg-3 col-xl-3">
                    <select id="sltTipoFactura" name="sltTipoFactura" class="form-control select" title="Seleccione tipo factura" required="">
                    </select>
                </div>
                <label for="txtNumero" class="col-form-label col-md-1 col-lg-1 col-xl-1 text-right">
                    <strong class="requerido">*</strong>Número:
                </label>
                <div class="col-md-3 col-lg-3 col-xl-3">
                    <input type="number" name="txtNumero" id="txtNumero" class="form-control" required="required" placeholder="Número" title="Número de factura" readonly="">
                </div>
                <label for="txtFecha" class="col-form-label col-md-1 col-lg-1 col-xl-1 text-right">
                    <strong class="requerido">*</strong>Fecha:
                </label>
                <div class="col-md-2 col-lg-2 col-xl-2">
                    <input type="text" name="txtFecha" id="txtFecha" class="form-control" required="required" placeholder="Fecha" title="Fecha de factura" readonly="">
                </div>
            </div>
            <div class="form-group row">
                <label for="sltPredio" class="col-form-label col-md-1 col-lg-1 col-xl-1 text-right">
                    <strong class="requerido">*</strong>Predio:
                </label>
                <div class="col-md-3 col-lg-3 col-xl-3">
                    <select id="sltPredio" name="sltPredio" class="form-control select" title="Seleccione predio" required="">
                    </select>
                </div>
                <label for="sltPropietario" class="col-form-label col-md-1 col-lg-1 col-xl-1 text-right">
                    <strong class="requerido">*</strong>Propietario:
                </label>
                <div class="col-md-3 col-lg-3 col-xl-3">
                    <select id="sltPropietario" name="sltPropietario" class="form-control select" title="Seleccione propietario" required="">
                    </select>
                </div>
                <label for="sltBuscar" class="col-form-label col-md-1 col-lg-1 col-xl-1 text-right">
                    Buscar:
                </label>
                <div class="col-md-2 col-lg-2 col-xl-2">
                    <select id="sltBuscar" name="sltBuscar" class="form-control select" title="Seleccione factura">
                    </select>
                </div>
            </div>
            <div class="form-group row text-right">
                <div class="col-md-11 col-lg-11 col-xl-11">
                    <button class="btn btn-primary sombra nuevo" title="Nuevo" id="btnNuevo"><span class="fa fa-plus"></span></button>
                    <button type="submit" class="btn btn-primary sombra guardar cursor" title="Guardar" id="btnGuardar"><span class="fa fa-save"></span></button>
                    <button class="btn btn-primary sombra imprimir" title="Imprimir" id="btnImprimir"><span class="fa fa-print"></span></button>
                    <button class="btn btn-primary sombra modificar" title="Editar o Modificar" id="btnEditar"><span class="fa fa-pencil"></span></button>
                </div>
            </div>
        </form>
    </div>
    <div class="contenedorDetalle superior">
        <form id="formDetalle" method="post" accept-charset="utf-8" action="#">
            {{ csrf_field() }}
            <div class="form-group row">
                <label for="sltConcepto" class="col-form-label col-md-1 col-lg-1 col-xl-1 text-right">
                    <strong class="requerido">*</strong>Concepto:
                </label>
                <div class="col-md-2 col-lg-2 col-xl-2">
                    <select id="sltConcepto" name="sltConcepto" class="form-control select" title="Seleccione concepto" required="">
                    </select>
                </div>
                <label for="txtValor" class="col-form-label col-md-1 col-lg-1 col-xl-1 text-right">
                    <strong class="requerido">*</strong>Valor:
                </label>
                <div class="col-md-2 col-lg-2 col-xl-2">
                    <input type="number" id="txtValor" name="txtValor" class="form-control" placeholder="Valor" title="Ingrese el valor" required="">
                </div>
                <label for="txtAjuste" class="col-form-label col-md-1 col-lg-1 col-xl-1 text-right">
                    <strong class="requerido">*</strong>Ajuste:
                </label>
                <div class="col-md-2 col-lg-2 col-xl-2">
                    <input type="number" id="txtAjuste" name="txtAjuste" class="form-control" placeholder="Ajuste" title="Ingrese el ajuste" required="">
                </div>
                <label for="txtTotal" class="col-form-label col-md-1 col-lg-1 col-xl-1 text-right">
                    <strong class="requerido">*</strong>Total:
                </label>
                <div class="col-md-2 col-lg-2 col-xl-2">
                    <input type="number" id="txtTotal" name="txtTotal" class="form-control" placeholder="Total" title="Total" readonly="">
                </div>
            </div>
        </form>
    </div>
</div>
@stop
@section('script')
<script>
    @if(empty($data->factura))
        $("#btnNuevo, #btnImprimir, #btnEditar").attr('disabled', true);
        $("#btnNuevo, #btnImprimir, #btnEditar").removeAttr('onclick');
    @endif
</script>
@stop