
<div class="row form-group">
    <div class="col-md-10">
        <?php echo html()->label('Employeur','sonum'); ?>

        <?php echo html()->text('employeur', $employeur->id."  ".$employeur->nom)->attributes(['disabled','class' => 'form-control']); ?>

        <?php echo html()->hidden('sonum', $employeur->id, ['class' => 'form-control']); ?>

    </div>

    <div class="col-md-2">
        <?php echo html()->label( 'Date','date'); ?>

        <div class="input-group">
            <div class='input-group date' id='datepicker_date'>
                <?php echo html()->text('date', date('d/m/Y'))->attributes(['placeholder' => 'Date', 'class' => 'form-control']); ?>

                <span class='input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>
            </div>
        </div>
    </div>
</div>

<div class="row form-group">
    <div class="col-md-6">
        <?php echo html()->label( 'Opération','type_ope'); ?>

        <?php echo html()->select('type_ope',$types_operations,'REG')->attributes(['class' => 'form-control']); ?>

        <?php echo html()->hidden('type_ope','REG')->attributes(['readonly','class' => 'form-control']); ?>

    </div>
    <div class="col-md-2">
        <?php echo html()->label('Compte','encais_compte'); ?>

        <?php echo html()->select('encais_compte',App\Models\MyApp::COMPTES_ENCAISSEMENT,'')
            ->placeholder('A définir')
            ->attributes(['class' => 'form-control']); ?>

    </div>
    <div class="col-md-2">
        <?php echo html()->label('Exercice','exercice'); ?>

        <?php echo html()->select('exercice',$exercices,$exercice)->attributes(['id' => 'sonum','class' => 'form-control']); ?>

    </div>
</div>

<div class="row form-group">
    <div class="col-md-4">
        <?php echo html()->label('Type de cotisation','type_cotis'); ?>

        <?php echo html()->select('type_cotis',$types_cotisation,'ENC')->attributes(['disabled','class' => 'form-control']); ?>

        <?php echo html()->hidden('type_cotis','ENC')->attributes(['readonly','class' => 'form-control']); ?>

    </div>

    <div class="col-md-2">
        <?php echo html()->label('Nb mois','nbmois'); ?>

        <?php echo html()->text('nbmois', '')->attributes(['placeholder' => 'Nombre de mois','class' => 'form-control']); ?>

    </div>

    <div class="col-md-3">
        <?php echo html()->label( 'Mois de départ','mois'); ?>

        <div class="input-group">
            <div class='input-group date' id='datepicker_mois'>
                    <?php echo html()->text('mois', '')->attributes(['placeholder' => 'Mois de départ', 'class' => 'form-control']); ?>

                <span class='input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>
            </div>
        </div>
    </div>
</div>

<div class="row form-group">
    <div class="col-md-2 has-success">
        <?php echo html()->label( 'N°Bordereau','bdx'); ?>

        <?php echo html()->text('bdx', $bdx_default)->attributes(['placeholder' => 'Numéro de bordereau','class' => 'form-control']); ?>

    </div>
    <div class="col-md-2 has-success">
        <?php echo html()->label( 'N°Bord. privé','bdx_prive'); ?>

        <?php echo html()->text('bdx_prive', $bdx_prive_default)->attributes(['placeholder' => 'Numéro de bordereau privé','class' => 'form-control']); ?>

    </div>
    <div class="col-md-2">
        <?php echo html()->label( 'Nb&nbsp;salariés','nbsal'); ?>

        <?php echo html()->text('nbsal', $nbsal)->attributes(['placeholder' => 'Nb salariés','class' => 'form-control']); ?>

    </div>
</div>


<div class="row form-group" >
    <legend>Cotisations associées</legend>
    <div class="col-md-8   callout callout-warning">
        <table id="_table" class="table table-condensed table-bordered" style="background-color">
            <thead>
                <tr>
                    <th width='1%'>N°</th>
                    <th width='1%'>Exercice</th>
                    <th width='1%'>Date</th>
                    <th width='1%'>Mois</th>
                    <th width='20%'>Assiette</th> 
                    <th width='20%'>CLR</th> 
                    <th width='20%'>CCPF</th>
                    <th width='30%'>Débit</th>
                </tr>
            </thead> 
            <?php $total_clr=0;$total_ccpf=0;$total_debit=0;$total_assiette=0;$liste_cotisations=""; ?>
            <?php $__currentLoopData = $cotisations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cotisation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php
                    $total_assiette+=$cotisation->assiette;
                    $total_clr+=$cotisation->clr;
                    $total_ccpf+=$cotisation->ccpf;
                    $total_debit+=$cotisation->debit;
                    $liste_cotisations.=(($liste_cotisations=="")?"":",").$cotisation->id;
                ?>
                <tr style='background-color:white'>
                    <td style="color:grey"><?php echo $cotisation->id; ?></td>
                    <td class="text-center"><?php echo $cotisation->exercice; ?></td>
                    <td class="text-center"><?php echo $cotisation->date; ?></td>
                    <td class="text-center"><?php echo $cotisation->nbmois; ?></td>
                    <td class="text-right" nowrap><?php echo $cotisation->assiette; ?></td>
                    <td class="text-right" nowrap><?php echo number_format($cotisation->clr,0,","," "); ?></td>
                    <td class="text-right" nowrap><?php echo number_format($cotisation->ccpf,0,","," "); ?></td>
                    <td nowrap class="text-right" style="font-weight:bold">
                        <?php echo number_format($cotisation->debit,0,","," ")." CFP"; ?>

                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

            <footer>
                <tr class="bg-info">
                    <th class="text-right"></th>
                    <th class="text-right"></th>
                    <th class="text-right"></th>
                    <th class="text-right"></th> 
                    <th class="text-right"><?php echo number_format($total_assiette,0,","," "); ?></th>
                    <th class="text-right"><?php echo number_format($total_clr,0,","," "); ?></th> 
                    <th class="text-right"><?php echo number_format($total_ccpf,0,","," "); ?></th>
                    <th class="text-right danger" style="font-weight:bold"><?php echo number_format($total_debit,0,","," ")." CFP"; ?></th>
                </tr>
            </footer>  
        </table>
    </div>
</div>


<div class="row form-group" >
    <legend>Règlements</legend>
    <div class="col-md-12 callout callout-success">
        <div class="row form-group has-success" >
            <div class="col-md-2">
                <?php echo html()->label( 'Crédit','credit1'); ?>

                <?php echo html()->text('credit1', 0)->attributes(['placeholder' => 'Montant 1','class' => 'form-control']); ?>

            </div>
            <div class="col-md-2">
                 <?php echo html()->label( 'Compte','compte1'); ?>

                 <?php echo html()->text('compte1', $employeur->compte)->attributes(['placeholder' => 'Compte 1','class' => 'form-control']); ?>

            </div>
            <div class="col-md-2">
                <?php echo html()->label( 'Mode','typepmt1'); ?>

                <?php echo html()->select('typepmt1',$types_paiement,'')->attributes(['class' => 'form-control']); ?>

           </div>
            <div class="col-md-2">
                <?php echo html()->label( 'Date de dépôt','date_depot1'); ?>

                <div class="input-group">
                    <div class='input-group date' id='datepicker_date_depot1'>
                            <?php echo html()->text('date_depot1', date('d/m/Y'))->attributes(['placeholder' => 'Date de dépôt', 'class' => 'form-control']); ?>

                        <span class='input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <?php echo html()->label('Observations','obs1'); ?>

                <?php echo html()->textarea('obs1', null)->attributes(['placeholder' => 'Observations 1', 'class' => 'form-control', 'rows'=>'2']); ?>

            </div>
        </div>

        <!-- 2 e règlement -->
        <div class="row form-group">
            <div class="col-md-2">
                <?php echo html()->text('credit2', '')->attributes(['placeholder' => 'Montant 2','class' => 'form-control']); ?>

            </div>
            <div class="col-md-2">
                <?php echo html()->text('compte2', null)->attributes(['placeholder' => 'Compte','class' => 'form-control']); ?>

            </div>
            <div class="col-md-2">
                <?php echo html()->select('typepmt2',$types_paiement,'')->attributes(['class' => 'form-control']); ?>

           </div>

            <div class="col-md-2">
                <div class="input-group">
                    <div class='input-group date' id='datepicker_date_depot2'>
                            <?php echo html()->text('date_depot2', '')->attributes(['placeholder' => 'Date de dépôt', 'class' => 'form-control']); ?>

                        <span class='input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>
                    </div>
                </div>
            </div>

            <div class="col-md-4">
                <?php echo html()->textarea('obs2', null)->attributes(['placeholder' => 'Observations 2', 'class' => 'form-control', 'rows'=>'2']); ?>

            </div>
        </div>
    
        <!-- 3e règlement -->
        <div class="row form-group">
            <div class="col-md-2">
                <?php echo html()->text('credit3', '')->attributes(['placeholder' => 'Montant 3','class' => 'form-control']); ?>

            </div>
            <div class="col-md-2">
                <?php echo html()->text('compte3', null)->attributes(['placeholder' => 'Compte3','class' => 'form-control']); ?>

            </div>
            <div class="col-md-2">
                <?php echo html()->select('typepmt3',$types_paiement,'')->attributes(['class' => 'form-control']); ?>

           </div>

            <div class="col-md-2">
                <div class="input-group">
                    <div class='input-group date' id='datepicker_date_depot3'>
                        <?php echo html()->text('date_depot3', '')->attributes(['placeholder' => 'Date de dépôt', 'class' => 'form-control']); ?>

                        <span class='input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>
                    </div>
                </div>
            </div>

            <div class="col-md-4">
                <?php echo html()->textarea('obs3', null)->attributes(['placeholder' => 'Observations 3', 'class' => 'form-control', 'rows'=>'2']); ?>

            </div>
        </div>

        <!-- 4e règlement -->
        <div class="row form-group">
            <div class="col-md-2">
                <?php echo html()->text('credit4', '')->attributes(['placeholder' => 'Montant 4','class' => 'form-control']); ?>

            </div>
            <div class="col-md-2">
                <?php echo html()->text('compte4', null)->attributes(['placeholder' => 'Compte4','class' => 'form-control']); ?>

            </div>
            <div class="col-md-2">
                <?php echo html()->select('typepmt4',$types_paiement,'')->attributes(['class' => 'form-control']); ?>

           </div>
            <div class="col-md-2">
                <div class="input-group">
                    <div class='input-group date' id='datepicker_date_depot4'>
                        <?php echo html()->text('date_depot4', '')->attributes(['placeholder' => 'Date de dépôt', 'class' => 'form-control']); ?>

                        <span class='input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <?php echo html()->textarea('obs4', null)->attributes(['placeholder' => 'Observations 4', 'class' => 'form-control', 'rows'=>'2']); ?>

            </div>
        </div>

        <!-- 5e règlement -->
        <div class="row form-group">
            <div class="col-md-2">
                <?php echo html()->text('credit5', '')->attributes(['placeholder' => 'Montant 5','class' => 'form-control']); ?>

            </div>
            <div class="col-md-2">
                <?php echo html()->text('compte5', null)->attributes(['placeholder' => 'Compte5','class' => 'form-control']); ?>

            </div>
            <div class="col-md-2">
                <?php echo html()->select('typepmt5',$types_paiement,'')->attributes(['class' => 'form-control']); ?>

           </div>
            <div class="col-md-2">
                <div class="input-group">
                    <div class='input-group date' id='datepicker_date_depot5'>
                        <?php echo html()->text('date_depot5','')->attributes(['placeholder' => 'Date de dépôt', 'class' => 'form-control']); ?>

                        <span class='input-group-addon'><span class='glyphicon glyphicon-calendar'></span></span>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <?php echo html()->textarea('obs5', null)->attributes(['placeholder' => 'Observations 5', 'class' => 'form-control', 'rows'=>'2']); ?>

            </div>
        </div>
    </div>
</div>

<div class="form-group">
    <?php echo html()->hidden('credit',$total_debit); ?>

    <?php echo html()->hidden('assiette',$total_assiette); ?>

    <?php echo html()->hidden('clr',$total_clr); ?>

    <?php echo html()->hidden('ccpf',$total_ccpf); ?>

    <?php echo html()->hidden('liste_cotisations',$liste_cotisations); ?>

    <?php echo html()->hidden('encais_date',''); ?>

    <?php echo html()->submit('Enregistrer')->attributes(['class' => 'btn btn-primary']); ?>

</div>

<?php /**PATH C:\xampp\htdocs\SYSINFO\cpswf\sipre2\resources\views/recouvrement/reglements/content_saisie.blade.php ENDPATH**/ ?>