Notas<!--sidebar-menu-->
<div id="sidebar"> <a href="#" class="visible-phone">
	<i class="fas fa-list"></i> Menu</a>
    <ul style="position: relative;">
      <!--start-top-serch-->
  <div id="search">
    <form action="<?= site_url('mapos/pesquisar') ?>">
      <input type="text" name="termo" placeholder="Pesquisar..." />
      <button type="submit" class="tip-bottom" title="Pesquisar"><i class="fas fa-search fa-white"></i></button>
    </form>
  </div>
  <!--close-top-serch--><li class="<?php if (isset($menuPainel)) {
    echo 'active';
	
}; ?>"><a href="<?= base_url() ?>"><i class="fas fa-home"></i><span></span></a></li>
      <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vCliente')) { ?>
      <li class="<?php if (isset($menuClientes)) {
    echo 'active';
}; ?>"><a href="<?= site_url('clientes') ?>"><i class="fas fa-users"></i> <span>Clientes Apple</span></a></li>
      <?php
        } ?>
      <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vProduto')) { ?>
      <li class="<?php if (isset($menuProdutos)) {
            echo 'active';
        }; ?>"><a href="<?= site_url('produtos') ?>"><i class="fas fa-shopping-bag"></i> <span>Produtos Apple</span></a></li>
      <?php
        } ?>
      <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vServico')) { ?>
      <li class="<?php if (isset($menuServicos)) {
            echo 'active';
        }; ?>"><a href="<?= site_url('servicos') ?>"><i class="fas fa-wrench"></i> <span>Serviços Apple</span></a></li>
      <?php
        } ?>
      <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vOs')) { ?>
      <li class="<?php if (isset($menuOs)) {
            echo 'active';
        }; ?>"><a href="<?= site_url('os') ?>"><i class="fas fa-diagnoses"></i> <span>Ordens de Serviço</span></a></li>
      <?php
        } ?>
      <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vVenda')) { ?>
      <li class="<?php if (isset($menuVendas)) {
            echo 'active';
        }; ?>"><a href="<?= site_url('vendas') ?>"><i class="fas fa-cash-register"></i> <span>Vendas</span></a></li>
      <?php
        } ?>
      <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vLancamento')) { ?>
      <li class="<?php if (isset($menuFinanceiro)) {
            echo 'active';
        }; ?>"><a href="<?= site_url('financeiro/lancamentos') ?>"><i class="fas fa-hand-holding-usd"></i> <span>Financeiro</span></a></li>
      <?php
        } ?>
      
      <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vArquivo')) { ?>
      <li class="<?php if (isset($menuArquivos)) {
            echo 'active';
        }; ?>"><a href="<?= site_url('arquivos') ?>"><i class="fas fa-hdd"></i> <span>Notas (Novo)</span></a></li>
      <li class="submenu <?php if(isset($menuCadastros)){
	echo 'active open';};?>">
        <a href="#"><i class="fas fa-edit"></i> <span>Cadastros</span> <span class="label"><i class="fas fa-chevron-down"></i></span></a>
        <ul>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vCliente')) { ?>
          <?php
        } ?>
          <?php if($this->permission->checkPermission($this->session->userdata('permissao'),'vFuncionario')){ ?>
          <li class="<?php if (isset($menuFuncionarios)) {echo 'active';}?>"><a href="<?php echo base_url()?>index.php/funcionarios">
          <i class="fas fa-user-cog"></i> <span> Funcionarios</span></a></li>
          <?php } ?>
          <?php if($this->permission->checkPermission($this->session->userdata('permissao'),'vFornecedor')){ ?>
          <li  class="<?php if (isset($menuFornecedores)) {echo 'active';}?>"><a href="<?php echo base_url() ?>index.php/fornecedores">
          <i class="fas fa-truck"></i> Fornecedores</a></li>
          <?php } ?>
          
          <?php if($this->permission->checkPermission($this->session->userdata('permissao'),'vMarca')){ ?>
          <li  class="<?php if (isset($menuMarcas)) {echo 'active';}?>"><a href="<?php echo base_url() ?>index.php/marcas">
          <i class="fas fa-stamp"></i> Equipamento</a></li>
          <?php } ?>
          <?php if($this->permission->checkPermission($this->session->userdata('permissao'),'vModelo')){ ?>
          <li  class="<?php if (isset($menuModelos)) {echo 'active';}?>"><a href="<?php echo base_url() ?>index.php/modelos">
          <i class="fas fa-cogs"></i> Modelos</a></li>
          <?php } ?>
          <?php if($this->permission->checkPermission($this->session->userdata('permissao'),'vEquipamento')){ ?>
          <li  class="<?php if (isset($menuEquipamentos)) {echo 'active';}?>"><a href="<?php echo base_url() ?>index.php/equipamentos">
          <i class="fas fa-industry"></i> Cor</a></li>
          <?php } ?>
        </ul>
        <?php
        } ?>
        <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'vLancamento')) { ?>
      </li>
      <?php
        } ?>
      <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'rCliente') || $this->permission->checkPermission($this->session->userdata('permissao'), 'rProduto') || $this->permission->checkPermission($this->session->userdata('permissao'), 'rServico') || $this->permission->checkPermission($this->session->userdata('permissao'), 'rOs') || $this->permission->checkPermission($this->session->userdata('permissao'), 'rFinanceiro') || $this->permission->checkPermission($this->session->userdata('permissao'), 'rVenda')) { ?>
      <li class="submenu <?php if (isset($menuRelatorios)) {
            echo 'active open';
        }; ?>">
        <a href="#"><i class="fas fa-list-alt"></i> <span>Relatórios</span> <span class="label"><i class="fas fa-chevron-down"></i></span></a>
        <ul>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'rCliente')) { ?>
          <li><a href="<?= site_url('relatorios/clientes') ?>">Clientes</a></li>
          <?php
                    } ?>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'rProduto')) { ?>
          <li><a href="<?= site_url('relatorios/produtos') ?>">Produtos</a></li>
          <?php
                    } ?>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'rServico')) { ?>
          <li><a href="<?= site_url('relatorios/servicos') ?>">Serviços</a></li>
          <?php
                    } ?>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'rOs')) { ?>
          <li><a href="<?= site_url('relatorios/os') ?>">Ordens de Serviço</a></li>
          <?php
                    } ?>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'rVenda')) { ?>
          <li><a href="<?= site_url('relatorios/vendas') ?>">Vendas</a></li>
          <?php
                    } ?>
          
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'rFinanceiro')) { ?>
          <li><a href="<?= site_url('relatorios/financeiro') ?>">Financeiro</a></li>
          <?php
                    } ?>
          
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'rFinanceiro') && $this->permission->checkPermission($this->session->userdata('permissao'), 'rOs')) { ?>
          <li><a href="<?= site_url('relatorios/receitasBrutasMei') ?>">Receitas Brutas - MEI</a></li>
          <?php
                    } ?>
        </ul>
      </li>
      <?php
        } ?>
      <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'cUsuario')  || $this->permission->checkPermission($this->session->userdata('permissao'), 'cEmitente') || $this->permission->checkPermission($this->session->userdata('permissao'), 'cPermissao') || $this->permission->checkPermission($this->session->userdata('permissao'), 'cBackup')) { ?>
      <li class="submenu <?php if (isset($menuConfiguracoes)) {
            echo 'active open';
        }; ?>">
        <a href="#"><i class="fas fa-cog"></i> <span>Configurações</span> <span class="label"><i class="fas fa-chevron-down"></i></span></a>
        <ul>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'cSistema')) { ?>
          <li><a href="<?= site_url('mapos/configurar') ?>">Sistema</a></li>
          <?php } ?>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'cUsuario')) { ?>
          <li><a href="<?= site_url('usuarios') ?>">Usuários</a></li>
          <?php } ?>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'cEmitente')) { ?>
          <li><a href="<?= site_url('mapos/emitente') ?>">Emitente</a></li>
          <?php } ?>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'cPermissao')) { ?>
          <li><a href="<?= site_url('permissoes') ?>">Permissões</a></li>
          <?php } ?>
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'cAuditoria')) { ?>
          <li><a href="<?= site_url('auditoria') ?>">Auditoria</a></li>
          <?php } ?>
          
          <?php if ($this->permission->checkPermission($this->session->userdata('permissao'), 'cBackup')) { ?>
          <li><a href="<?= site_url('mapos/backup') ?>">Backup</a></li>
          <?php } ?>
        </ul>
      </li>
      <?php
        } ?>
      <li>
        <a class="text-white" href="<?= site_url('login/sair'); ?>"><i class="fas fa-sign-out-alt"></i> <span>Sair</span></a></li>
      
  </ul>
</div>
