<li class="nav-item menu-open">
    <a href="{!! url('/home/comptabilite') !!}" class="nav-link active">
      <i class="nav-icon fas fa-cash-register"></i>
      <p>COMPTABILITE</p>
    </a>
</li>

<!-- COMPTABILITE -->
<li class="nav-item {!! ($menu=='tiers')?'menu-is-opening menu-open':'' !!}">
  <a href="#" class="nav-link {!! ($menu=='tiers')?'active':'' !!}">
    <p>Tiers<i class="fas fa-angle-left right"></i></p>
  </a>
  <ul class="nav nav-treeview ">
    @if($user->hasRole("ADMINISTRATEUR") || $user->canPermissionName("EMP_VISU"))
    <li class="nav-item">
      <a href="{!! url('employeurs_liste/C') !!}" class="nav-link  {!! ($submenu=='employeurs')?'active':'' !!}">
        <i class="nav-icon far fa-circle"></i>
        <p>Employeurs</p>
      </a>
    </li>
    @endif

    @if($user->hasRole("ADMINISTRATEUR") || $user->canPermissionName("CRE_VISU"))
    <li class="nav-item">
      <a href="{!! url('creanciers') !!}" class="nav-link  {!! ($submenu=='creanciers')?'active':'' !!}">
        <i class="nav-icon far fa-circle"></i>
        <p>Créanciers</p>
      </a>
    </li>
    @endif
    @if($user->hasRole("ADMINISTRATEUR") || $user->canPermissionName("BQE_VISU"))
    <li class="nav-item">
      <a href="{!! url('banques') !!}" class="nav-link  {!! ($submenu=='banques')?'active':'' !!}">
        <i class="nav-icon far fa-circle"></i>
        <p>Banques</p>
      </a>
    </li>
     @endif
  </ul>
</li>

@if($user->hasRole("ADMINISTRATEUR") || $user->canPermissionName("GLI_VISU") || $user->canPermissionName("GLI_TRA"))
  <li class="nav-item {!! ($menu=='ecritures')?'menu-is-opening menu-open':'' !!}">
    <a href="#" class="nav-link  {!! ($menu=='ecritures')?'active':'' !!}">
      <p>Ecritures<i class="fas fa-angle-left right"></i></p>
    </a>
    <ul class="nav nav-treeview">
      @if($user->hasRole("ADMINISTRATEUR") || $user->canPermissionName("GLI_VISU"))


        <li class="nav-item">
          <a href="{!! url('grand_livre') !!}" class="nav-link  {!! ($submenu=='journaux')?'active':'' !!}">
            <i class="nav-icon fa fa-newspaper"></i>
            <p>Journaux</p>
          </a>
        </li>


        <li class="nav-item">
          <a href="{!! url('ecritures') !!}" class="nav-link  {!! ($submenu=='ecritures')?'active':'' !!}">
            <i class="nav-icon fa fa-book-open"></i>
            <p>Grand Livre</p>
          </a>
        </li>


        <li class="nav-item">
          <a href="{!! url('comptes') !!}" class="nav-link  {!! ($submenu=='comptes')?'active':'' !!}">
            <i class="nav-icon fa fa-file-invoice"></i>
            <p>Comptes</p>
          </a>
        </li>



        <li class="nav-item">
          <a href="{!! url('balance') !!}" class="nav-link  {!! ($submenu=='balance')?'active':'' !!}">
            <i class="nav-icon fa fa-scale-balanced"></i>
            <p>Balance</p>
          </a>
        </li>
      @endif
      @if($user->hasRole("ADMINISTRATEUR") || $user->canPermissionName("GLI_TRA"))
        <li class="nav-item">
          <a href="{!! url('transferts') !!}" class="nav-link  {!! ($submenu=='transferts')?'active':'' !!}">
            <i class="nav-icon fa fa-arrow-up-from-bracket"></i>
            <p>Transferts</p>
          </a>
        </li>
      @endif
      <!--
      @if($user->hasRole("ADMINISTRATEUR") || $user->hasRole("COMPTABILITE") || $user->hasRole("CHEF_COMPTABILITE"))
      <li class="nav-item">
      <a href="{!! url('suivi_comptable') !!}" class="nav-link  {!! ($submenu=='suivi_comptable')?'active':'' !!}">
        <i class="nav-icon fa fa-file-invoice-dollar"></i>
        <p>Suivi</p>
      </a>
      </li>
      @endif
      -->
    </ul>
  </li>
@endif

@if($user->hasRole("ADMINISTRATEUR")
  || ($user->canPermissionName("JOU_VISU") && $user->canPermissionName("CPT_VISU"))
  || ($user->canPermissionName("PLA_VISU") && $user->canPermissionName("CPT_VISU"))
  || ($user->canPermissionName("GLI_RAN") && $user->canPermissionName("GLI_MAJ") && $user->canPermissionName("CPT_VISU"))
  )
  <div class="dropdown-divider"></div>

  <li class="nav-item {!! ($menu=='configuration')?'menu-is-opening menu-open':'' !!}">
    <a href="#" class="nav-link  {!! ($menu=='configuration')?'active':'' !!}">
      <p>Configuration<i class="fas fa-angle-left right"></i></p>
    </a>

      <ul class="nav nav-treeview">
        @if($user->hasRole("ADMINISTRATEUR")|| ($user->canPermissionName("JOU_VISU") && $user->canPermissionName("CPT_VISU")) )
          <li class="nav-item">
            <a href="{!! url('journaux') !!}" class="nav-link  {!! ($submenu=='journaux')?'active':'' !!}">
              <i class="nav-icon fa fa-newspaper"></i>
              <p>Journaux</p>
            </a>
          </li>
        @endif

        @if($user->hasRole("ADMINISTRATEUR") || ($user->canPermissionName("PLA_VISU") && $user->canPermissionName("CPT_VISU")) )
          <li class="nav-item">
            <a href="{!! url('plan_comptable') !!}" class="nav-link  {!! ($submenu=='plan_comptable')?'active':'' !!}">
              <i class="nav-icon fa fa-book"></i>
              <p>Plan comptable</p>
            </a>
          </li>
        @endif

        @if($user->hasRole("ADMINISTRATEUR") || ($user->canPermissionName("GLI_RAN") && $user->canPermissionName("GLI_MAJ") && $user->canPermissionName("CPT_VISU")) )
          <li class="nav-item">
            <a href="{!! url('ran') !!}" class="nav-link {!! ($submenu=='ran')?'active':'' !!}">
              <i class="far fa-circle nav-icon text-info"></i>
              <p>R.A.N.</p>
            </a>
          </li>
        @endif
      </ul>
  </li>
@endif

@if($user->hasRole("ADMINISTRATEUR") || $user->canPermissionName("OLDCPT_VISU"))
  <div class="dropdown-divider"></div>

  <li class="nav-item {!! ($menu=='old_compta')?'menu-is-opening menu-open':'' !!}">
    <a href="#" class="nav-link  {!! ($menu=='old_compta')?'active':'' !!}">
      <p>Ancienne Comptabilité<i class="fas fa-angle-left right"></i></p>
    </a>

      <ul class="nav nav-treeview">
        @if($user->hasRole("ADMINISTRATEUR"))
          <li class="nav-item">
            <a href="{!! url('/recouvrement/cotisations') !!}" class="nav-link  {!! ($submenu=='compta_old_saisiereglement')?'active':'' !!}">
              <i class="far fa-circle nav-icon text-warning"></i>
              <p>Saisie des règlements</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="{!! url('/reglement_pointage') !!}" class="nav-link  {!! ($submenu=='compta_old_pointagereglement')?'active':'' !!}">
              <i class="far fa-circle nav-icon text-warning"></i>
              <p>Pointage des règlements</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="{!! url('/recouvrement/cotisations_encours') !!}" class="nav-link  {!! ($submenu=='compta_old_aencaisser')?'active':'' !!}">
              <i class="far fa-circle nav-icon text-warning"></i>
              <p>Cotisations à encaisser</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="{!! url('/recouvrement/cotisations_encaissees') !!}" class="nav-link  {!! ($submenu=='compta_old_encaisser')?'active':'' !!}">
              <i class="far fa-circle nav-icon text-warning"></i>
              <p>Cotisations encaissées</p>
            </a>
          </li>
        @endif
          <li class="nav-item">
            <a href="{!! url('compta_old/plan') !!}" class="nav-link {!! ($submenu=='compta_old_plancomptable')?'active':'' !!}">
              <i class="far fa-circle nav-icon text-info"></i>
              <p>Plan comptable</p>
            </a>
          </li>

          <li class="nav-item">
            <a href="{!! url('compta_old/journal') !!}" class="nav-link {!! ($submenu=='compta_old_journaux')?'active':'' !!}">
              <i class="far fa-circle nav-icon text-info"></i>
              <p>Journaux</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="{!! url('compta_old/bilan/R') !!}" class="nav-link {!! ($submenu=='compta_old_bilans')?'active':'' !!}">
              <i class="far fa-circle nav-icon text-success"></i>
              <p>Bilans</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="{!! url('compta_old/compte_resultat') !!}" class="nav-link {!! ($submenu=='compta_old_compteresultat')?'active':'' !!}">
              <i class="far fa-circle nav-icon text-success"></i>
              <p>Compte de résultat</p>
            </a>
          </li>

      </ul>
  </li>
@endif


