
<?php echo $with_navbar=false; ?>

<?php $__env->startSection('title'); ?> Journal <?php $__env->stopSection(); ?>
<?php $__env->startSection('title_card',"Consultation d'une fiche Journal"); ?>
<?php $__env->startSection('content'); ?>
<div class="card">
        <?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; ?>
        <div class="col-lg-max col-lg-offset-1 container-fluid"> 
            <?php echo e(html()->modelForm($journal)->attributes(['journaux' => 'form', 'url' => '/journaux/'.$journal->id, 'class' => 'form-horizontal', 'method' => 'PUT'])->open()); ?>


                <?php echo $__env->make("comptabilite.journaux.content", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

            <?php echo e(html()->closeModelForm()); ?>

            <?php if(($user->hasRole("ADMINISTRATEUR") || $user->can("PLA_SUP"))  && ($journal->NbEcritures==0)): ?>   
                <?php echo e(html()->form('DELETE', url('journaux/' . $journal->id))->open()); ?>                   
                    <?php echo e(csrf_field()); ?>

                    <button class="btn btn-danger">Supprimer</button>
                <?php echo e(html()->closeModelForm()); ?>

            <?php endif; ?>
        </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.dash', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\SYSINFO\cpswf\sipre2\resources\views/comptabilite/journaux/show.blade.php ENDPATH**/ ?>