<?php

require 'script_php/login_verificar.php';
 
$loja = $_SESSION['loja'];
$usuario = $_SESSION['usuario'];
$tipousuario = tipousuario($usuario, $conexao);
?>

<section class="container mt-4 menu2">


  <div class="d-flex flex-wrap gap-3">

    <!-- COMPRAS -->
    <div class="dropdown">
      <button class="btn botaomenu btn-warning dropdown-toggle" type="button" data-bs-toggle="dropdown">
        <i class="bi bi-clipboard2-data"></i> COMPRAS
      </button>
      <ul class="dropdown-menu">
        <li><a class="dropdown-item" href="pedidos.php"><i class="bi bi-journal-text me-2"></i>PEDIDOS ABERTOS</a></li>

        <li><a class="dropdown-item" href="naoimportadas.php"><i class="bi bi-clock-history me-2"></i>PENDENTE DE ENTRADA</a></li>
        <?php if ($tipousuario != 'recebimento'){ ?>

        <li><a class="dropdown-item" href="comprasanalise.php"><i class="bi bi-bag-plus me-2"></i>EFETUAR COMPRA</a></li>
        <li><a class="dropdown-item" href="estoqueMinimo.php?loja=TODAS"> <i class="bi bi-search-heart me-2"> </i>ESTOQUE MINIMO</a></li>
        <li><a class="dropdown-item" href="statusAvaria.php?numeroPedido=0"> <i class="bi bi-search-heart me-2"> </i>ENVIO AVARIAS</a></li>
        
        
        
               <?php } ?>

        <li><a class="dropdown-item" href="relatorioEntradasFiltro.php"><i class="bi bi-file-earmark-bar-graph me-2"></i>RELATÓRIO DE ENTRADAS</a></li>
        <?php if ($tipousuario != 'recebimento'){ ?>
        <li><a class="dropdown-item" href="comprasRelatorio.php"><i class="bi bi-calendar-range me-2"></i>COMPRAS POR PERÍODO</a></li>

        <li><a class="dropdown-item" href="avariasFiltro.php"><i class="bi bi-search-heart me-2"></i>PESQUISAR AVARIAS</a></li>

        <?php } ?>

      </ul>
    </div>

    <!-- VENDAS -->
    <div class="dropdown">
      <button class="btn botaomenu btn-warning dropdown-toggle" type="button" data-bs-toggle="dropdown">
        <i class="bi bi-cart-check"></i> VENDAS
      </button>
      <ul class="dropdown-menu">
        <li><a class="dropdown-item" href="gerador.php"><i class="bi bi-file-earmark-pdf me-2"></i>BAIXAR VENDAS EM PDF</a></li>
        <li><a class="dropdown-item" href="painelvendasDatas.php"><i class="bi bi-diagram-3 me-2"></i>VENDAS POR FABRICANTE</a></li>
        <li><a class="dropdown-item" href="vendasVendedor.php"><i class="bi bi-person-lines-fill me-2"></i>VENDAS POR VENDEDOR</a></li>
        <li><a class="dropdown-item" href="trocarVendedor.php"><i class="bi bi-arrow-left-right me-2"></i>TROCAR VENDEDOR NFCE</a></li>
        <li><a class="dropdown-item" href="grupohanking.php"><i class="bi bi-trophy me-2"></i>HANKING DE GRUPOS</a></li>

        <?php if (($tipousuario != 'fiscal' && $tipousuario != 'recebimento')){ ?>
        <li><a class="dropdown-item" href="fomularioVendasPeriodo.php"><i class="bi bi-calendar-week me-2"></i>VENDAS PERÍODO</a></li>
        <li><a class="dropdown-item" href="vendasPeriodoLojas.php"><i class="bi bi-bar-chart-line me-2"></i>COMPRAS X VENDAS</a></li>
        <?php } ?>
      </ul>
    </div>

    <!-- FINANCEIRO -->
    <?php if ($tipousuario != 'recebimento'){ ?>
    <div class="dropdown">
      <button class="btn botaomenu btn-warning dropdown-toggle" type="button" data-bs-toggle="dropdown">
        <i class="bi bi-cash-coin"></i> FINANCEIRO
      </button>
      <ul class="dropdown-menu">
        <li><a class="dropdown-item" href="conta_filtroBaixa.php"><i class="bi bi-bank2 me-2"></i>BAIXAR BOLETOS</a></li>
        <li><a class="dropdown-item" href="cofre.php"><i class="bi bi-cash-stack me-2"></i>SANGRIAS</a></li>
        <li><a class="dropdown-item" href="relatoriocaixa.php"><i class="bi bi-file-text me-2"></i>SANGRIAS LANÇADAS</a></li>
        <li><a class="dropdown-item" href="FechamentoCaixa.php"><i class="bi bi-x-square me-2"></i>EXCLUIR FECHAMENTO</a></li>
        <li><a class="dropdown-item" href="importarArquivoRede.php"><i class="bi bi-upload me-2"></i>IMPORTAÇÃO DE ARQUIVOS</a></li>
        <li><a class="dropdown-item" href="formularioContasEvolucao.php"><i class="bi bi-graph-up-arrow me-2"></i>CONTAS EVOLUÇÃO
          <li><a class="dropdown-item" href="formaPagamento.php"><i class="bi bi-cash-coin me-2"></i></i>FORMA PAGAMENTO</a></li>
      </ul>
    </div>
    <?php } ?>

    <!-- OUTROS -->

    <?php if ($tipousuario == 'admsistema' || $tipousuario == 'recebimento'){ ?>
    <div class="dropdown">
      <button class="btn botaomenu btn-warning dropdown-toggle" type="button" data-bs-toggle="dropdown">
        <i class="bi bi-database-fill-gear"></i> OUTROS
      </button>
      <ul class="dropdown-menu">
      <li><a class="dropdown-item" href="crm/listaClientes.php" target="_blank"><i class="bi bi-people me-2"></i>PROFISSIONAIS MOBILE</a></li>

              <li><a class="dropdown-item" href="listarClientes.php"><i class="bi bi-person-vcard me-2"></i>PROFISSIONAIS CADASTRADOS</a></li>
              <?php if ($tipousuario == 'admsistema'){ ?>
              <li><a class="dropdown-item" href="cadastrarusuario.php"><i class="bi bi-person-plus me-2"></i>CADASTRO USUÁRIOS</a></li>
              <li><a class="dropdown-item" href="cadastrarOrcamento.php"><i class="bi bi-cash me-2"></i>LIMITE DE COMPRAS</a></li>
              <?php } ?>
              <li><a class="dropdown-item" href="downloads.php"><i class="bi bi-download me-2"></i>ARQUIVOS</a></li>
              <li><a class="dropdown-item" href="etiquetas.php"><i class="bi bi-tag me-2"></i>ETIQUETAS</a></li>
              <li><a class="dropdown-item" href="precoEntrada.php"><i class="bi bi-currency-dollar me-2"></i>PREÇO ENTRADA</a></li>

              <li><a class="dropdown-item" href="comprasanalise_estoque.php"><i class="bi bi-graph-up me-2"></i>ANÁLISE DE ESTOQUE</a></li>
              <li><a class="dropdown-item" href="desativarautomatica.php"><i class="bi bi-toggle-off me-2"></i>DESATIVAR PRODUTOS</a></li>

              <li><a class="dropdown-item" href="notasnaosalvas.php"><i class="bi bi-exclamation-circle me-2"></i>NOTAS SEM SALVAR</a></li>
              <li><a class="dropdown-item" href="buscardadosnfe.php"><i class="bi bi-search me-2"></i>DADOS NFE DEVOLUÇÃO</a></li>
              <li><a class="dropdown-item" href="xml.php" target="_blank"><i class="bi bi-file-earmark-code me-2"></i>NFE</a></li>
              <li><a class="dropdown-item" href="produtosPrecosAnalise.php"><i class="bi bi-tags me-2"></i>ANÁLISE DE PREÇOS DE ENTRADA</a></li>
              <li><a class="dropdown-item" href="impressaoPrecoLoja.php"><i class="bi bi-printer me-2"></i>PREÇO</a></li>
              <li><a class="dropdown-item" href="avaria.php"><i class="bi bi-exclamation-diamond me-2"></i>GESTOR DE AVARIAS</a></li>
              <li><a class="dropdown-item" href="importarBalanco.php"><i class="bi bi-exclamation-diamond me-2"></i>IMPORTAR BALANÇO</a></li>
             

      </ul>
    </div>
    <?php } ?>

  </div>
</section>
