<?php $__env->startSection('title', "Resoluciones de cobro"); ?>
<?php $__env->startSection('content'); ?>
<div class="col-sm-12 col-md-9 col-lg-10 col-xl-10">
    <h3 class="text-center titulo">Resolución de Cobro</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>
            <?php echo e(csrf_field()); ?>

            <div class="form-group row">
                <label for="sltPredioI" class="col-sm-12 col-form-label col-md-5 col-lg-5 col-xl-5 text-right">
                    <strong class="requerido">*</strong>Codigo Castastral Inicial:
                </label>
                <div class="col-sm-12 col-md-5 col-lg-5 col-xl-5 validar">
                    <input type="text" name="txtPredioI" id="txtPredioI" class="form-control" placeholder="Codigo Catastral Inicial" autocomplete="off" style="height: 34px;">
                    <input type="hidden" name="sltPredioI" id="sltPredioI">
                </div>
            </div>
            <div class="form-group row">
                <label for="sltPredioF" class="col-sm-12 col-form-label col-md-5 col-lg-5 col-xl-5 text-right">
                    <strong class="requerido">*</strong>Codigo Castastral Final:
                </label>
                <div class="col-sm-12 col-md-5 col-lg-5 col-xl-5 validar">
                    <input type="text" name="txtPredioF" id="txtPredioF" class="form-control" placeholder="Codigo Catastral Final" autocomplete="off" style="height: 34px;">
                    <input type="hidden" name="sltPredioF" id="sltPredioF">
                </div>
            </div>
            <div class="form-group row">
                <label for="txtAnnoI" class="col-sm-12 col-form-label col-md-5 col-lg-5 col-xl-5 text-right">
                    <strong class="requerido">*</strong>Año Inicial:
                </label>
                <div class="col-sm-12 col-md-5 col-lg-5 col-xl-5 validar">
                    <input type="text" name="txtAnnoI" id="txtAnnoI" class="anno form-control" placeholder="Año Inicial" title="Ingrese año inicial" required="" autocomplete="off">
                </div>
            </div>
            <div class="form-group row">
                <label for="txtAnnoF" class="col-sm-12 col-form-label col-md-5 col-lg-5 col-xl-5 text-right">
                    <strong class="requerido">*</strong>Año Final:
                </label>
                <div class="col-sm-12 col-md-5 col-lg-5 col-xl-5 validar">
                    <input type="text" name="txtAnnoF" id="txtAnnoF" class="anno form-control" placeholder="Año Final" title="Ingrese año final" required="" autocomplete="off">
                </div>
            </div>
            <div class="form-group row">
                <label for="txtMonto" class="col-sm-12 col-form-label col-md-5 col-lg-5 col-xl-5 text-right">
                    <strong class="requerido">*</strong>Monto Superior a:
                </label>
                <div class="col-sm-12 col-md-5 col-lg-5 col-xl-5 validar">
                    <input type="text" name="txtMonto" id="txtMonto" class="form-control" placeholder="Ingrese monto" title="Ingrese monto" required="" autocomplete="off">
                </div>
            </div>
            <div class="form-group row">
                    <label for="sltTipoA" class="col-form-label col-sm-5 col-md-5 col-lg-5 col-xl-5 text-right"><strong class="requerido">*</strong>Cartera:</label>
                    <div class="col-sm-5 col-md-5 col-lg-5">
                        <select name="sltCartera" id="sltCartera" class="form-control select" required>
                            <?php
                            $html = "";
                            $html .= "<option value=''>Cartera</option>";
                            foreach ($carteras as $row){
                                $html .= "<option value='$row->normf'>$row->fecha</option>";
                            }
                            echo $html;
                            ?>
                        </select>
                    </div>        
            </div>
            <div class="form-group row">
                     <label for="txtFechaF" class="col-sm-12 col-form-label col-md-5 col-lg-5 col-xl-5 text-right">
                         <strong class="requerido"></strong>Fecha Generación:
                     </label>
                     <div class="col-sm-12 col-md-5 col-lg-5 col-xl-5 validar">
                         <input type="text" name="txtFechaF" id="txtFechaF" title="Ingrese fecha Generación" value="" class="form-control" placeholder="Fecha">
                     </div>
            </div>
            <div class="form-group row">
                <label for="sltListado" class="col-sm-12 col-form-label col-md-5 col-lg-5 col-xl-5 text-right">
                    <strong class="requerido">*</strong>Listado:
                </label>
                <div class="col-sm-12 col-md-5 col-lg-5 col-xl-5 validar">
                    <select name="sltListado" id="sltListado" class="form-control select">
                        <option value="">Listado</option>
                        <option value="1">Resolución de Cobro-WORD </option>
                        <option value="2">Resolución de Cobro-PDF</option>
                      
                    </select>
                </div>
            </div>
            

            <div class="form-group row">
                <label for="txtMonto" class="col-form-label col-md-5 col-lg-5 col-xl-5 text-right"></label>
                <div class="col-sm-12 col-md-5 col-lg-5 col-xl-5 validar">
                <button type="submit" class="btn btn-primary fa fa-download sombra"></button>

                </div>
                
            </div>
        </form>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
    $("#txtPredioI").autocomplete({
        source: "/municipiobarbosa-sigiep/predial/public/predio/buscar",
        minlength: 2,
        select: function(event, ui){
            $("#sltPredioI").val(ui.item.id);
            $("#txtPredioI").val(ui.item.value);
        }
    });

    $("#txtPredioF").autocomplete({
        source: "/municipiobarbosa-sigiep/predial/public/predio/buscar",
        minlength: 2,
        select: function(event, ui){
            $("#sltPredioF").val(ui.item.id);
            $("#txtPredioF").val(ui.item.value);
        }
    });

    $("#sltListado").chosen().change(function(){
        var lis = $("#sltListado").val();
        switch(lis){
            case '1':
                $("#form").attr("action", '<?php echo e(route("GenerarResolucionCobro")); ?>');
                break;
            case '2':
                $("#form").attr("action", '<?php echo e(route("InformeResolucionPdf")); ?>');
                break;
        }
    });

</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>