
<?php $__env->startSection('content'); ?>
    <div class="container">
        <?php if(count($errors) > 0): ?>
        <div class="alert alert-danger" role="alert">
            <ul>
                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li><?php echo e($error); ?></li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
        </div>
        <?php endif; ?>

        <p>
            <h4 style="float: right"><b>Surtir Material</b></h4>
        </p><br><br>

        <form action="<?php echo e(url('/EntradaMateriales')); ?>" method="post" class="form-horizontal">
            <?php echo e(csrf_field()); ?>

            <div class="form-row">
                
                <div class="col-md-4 mb-3">
                    <label class="control-label" for="id_material"><?php echo e('Material'); ?></label>
                    <select class="form-control <?php echo e($errors->has('id_material')?'is-invalid':''); ?>" name="id_material" id="id_material">
                        <option value=""><?php echo e('-- Seleccione el Material'); ?></option>
                        <?php $__currentLoopData = $materiales; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $material): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($material['id_material']); ?>"><?php echo e($material['nombre']); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                    <?php echo $errors->first('id_material', '<div class="invalid-feedback">:message</div>'); ?>

                </div>

                <div class="col-md-3 mb-3">
                    <label class="control-label" for="id_personal"><?php echo e('Responsable:'); ?></label>
                    <select class="form-control <?php echo e($errors->has('id_personal')?'is-invalid':''); ?>" name="id_personal" id="id_personal">
                        <option value=""><?php echo e('-- Seleccionar Responsable --'); ?></option>
                        <?php $__currentLoopData = $personales; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $personal): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($personal['id_personal']); ?>"><?php echo e($personal['apellidos']); ?> RUT: <?php echo e($personal['rut']); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                    <?php echo $errors->first('id_personal', '<div class="invalid-feedback">:message</div>'); ?>

                </div>

                <div class="col-md-4 mb-3">
                    <label class="control-label" for="cantidad_e"><?php echo e('Cantidad'); ?></label>
                    <input class="form-control <?php echo e($errors->has('cantidad_e')?'is-invalid':''); ?>" type="number" name="cantidad_e" id="cantidad_e" min="1" max="100">
                    <?php echo $errors->first('cantidad_e', '<div class="invalid-feedback">:message</div>'); ?>

                </div>

                <div class="col-md-4 mb-3">
                    <label class="control-label" for="fecha_entrada"><?php echo e('Fecha de Entrada'); ?></label>
                    <input class="form-control <?php echo e($errors->has('fecha_entrada')?'is-invalid':''); ?>" type="date" name="fecha_entrada" id="fecha_entrada">
                    <?php echo $errors->first('fecha_entrada', '<div class="invalid-feedback">:message</div>'); ?>

                </div>
            </div>

            <div style="float: right">
                <a href="<?php echo e(url('/EntradaMateriales')); ?>" class="btn btn-primary">Cancelar</a>
                <input type="submit" value="Agregar" class="btn btn-success">
            </div>
        </form>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\Proyectos Laravel\SistemaDigTelRed\resources\views/EntradaMateriales/create.blade.php ENDPATH**/ ?>