<table id="_table" width="100%" style="font-size:.9em;" class="table table-condensed table-bordered ">
    <thead>
        <tr>
            <th width='1%'>Transaction</th>
            <th width='1%'>Creation</th>
            <th width='1%'>Référence</th>
            <th width='1%'>DatePièce</th>
            <th width='1%'>journal</th>
            <th width='1%'>Code Compte</th>
            <th>Compte</th>
            <th width='1%'>Code Compte Aux.</th>
            <th>Nom Compte AUx.</th>
            <th>Designation</th>
            <th width='1%'>Débit</th>
            <th width='1%'>Crédit</th>
            <th width='1%'>Lettrage</th>
        </tr>
    </thead>
    <tbody>
        <?php $total_debit=0;$total_credit=0;$solde=0; ?>
        <?php $__currentLoopData = $grandlivre; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ligneGL): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <?php
                $total_debit+=$ligneGL->debit;
                $total_credit+=$ligneGL->credit;
                $solde=$total_credit-$total_debit;
            ?>
            <tr style="padding:0px">
                <td align="center">
                    <?php if($user->hasRole("ADMINISTRATEUR") || $user->hasRole("COMPTABILITE") || $user->hasRole("CHEF_COMPTABILITE")|| $user->canPermissionName("GLI_VISU")): ?>
                    <a href="<?php echo url('grand_livre/'.$ligneGL->id); ?>" >
                        <?php echo str_pad($ligneGL->IdTransaction,5,"0", STR_PAD_LEFT); ?></span>
                    </a>
                    <?php else: ?>
                        <?php echo str_pad($ligneGL->IdTransaction,5,"0", STR_PAD_LEFT); ?>

                    <?php endif; ?>
                </td>
                <td nowrap><?php echo $ligneGL->date_doc; ?></td>
                <td nowrap><?php echo $ligneGL->ref_doc; ?></td>
                <td nowrap><?php echo $ligneGL->date_ref; ?></td>
                <!--
                <td nowrap align="center">
                    <?php if(strlen($ligneGL->type)>=7): ?>
                        <?php if(substr($ligneGL->type,0,7)=="SALAIRE"): ?>
                           <a href="<?php echo url('salaire_fiche_edition'.'/'.$ligneGL->piece); ?>" target="_blank">
                                <?php echo "Bulletin N° ".str_pad($ligneGL->piece,"0",4,STR_PAD_RIGHT); ?></a>
                        <?php endif; ?>
                        <?php if(substr($ligneGL->type,0,7)=="FACTURE"): ?>
                            <a href="<?php echo url('achats'.'/'.$ligneGL->piece); ?>" target="_blank">
                                <?php echo "Achat N° ".str_pad($ligneGL->piece,"0",4,STR_PAD_RIGHT); ?></a>
                        <?php endif; ?>
                    <?php endif; ?>
                </td>
            -->
                <td nowrap><?php echo $ligneGL->journal; ?></td>
                <td nowrap><?php echo $ligneGL->compte; ?></td>
                <td ><?php echo $ligneGL->CompteLabel; ?></td>
                <td nowrap>
                    <?php if($ligneGL->compte_aux): ?>
                        <a href="<?php echo e(url('employeurs_filtre/'.$ligneGL->IdEmployeur.'/C')); ?>" target='_blank'><?php echo $ligneGL->compte_aux; ?></a>
                    <?php else: ?>
                        <?php echo $ligneGL->compte_aux; ?>

                    <?php endif; ?>
                </td>
                <td ><?php echo $ligneGL->compte_aux_label; ?></td>
                <td ><?php echo $ligneGL->designation; ?></td>
                <td align='right' nowrap><?php echo $ligneGL->debit; ?></td>
                <td align='right' nowrap><?php echo $ligneGL->credit; ?></td>
                <td nowrap><?php echo $ligneGL->lettrage_code; ?></td>
            </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </tbody>

    <tfoot>
        <tr>
            <th colspan="10"></th>
            <th width='1%'style="text-align:right;color:darkred"><?php echo e($total_debit); ?></th>
            <th width='1%'style="text-align:right;color:darkgreen"><?php echo e($total_credit); ?></th>
            <th width='1%' style="text-align:right;color:<?php echo e(($solde<0)?'darkred':'darkgreen'); ?>"><?php echo e($total_credit-$total_debit); ?></th>
        </tr>
    </tfoot>
</table>
<?php /**PATH C:\xampp\htdocs\SYSINFO\cpswf\sipre2\resources\views/comptabilite/grandlivre/liste_ecritures_base.blade.php ENDPATH**/ ?>