<!-- Navbar -->
<nav class="main-header navbar navbar-expand-md navbar-light navbar-white">
    <div class="container">
        <a href="<?php echo base_url('beranda') ?>" class="navbar-brand">
            <img src="<?php echo base_url('assets/images/cart.png') ?>" alt="Tut Wuri Handayani" class="brand-image img-circle elevation-3" style="opacity: .8">
            <span class="brand-text font-weight-light">Bipos</span>
        </a>
        <button class="navbar-toggler order-1" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse order-3" id="navbarCollapse">
            <!-- Left navbar links -->
            <ul class="navbar-nav">
                <li class="nav-item"><a href="<?php echo base_url('beranda') ?>" class="nav-link">Home</a></li>
                <li class="nav-item dropdown <?php if ($this->uri->segment(1)=='master') echo 'show' ?>">
                    <a href="#" id="master" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" class="nav-link dropdown-toggle">Master</a>
                    <ul aria-labelledby="master" class="dropdown-menu border-0 shadow" style="left: 0px; right: inherit;">
                        <li><a href="<?php echo base_url('master/kategori') ?>" class="dropdown-item">Kategori Barang</a></li>
                        <li><a href="<?php echo base_url('master/barang') ?>" class="dropdown-item">Barang</a></li>
                        <li><a href="<?php echo base_url('master/label') ?>" class="dropdown-item">Label Barang</a></li>
                        <li><a href="<?php echo base_url('master/rak') ?>" class="dropdown-item">Rak Barang</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('master/suplier') ?>" class="dropdown-item">Suplier</a></li>
                        <li><a href="<?php echo base_url('master/toko') ?>" class="dropdown-item">Cabang Toko</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('master/nontunai') ?>" class="dropdown-item">Non Tunai</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('master/member') ?>" class="dropdown-item">Member</a></li>
                        <li><a href="<?php echo base_url('master/pegawai') ?>" class="dropdown-item">Pegawai</a></li>
                    </ul>
                </li>
                <?php
                if ($this->session->userdata('setoran')==0) {
                    ?>
                <li class="nav-item dropdown <?php if ($this->uri->segment(1)=='transaksi') echo 'show' ?>">
                    <a href="#" id="transaksi" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" class="nav-link dropdown-toggle">Transaksi</a>
                    <ul aria-labelledby="transaksi" class="dropdown-menu border-0 shadow" style="left: 0px; right: inherit;">
                        <li><a href="<?php echo base_url('transaksi/penjualan') ?>" class="dropdown-item">Penjualan</a></li>
                        <li><a href="<?php echo base_url('transaksi/returjual') ?>" class="dropdown-item">Retur Penjualan</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('transaksi/permintaan') ?>" class="dropdown-item">Permintaan Barang</a></li>
                        <li><a href="<?php echo base_url('transaksi/masuk') ?>" class="dropdown-item">Barang Masuk</a></li>
                        <li><a href="<?php echo base_url('transaksi/pembelian') ?>" class="dropdown-item">Pembelian</a></li>
                        <li><a href="<?php echo base_url('transaksi/returbeli') ?>" class="dropdown-item">Retur Pembelian</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('transaksi/mutasikeluar') ?>" class="dropdown-item">Mutasi Barang Keluar</a></li>
                        <li><a href="<?php echo base_url('transaksi/mutasimasuk') ?>" class="dropdown-item">Mutasi Barang Masuk</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('transaksi/bayarpiutang') ?>" class="dropdown-item">Pembayaran Piutang</a></li>
                        <li><a href="<?php echo base_url('transaksi/bayarhutang') ?>" class="dropdown-item">Pembayaran Hutang</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('transaksi/setoran') ?>" class="dropdown-item">Setoran Kasir</a></li>
                    </ul>
                </li>
                    <?php
                }
                ?>
                <li class="nav-item dropdown <?php if ($this->uri->segment(1)=='stok') echo 'show' ?>">
                    <a href="#" id="stok" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" class="nav-link dropdown-toggle">Manajemen Stok</a>
                    <ul aria-labelledby="stok" class="dropdown-menu border-0 shadow" style="left: 0px; right: inherit;">
                        <li><a href="<?php echo base_url('stok/opname') ?>" class="dropdown-item">Stok Opname</a></li>
                        <li><a href="<?php echo base_url('stok/kartu') ?>" class="dropdown-item">Kartu Stok</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('stok/laporanopname') ?>" class="dropdown-item">Laporan Stok Opname</a></li>
                        <li><a href="<?php echo base_url('stok/laporantransaksiopname') ?>" class="dropdown-item">Laporan Stok Opname Per Transaksi</a></li>
                    </ul>
                </li>
                <li class="nav-item dropdown <?php if ($this->uri->segment(1)=='laporan') echo 'show' ?>">
                    <a href="#" id="laporan" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" class="nav-link dropdown-toggle">Laporan</a>
                    <ul aria-labelledby="laporan" class="dropdown-menu border-0 shadow" style="left: 0px; right: inherit;">
                        <li><a href="<?php echo base_url('laporan/masuk') ?>" class="dropdown-item">Barang Masuk</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('laporan/jual') ?>" class="dropdown-item">Penjualan</a></li>
                        <li><a href="<?php echo base_url('laporan/jualstruk') ?>" class="dropdown-item">Penjualan Per Struk</a></li>
                        <li><a href="<?php echo base_url('laporan/rekapjual') ?>" class="dropdown-item">Rekap Penjualan</a></li>
                        <li><a href="<?php echo base_url('laporan/rekapjualbarang') ?>" class="dropdown-item">Rekap Penjualan Barang</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('laporan/returjual') ?>" class="dropdown-item">Retur Penjualan</a></li>
                        <!--<li><a href="<?php echo base_url('laporan/rekapreturjual') ?>" class="dropdown-item">Rekap Retur Penjualan</a></li>-->
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('laporan/piutang') ?>" class="dropdown-item">Piutang</a></li>
                        <li><a href="<?php echo base_url('laporan/hutang') ?>" class="dropdown-item">Hutang</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('laporan/bayarpiutang') ?>" class="dropdown-item">Pembayaran Piutang</a></li>
                        <li><a href="<?php echo base_url('laporan/bayarhutang') ?>" class="dropdown-item">Pembayaran Hutang</a></li>
                        <li><a href="<?php echo base_url('laporan/nontunai') ?>" class="dropdown-item">Pendapatan Non Tunai</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('laporan/koinmember') ?>" class="dropdown-item">Koin Member</a></li>
                        <li><a href="<?php echo base_url('laporan/poinmember') ?>" class="dropdown-item">Poin Member</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('laporan/rekapmember') ?>" class="dropdown-item">Rekap Belanja Member</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('laporan/rekapnontunai') ?>" class="dropdown-item">Rekap Pembayaran Non Tunai</a></li>
                    </ul>
                </li>
                <li class="nav-item dropdown <?php if ($this->uri->segment(1)=='pengaturan') echo 'show' ?>">
                    <a href="#" id="pengaturan" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" class="nav-link dropdown-toggle">Pengaturan</a>
                    <ul aria-labelledby="pengaturan" class="dropdown-menu border-0 shadow" style="left: 0px; right: inherit;">
                        <li><a href="<?php echo base_url('pengaturan/umum') ?>" class="dropdown-item">Umum</a></li>
                    </ul>
                </li>
            </ul>
            <!-- Right navbar links -->
            <ul class="navbar-nav ml-auto">
                <li class="nav-item dropdown">
                    <a class="nav-link" data-toggle="dropdown" href="#">
                        <i class="far fa-user"></i> <?php echo $this->session->userdata('pegawai') ?> <i class="right fas fa-angle-down"></i>
                    </a>
                    <ul class="dropdown-menu border-0 shadow" style="left: 0px; right: inherit;">
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('pengaturan/profil') ?>" class="dropdown-item"><i class="fas fa-user"></i> Profil</a></li>
                        <li><a href="<?php echo base_url('pengaturan/password') ?>" class="dropdown-item"><i class="fas fa-lock"></i> Ganti Kata Sandi</a></li>
                        <li class="dropdown-divider"></li>
                        <li><a href="<?php echo base_url('login/out') ?>" class="dropdown-item"><i class="fas fa-power-off"></i> Keluar</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>
<!-- /.navbar -->