@include('forms.fbncheader')
@include('forms.fdatatables')



<div style="background-color:rgba(255,195,120,.2);"  
    class="col-lg-max col-lg-offset-1 container-fluid">

    <div style="padding-left:0px" class="col-lg-max">
         <div class="row" style="">   
            <div class="col-xs-1" style="padding-left:0px;">
               {!! Html::image("img/mandat.png", 
                    "Mandatements", array( 'width'=>'100%',
                        "style"=>"padding:4px" ))
                !!} 
            </div>
            <div class="col-xs-10" style="padding-left:0px;">
                <h1 style="margin-top:2px;">
                    Mandats : Transferts des mandats
                </h1>
            </div>
        </div>

    </div>
    <br/>
    <div class='col-lg-max' style="padding-top:5px">
        <div class="">
            <table id="_table" style="background-color:white" 
                class="table table-striped table-bordered table-hover" width="100%">
                <thead>
                    <tr>
                        <th width='1%' nowrap>N°</th>
                        <th width='1%'>Exe.</th>
                        <th width='1%'>Date</th>
                        <th width='1%'>Statut</th>
                        <th width='1%'>Date de validation</th>
                        <th>Créanciers</th>
                        <th>Imputations</th>
                        <th width='1%'>Total</th>
                        <!--<th width='1%'></th>-->
                    </tr>
                </thead>
     
                <tbody>
                    @foreach ($mandats as $mandat)
                    <tr>
                        <td align="center">{!! str_pad($mandat->id,6,'0',STR_PAD_LEFT) !!}</td>
                        <td>{!! $mandat->exercice !!}</td>
                        <td>{!! $mandat->date_sai !!}</td>
                        <td>{!! $mandat->statut_mdt !!}</td>
                        <td>{!! $mandat->date_valid !!}</td>
                        <td style='font-size:12px'>{!! $mandat->getListeCreancierHTML() !!}</td>
                        <td style='font-size:12px'>{!! $mandat->getListeImputationsHTML() !!}</td>
                        <td class='' nowrap align="right" style="color:darkblue;">{!! $mandat->montant !!}</td>
                        <!--
                        <td>
                            <div class="col-xs-3">
                                <a href="{!! url('/mandats_export_fichier_TP').'/'.$mandat->id !!}" 
                                        class="btn btn-danger"  target="_blank">Générer le fichier DFiP</a>
                            </div>
                        </td>
                        -->
                    </tr>
                    @endforeach
                </tbody>
            </table>
        </div>
    </div>
    <div class="col-xs-3" style="padding:20px">
        <a href="{!! url('/mandats_export_fichier_TP') !!}" 
                class="btn btn-danger"  target="_blank">Générer le fichier DFiP</a>
    </div>

</div>
{!! Form::close() !!}
</body></html>


@include('forms.fdatatables_script_2')