<table id="_table" width="100%" class="table table-condensed table-bordered ">
    <thead>
        <tr>
            <th width='1%'>Id</th>
            <th width='1%'>Transaction</th>
            <th width='1%'>Création</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>
        @foreach ($grandlivre as $ligneGL)
        <tr style="">
            <td nowrap>{!! $ligneGL->id !!}</td>
            <td align="center">
                @if($user->hasRole("ADMINISTRATEUR") || $user->hasRole("COMPTABILITE") || $user->hasRole("CHEF_COMPTABILITE")|| $user->canPermissionName("GLI_VISU"))
                <a href="{!! url('grand_livre/'.$ligneGL->id) !!}" >
                    {!! str_pad($ligneGL->IdTransaction,5,"0", STR_PAD_LEFT); !!}</span>
                </a>
                @else
                    {!! str_pad($ligneGL->IdTransaction,5,"0", STR_PAD_LEFT); !!}
                @endif
            </td>
            <td nowrap>{!! $ligneGL->date_doc !!}</td>
            <td nowrap>{!! $ligneGL->ref_doc !!}</td>
            <td nowrap>{!! $ligneGL->date_ref !!}</td>
            <!--
            <td nowrap align="center">
                @if(strlen($ligneGL->type)>=7)
                    @if(substr($ligneGL->type,0,7)=="SALAIRE")
                       <a href="{!! url('salaire_fiche_edition'.'/'.$ligneGL->piece) !!}" target="_blank">
                            {!! "Bulletin N° ".str_pad($ligneGL->piece,"0",4,STR_PAD_RIGHT) !!}</a>
                    @endif
                    @if(substr($ligneGL->type,0,7)=="FACTURE")
                        <a href="{!! url('achats'.'/'.$ligneGL->piece) !!}" target="_blank">
                            {!! "Achat N° ".str_pad($ligneGL->piece,"0",4,STR_PAD_RIGHT) !!}</a>
                    @endif
                @endif
            </td>
            -->
            <td nowrap>{!! $ligneGL->journal !!}</td>
            <td nowrap>{!! $ligneGL->compte !!}</td>
            <td >{!! $ligneGL->CompteLabel !!}</td>
            <td nowrap>
                @if($ligneGL->compte_aux) 
                    <a target='_blank' href="{!! url('employeurs_filtre/'.$ligneGL->IdEmployeur.'/C') !!}">
                        {!! $ligneGL->compte_aux !!}
                    </a>
                @endif 
            </td>
            <td >{!! $ligneGL->compte_aux_label !!}</td>
            <td >{!! $ligneGL->designation !!}</td>
            <td align='right' nowrap>{!! $ligneGL->debit !!}</td>
            <td align='right' nowrap>{!! $ligneGL->credit !!}</td>
            <td nowrap>{!! $ligneGL->lettrage_code !!}</td>

        </tr>
        @endforeach
    </tbody>
</table>
