


<?php $__env->startSection('title'); ?> Nouvelle fiche salaire <?php $__env->stopSection(); ?>
 
<?php $__env->startSection('content'); ?>
 
<div class='col-lg-10 col-lg-offset-1'>
 
    <?php if($errors): ?>
        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class='bg-danger alert'><?php echo $error; ?></div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    <?php endif; ?>

    <h1><i class='fa fa-banque'></i> Nouveau salaire</h1>

    <?php echo Form::open(['salaire' => 'form', 'url' => '/recouvrement/salaires', 'class' => 'form-horizontal']); ?>


    <div class="tab-content">

        <div class="form-group">

            <div class="col-md-4">
                    <?php echo Form::label('benum', 'Bénéficiaire'); ?>

                    <?php echo Form::hidden('benum', $beneficiaire->id); ?>

                    <div class="input-group">
                        <div class="input-group-addon" id="ref_beneficiaire"><?php echo $beneficiaire->id; ?></div>
                        <?php echo Form::text('benom', $beneficiaire->nom_complet, 
                            ['class' => 'form-control','disabled'=>'true']
                            ); ?>

                    </div>
            </div>
            <div class="col-md-8">
                    <?php echo Form::label('sonum', 'Employeur'); ?>

                    <?php echo Form::hidden('sonum', $employeur->id); ?>

                    <div class="input-group">
                        <div class="input-group-addon" name="ref_employeur" id='ref_employeur'><?php echo $employeur->id; ?></div>
                        <?php echo Form::text('employeur_nom', $employeur->nom, 
                            ['class' => 'form-control', 
                                'name'=>"employeur_nom",'id'=>"employeur_nom"]
                            ); ?>

                    </div>
                <script>
                        $(function() {        
                           $("#employeur_nom").autocomplete({
                                source: "<?php echo route('autocomplete_employeur'); ?>",
                                minLength: 2,
                                select: function(event, ui) {
                                    $('#sonum').val(ui.item.id);
                                    $('#ref_employeur').html(ui.item.id);
                                },
                                change: function( event, ui ) {
                                    var id_nom=ui.item.value.trim();
                                    var nom;
                                    if(id_nom.length>5) nom=(id_nom.substring(4)).trim();
                                    $('#employeur_nom').val(nom);
                                    $('#ref_employeur').html(ui.item.id);
                                    $('#sonum').val(ui.item.id);
                                }
                            }); 
                           return;
                        });
                </script>
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-1">
                    <?php echo Form::label('annee', 'Année'); ?>

                    <?php echo Form::text('annee', null, ['class' => 'form-control']); ?>

            </div>

            <div class="col-md-4">
                <?php echo Form::label('dat_ent', 'Date d\'entrée'); ?>

                <div class="input-group">
                    <div class='input-group date' id='datepicker_dat_ent'>
                            <?php echo Form::text('dat_ent', '', ['placeholder' => 'Date d\'entrée', 'class' => 'form-control']); ?>

                        <span class='input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>

                        <script type="text/javascript">
                            $(function () {
                                $('#datepicker_dat_ent').datepicker({
                                    format: "dd/mm/yyyy",
                                    language: "fr",
                                    autoclose: true
                                });
                            });
                        </script>
                    </div>
                </div>
            </div>

            <div class="col-md-4">
                <?php echo Form::label('date_sor', 'Date de sortie'); ?>

                <div class="input-group">
                    <div class='input-group date' id='datepicker_date_sor'>
                            <?php echo Form::text('date_sor', '', ['placeholder' => 'Date de sortie', 'class' => 'form-control']); ?>

                        <span class='input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>

                        <script type="text/javascript">
                            $(function () {
                                $('#datepicker_date_sor').datepicker({
                                    format: "dd/mm/yyyy",
                                    language: "fr",
                                    autoclose: true
                                });
                            });
                        </script>
                    </div>
                </div>
            </div>
        </div>


        <div class="form-group">
            <div class="col-md-2">
                    <?php echo Form::label('jan', 'Janvier'); ?>

                    <?php echo Form::text('jan', null, ['class' => 'form-control']); ?>

            </div>

            <div class="col-md-2">
                    <?php echo Form::label('fev', 'Février'); ?>

                    <?php echo Form::text('fev', null, ['class' => 'form-control ']); ?>

            </div>

            <div class="col-md-2">
                    <?php echo Form::label('mar', 'Mars'); ?>

                    <?php echo Form::text('mar', null, ['class' => 'form-control']); ?>

            </div>

            <div class="col-md-2">
                    <?php echo Form::label('avr', 'Avril'); ?>

                    <?php echo Form::text('avr', null, ['class' => 'form-control']); ?>

            </div>

            <div class="col-md-2">
                    <?php echo Form::label('mai', 'Mai'); ?>

                    <?php echo Form::text('mai', null, ['class' => 'form-control']); ?>

            </div>

            <div class="col-md-2">
                    <?php echo Form::label('jun', 'Juin'); ?>

                    <?php echo Form::text('jun', null, ['class' => 'form-control']); ?>

            </div>
        </div>

        <div class="form-group">
            <div class="col-md-2">
                    <?php echo Form::label('jui', 'Juillet'); ?>

                    <?php echo Form::text('jui', null, ['class' => 'form-control']); ?>

            </div>

            <div class="col-md-2">
                    <?php echo Form::label('aou', 'Aout'); ?>

                    <?php echo Form::text('aou', null, ['class' => 'form-control']); ?>

            </div>

            <div class="col-md-2">
                    <?php echo Form::label('sep', 'Septembre'); ?>

                    <?php echo Form::text('sep', null, ['class' => 'form-control']); ?>

            </div>

            <div class="col-md-2">
                    <?php echo Form::label('oct', 'Octobre'); ?>

                    <?php echo Form::text('oct', null, ['class' => 'form-control']); ?>

            </div>

            <div class="col-md-2">
                    <?php echo Form::label('nov', 'Novembre'); ?>

                    <?php echo Form::text('nov', null, ['class' => 'form-control']); ?>

            </div>

            <div class="col-md-2">
                    <?php echo Form::label('dec', 'Décembre'); ?>

                    <?php echo Form::text('dec', null, ['class' => 'form-control']); ?>

            </div>
        </div>

</div>

    <div class='form-group'>
        <?php echo Form::submit('Enregistrer', ['class' => 'btn btn-primary']); ?>

    </div>
 
    <?php echo Form::close(); ?>

 
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\SYSINFO\cpswf\sipre\resources\views/recouvrement/salaires/create.blade.php ENDPATH**/ ?>