<?php if(Auth::check()): ?>
<aside class="main-sidebar">
	<section class="sidebar">
	
  <!-- sidebar menu: : style can be found in sidebar.less -->
  <ul class="sidebar-menu" data-widget="tree">
      <li class="header">MAIN NAVIGATION</li>
      
        <li class=""><a href="<?php echo e(url('/')); ?>"><i class="fa fa-dashboard"></i> <span><?php echo e(trans('menu.dashboard')); ?></span></a></li>

      <?php if(auth()->user()->checkSpPermission('customers.index')): ?>
        <li class="<?php echo e((Request::is('customers')) ? 'active' : ''); ?> "><a href="<?php echo e(url('/customers')); ?>"><i class="fa fa-users"></i> <span><?php echo e(trans('menu.customers')); ?></span></a></li>
      <?php endif; ?>

      <?php if(auth()->user()->checkSpPermission('items.index')): ?>
    <li class="<?php echo e((Request::is('items')) ? 'active' : ''); ?> "><a href="<?php echo e(url('/items')); ?>"><i class="fa fa-bars"></i> <span>Stocks</span></a></li>
      <?php endif; ?>
<!-- <li><a href="<?php echo e(url('/item-kits')); ?>"><?php echo e(trans('menu.item_kits')); ?></a></li> -->
      <?php if(auth()->user()->checkSpPermission('suppliers.index')): ?>
        <li class="<?php echo e((Request::is('suppliers')) ? 'active' : ''); ?> "><a href="<?php echo e(url('/suppliers')); ?>"><i class="fa fa-cubes"></i> <span><?php echo e(trans('menu.suppliers')); ?></span></a></li>
      <?php endif; ?>

      <?php if(auth()->user()->checkSpPermission('receivings.index') || auth()->user()->checkSpPermission('receivings.create')): ?>
      <li class="<?php echo e((Request::is('receivings') || Request::is('receivings/create')) ? 'active' : ''); ?> treeview">
          <a href="#"><i class="fa fa-sitemap"></i> <span><?php echo e(__('Purchases')); ?></span><span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a>
          <ul class="treeview-menu">
              <?php if(auth()->user()->checkSpPermission('receivings.index')): ?>
              <li class="<?php echo e((Request::is('receivings')) ? 'active' : ''); ?> ">
                  <a href="<?php echo e(url('/receivings')); ?>"><i class="fa fa-circle-o"></i> <span><?php echo e(__('Purchase List')); ?></span></a>
              </li>
              <?php endif; ?>
              <?php if(auth()->user()->checkSpPermission('receivings.create')): ?>
                <li class="<?php echo e((Request::is('receivings/create')) ? 'active' : ''); ?> "><a href="<?php echo e(url('/receivings/create')); ?>"><i class="fa fa-circle-o"></i> <span><?php echo e(__('Create Purchase')); ?></span></a></li>
              <?php endif; ?>
          </ul>
      </li>
      <?php endif; ?>

      <?php if(auth()->user()->checkSpPermission('sales.index') || auth()->user()->checkSpPermission('sales.create')): ?>
      <li class="<?php echo e((Request::is('sales') || Request::is('sales/create')) ? 'active' : ''); ?> treeview">
          <a href="#"><i class="fa fa-shopping-cart"></i> <span><?php echo e(__('Sales')); ?></span><span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a>
          <ul class="treeview-menu">
              <?php if(auth()->user()->checkSpPermission('sales.index')): ?>
              <li class="<?php echo e((Request::is('sales')) ? 'active' : ''); ?> ">
                  <a href="<?php echo e(url('/sales')); ?>"><i class="fa fa-circle-o"></i> <span><?php echo e(__('Sales List')); ?></span></a>
              </li>
              <?php endif; ?>
              <?php if(auth()->user()->checkSpPermission('sales.create')): ?>
              <li class="<?php echo e((Request::is('sales/create')) ? 'active' : ''); ?>">
                  <a href="<?php echo e(url('sales/create')); ?>"><i class="fa fa-circle-o"></i> <?php echo e(__('Add Invoice')); ?></a>
              </li>
              <?php endif; ?>
          </ul>
      </li>
      <?php endif; ?>


      <?php if(auth()->user()->checkSpPermission('accounts.index') || auth()->user()->checkSpPermission('transactions.index')): ?>
      <li class="<?php echo e((Request::is('accounts') || Request::is('transactions')) ? 'active' : ''); ?> treeview">
          <a href="#"><i class="fa fa-university"></i> <span><?php echo e(trans('menu.accounts')); ?></span><span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a>
          <ul class="treeview-menu">
              <?php if(auth()->user()->checkSpPermission('accounts.index')): ?>
              <li class="<?php echo e((Request::is('accounts')) ? 'active' : ''); ?> ">
                  <a href="<?php echo e(url('/accounts')); ?>"><i class="fa fa-circle-o"></i> <span><?php echo e(trans('menu.accounts')); ?></span></a>
              </li>
              <?php endif; ?>
              <?php if(auth()->user()->checkSpPermission('transactions.index')): ?>
              <li class="<?php echo e((Request::is('transactions')) ? 'active' : ''); ?>">
                  <a href="<?php echo e(url('transactions')); ?>"><i class="fa fa-circle-o"></i> Transactions</a>
              </li>
              <?php endif; ?>
          </ul>
      </li>
      <?php endif; ?>

    <?php if(auth()->user()->checkSpPermission('expense.index') || auth()->user()->checkSpPermission('expensecategory.index')): ?>
    <li class="<?php echo e((Request::is('expense') || Request::is('expensecategory')) ? 'active' : ''); ?> treeview">
      <a href="#">
        <i class="fa fa-dollar"></i> <span><?php echo e(trans('menu.expense')); ?></span>
        <span class="pull-right-container">
          <i class="fa fa-angle-left pull-right"></i>
        </span>
      </a>
      <ul class="treeview-menu">
        <?php if(auth()->user()->checkSpPermission('expense.index')): ?>
        <li class="<?php echo e((Request::is('expense')) ? 'active' : ''); ?>"><a href="<?php echo e(url('/expense')); ?>"><i class="fa fa-circle-o"></i> <span><?php echo e(trans('menu.expense')); ?></span></a></li>
        <?php endif; ?>
        <?php if(auth()->user()->checkSpPermission('expensecategory.index')): ?>
        <li class="<?php echo e((Request::is('expensecategory')) ? 'active' : ''); ?>"><a href="<?php echo e(url('expensecategory')); ?>"><i class="fa fa-circle-o"></i> Expense Category</a></li>
        <?php endif; ?>
      </ul>
    </li>
    <?php endif; ?>

    <?php if(auth()->user()->checkSpPermission('dailyreport.index') || auth()->user()->checkSpPermission('dailyreport.create') || auth()->user()->checkSpPermission('report.sale') || auth()->user()->checkSpPermission('report.receving') || auth()->user()->checkSpPermission('report.stock')): ?>
    <li class="<?php echo e((Request::is('reports/receivings') || Request::is('reports/sales') || Request::is('reports/dailyreport/create')) ? 'active' : ''); ?> treeview">
      <a href="#">
        <i class="fa fa-money"></i> <span><?php echo e(trans('menu.reports')); ?></span>
        <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
      </a>
      <ul class="treeview-menu">
        <?php if(auth()->user()->checkSpPermission('report.receiving')): ?>
        <li class="<?php echo e((Request::is('reports/receivings')) ? 'active' : ''); ?>"><a href="<?php echo e(url('/reports/receivings')); ?>"><i class="fa fa-circle-o"></i> <?php echo e(__('Expense Report')); ?></a></li>
        <?php endif; ?>
        <?php if(auth()->user()->checkSpPermission('report.sale')): ?>
        <li class="<?php echo e((Request::is('reports/sales')) ? 'active' : ''); ?>"><a href="<?php echo e(url('/reports/sales')); ?>"><i class="fa fa-circle-o"></i> <?php echo e(__('Income Report')); ?></a></li>
        <?php endif; ?>
        <?php if(auth()->user()->checkSpPermission('report.stock')): ?>
        <li class="<?php echo e((Request::is('reports/stocks')) ? 'active' : ''); ?>"><a href="<?php echo e(route('report.stock')); ?>"><i class="fa fa-circle-o"></i> <?php echo e(__('Stock Report')); ?></a></li>
        <?php endif; ?>
        <?php if(auth()->user()->checkSpPermission('dailyreport.create')): ?>
        <li class="<?php echo e((Request::is('reports/dailyreport/create')) ? 'active' : ''); ?>"><a href="<?php echo e(url('/reports/dailyreport/create')); ?>"><i class="fa fa-circle-o"></i> <?php echo e(trans('menu.daily_report')); ?></a></li>
        <?php endif; ?>
        <?php if(auth()->user()->checkSpPermission('dailyreport.index')): ?>
        <li class="<?php echo e((Request::is('reports/dailyreport')) ? 'active' : ''); ?>"><a href="<?php echo e(route('dailyreport.index')); ?>"><i class="fa fa-circle-o" aria-hidden="true"></i> <?php echo e(__('Report Summary')); ?></a></li>
        <?php endif; ?>
      </ul>
    </li>
    <?php endif; ?>

      <?php if(auth()->user()->checkSpPermission('employees.index')): ?>
        <li class="<?php echo e((Request::is('employees')) ? 'active' : ''); ?>"><a href="<?php echo e(url('/employees')); ?>"><i class="fa fa-user"></i> <span><?php echo e(trans('menu.employees')); ?></span></a></li>
      <?php endif; ?>
      <?php if(Auth::user()->checkSpPermission('flexiblepossetting.create')): ?>
        <li class="<?php echo e((Request::is('flexiblepossetting/create')) ? 'active' : ''); ?>"><a href="<?php echo e(route('flexiblepossetting.create')); ?>"><i class="fa fa-gear"></i> <span><?php echo e(__('Settings')); ?></span></a></li>
      <?php endif; ?>
    </ul>
    <?php if(config('fpos.demo')): ?>
    <div class="mt-5">
      <a href="https://codecanyon.net/item/flexiblepos-with-inventory-management-system/23633865"><img src="<?php echo e(asset('images/side_banner.jpg')); ?>" class="img-responsive" alt=""></a>
    </div>
    <?php endif; ?>
</section>
</aside>
<?php endif; ?><?php /**PATH /Users/ajitdas/prjs-mega/flexibleps-5.6/resources/views/partials/sidebar.blade.php ENDPATH**/ ?>