
<?php $__env->startSection('title'); ?> Cotisations <?php $__env->stopSection(); ?>
<?php $__env->startSection('title_card',""); ?>
<?php $__env->startSection('subtitle_card',""); ?>


<?php $__env->startSection('content'); ?>
    <div class="card">
        <div class="col-lg-max col-lg-offset-1 container-fluid">
            <div class="card-header bg-info">
                Détail des cotisations
            </div>
            <div class="card-body">
                <table id="_table" style="background-color:white"  
                    class="table table-condensed table-striped table-hover table-bordered">
                    <thead>
                        <tr>
                            <th width='1%'>N°</th>
                            <th width='1%'>Exercice</th>
                            <th width='1%'>Date</th>
                            <th width='1%'>Type</th>
                            <th width='1%'>Mois</th>
                            <th width='1%'>Date&nbsp;Encaiss.</th>
                            <th width='1%'>Débit</th>
                            <th width='1%'>Crédit</th>
                        </tr>
                    </thead>
         
                    <tbody>
                        <?php 
                            $total_debit=0;
                            $total_credit=0; 
                        ?>
                        <?php $__currentLoopData = $cotisations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cotisation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
                            <?php
                            $total_debit+=$cotisation->debit;
                            $total_credit+=$cotisation->credit;
                            ?>
                            <tr>
                                <td><?php echo $cotisation->id; ?></td>
                                <td><?php echo $cotisation->exercice; ?></td>
                                <td><?php echo $cotisation->date; ?></td>
                                <td><?php echo $cotisation->type_cotis; ?></td>
                                <td><?php echo $cotisation->mois; ?></td>
                                <td><?php echo $cotisation->encais_date; ?></td>
                                <td><?php echo $cotisation->debit; ?></td>
                                <td><?php echo $cotisation->credit; ?></td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>

                    <tfoot>
                        <tr>
                            <th colspan="6" >TOTAL</th>
                            <th style="color:red"><?php echo $total_debit; ?></th>
                            <th  style="color:blue"><?php echo $total_credit; ?></th>
                        </tr>

                        <tr>
                            <th colspan="7" >SOLDE</th>
                            <th style="color:<?php echo ($total_credit-$total_debit>0)?'blue':'red'; ?>"><?php echo $total_credit-$total_debit; ?></th>
                        </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>




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