
<div class="form-group row">
    <div class="col-md-12 " >
        <h4>Imputations</h4>
        <?php echo html()->hidden('select_input', null)->attributes(['id' => 'select_input']); ?>

        <table id="_table" class="table table-condensed table-striped table-bordered">
            <thead>
                <tr>
                    <th width='1px'>Id</th>
                    <th width='1px'>Compte</th>
                    <th >Désignation</th>
                    <th width='1px'>Montant</th>
                    <th width='1px'>Type</th>
                    <th >Observations</th>
                    <th  width='1px'>
                        <?php if($mode=="edit"): ?>
                            <?php if($user->can("IMP_AJO") || $user->HasRole("ADMINISTRATEUR")): ?>
                                <a href="<?php echo url('imputation_create_avec_mandat/'.$mandat->id); ?>"
                                    id='btn_ajout_imputation' class="box_imput fancybox.iframe btn btn-sm btn-success">
                                        <span class='fas fa-plus'></span>
                                </a>
                            <?php endif; ?>
                        <?php endif; ?>
                    </th>
                </tr>
            </thead>

            <?php if(isset($imputations)): ?>
                <tbody>
                    <?php $__currentLoopData = $imputations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $imputation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr class="clickable-row" style="cursor: pointer;" data-href="<?php echo $imputation->id; ?>">
                        <td style='font-style:italic;color:lightgrey'  id='numimput_<?php echo $imputation->id; ?>'>
                            <a href="<?php echo url('imputations_show_frame/'.$imputation->id.'/'.$mandat->id); ?>" class="box_imput fancybox.iframe">
                            <?php echo $imputation->id; ?>

                            </a>
                        </td>
                        <td align='center'><?php echo $imputation->cpt_imp; ?></td>
                        <td ><?php echo $imputation->designation; ?></td>
                        <td align='center'><?php echo $imputation->montant; ?></td>
                        <td align='center'><?php echo $imputation->type_imp; ?></td>
                        <td ><?php echo $imputation->obs; ?></td>
                        <td nowrap>
                            <a href="<?php echo url('imputations_show_frame/'.$imputation->id.'/'.$mandat->id); ?>" class="box_imput fancybox.iframe btn btn-sm  btn-warning" id='btn_visu_imputation' style="margin-right: 3px;">
                                <span class='fas fa-eye'></span>
                            </a>
                            <?php if($mode=="edit"): ?>
                                <?php if($user->can("IMP_MAJ") || $user->HasRole("ADMINISTRATEUR")): ?>
                                    <a href="<?php echo url('imputations_edit_avec_mandat/'.$imputation->id.'/'.$mandat->id); ?>" id='btn_maj_imputation' class="box_imput fancybox.iframe btn btn-sm btn-primary" style="margin-right: 3px;">
                                        <span class='fas fa-pencil'></span>
                                    </a>
                                <?php endif; ?>
                                <?php if($user->can("IMP_SUP") || $user->HasRole("ADMINISTRATEUR")): ?>
                                    <a href="javascript::" onclick="delete_imputation(<?php echo $imputation->id; ?>);" class="btn btn-sm btn-danger" style="margin-right: 3px;">
                                        <span class='fas fa-trash'></span>
                                    </a>
                                <?php endif; ?>
                            <?php endif; ?>
                        </td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            <?php endif; ?>
        </table>
    </div>
</div>

<?php if($mode=="show"): ?>
    <div class="col-lg-12">
        <div class="form-group">
            <a href="javascript:" onclick="imprime_imputation('mandat_imputation');return false;"
            class="  btn btn-info"
            target="_blank">Imputation</a>

            <a href="javascript:" onclick="imprime_imputation('mandat_ordre_pmt_imp');return false;"
            class="  btn btn-info"
            target="_blank" >Ordre de paiement</a>

            <a href="javascript:" onclick="imprime_imputation('mandat_mandat_pmt_imp');return false;"
            class=" btn btn-info"
            target="_blank">Mandat de paiement</a>
        </div>
    </div>
<?php endif; ?>

<?php if($mode=="show"): ?>
    <div id="dialog-creancier" title="Saisie du créancier">
        <div class="row m-3">
            <div class="form-group">
                <div class="col-md-8">
                    <?php echo html()->label('Nom&nbsp;du&nbsp;bénéficiaire&nbsp;:','nom_benef'); ?>

                </div>
                <div class="col-md-12 m-3">
                    <?php echo html()->text('nom_benef', '')->attributes(['placeholder' => "Nom&nbsp;du&nbsp;bénéficiaire",'id'=>'nom_benef', 'class' => 'form-control']); ?>

                </div>
                <div class="col-md-12 m-3">
                    <?php echo html()->text('lieu_benef', '')->attributes(['placeholder' => "Lieu",'id'=>'lieu_benef', 'class' => 'form-control']); ?>

                </div>
            </div>
        </div>
    </div>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\SYSINFO\cpswf\sipre2\resources\views/mandatements/mandats/rows_imputations.blade.php ENDPATH**/ ?>