

<?php $__env->startSection('title'); ?> RAN <?php $__env->stopSection(); ?>
<?php $__env->startSection('title_card'); ?> Report à Nouveau <?php $__env->stopSection(); ?>
<?php $__env->startSection('subtitle_card',"Liste complète"); ?>
<?php $__env->startSection('content'); ?>


    <div class="card">
        <?php if(Session::has('message')): ?>
            <div class="alert alert-warning"><?php echo Session::get('message'); ?></div>
        <?php endif; ?>

        <?php if($errors->any()): ?>
            <div class="alert alert-warning"><?php echo e($errors->first()); ?></div>
        <?php endif; ?>

        <?php echo Form::open(['ran' => 'form', 'url' => '/journaux', 'class' => 'form-horizontal', 'method' => 'POST']); ?>

              <div class="row">
                <!-- /.col (LEFT) -->
                <div class="col-md-12">
                  <div class="card card-default">
                    <div class="card-header">
                        <h3 class="card-title">Génération des reports à nouveau : 
                        </h3>
                    </div>
                        <div class="card-body">
                            <div class="row">
                                <div class="col-md-2">
                                    <?php echo Form::select('exercice',$exercices,$exercice,
                                        ['id' => 'exercice','class' => 'form-control ','data-width' => "100%"]
                                    ); ?>

                                </div>
                                <div class="col-md-6">
                                    <a href="#" onclick="generate()" class="btn btn-info">Générer les lignes RAN</a>
                                    <a href="#" onclick="destroy()" class="btn btn-danger">Supprimer les lignes RAN</a>
                                </div>
                            </div>
                            <script>
                                function generate() {
                                    var select_exercice = [...document.getElementById('exercice').selectedOptions].map(option => option.value);
                                    if(select_exercice=="") select_exercice=0;
                                    var url="<?php echo url('ran_generate/'); ?>/"+select_exercice ; 
                                    location.href=url;
                                }
                                function destroy() {
                                    var select_exercice = [...document.getElementById('exercice').selectedOptions].map(option => option.value);
                                    if(select_exercice=="") select_exercice=0;
                                    if(confirm("Voulez-vous vraiment supprimer le report à nouveau "+select_exercice)) {
                                        var url="<?php echo url('ran_destroy/'); ?>/"+select_exercice ; 
                                        location.href=url;
                                    }
                                    return;
                                }
                            </script>
                        </div>
                    </div>
                </div>
            </div>
        <?php echo Form::close(); ?>

    </div>
<?php $__env->stopSection(); ?>


<?php $__env->startSection('scripts'); ?>
    <?php echo $__env->make("forms.scripts_datatable_btn_nopage", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.dash', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp7422\htdocs\sysinfo\cpswf\sipre_new\resources\views/comptabilite/ran/index_ran.blade.php ENDPATH**/ ?>