<?php
use App\Models\Settings;
use App\Models\CustomerDetails;
use App\Models\Products;
use Illuminate\Support\Facades\DB;
$setting = Settings::first();
?>

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">

    <title>ERP | Dashboard</title>

    <meta name="description" content="ERP | Dashboard">
    <meta name="author" content="pixelcave">
    <meta name="robots" content="index, follow">

    <!-- Open Graph Meta -->
    <meta property="og:title" content="ERP | Dashboard">
    <meta property="og:site_name" content="ERP | Dashboard">
    <meta property="og:description" content="ERP | Dashboard">
    <meta property="og:type" content="website">
    <meta property="og:url" content="">
    <meta property="og:image" content="">

    <!-- Icons -->
    <!-- The following icons can be replaced with your own, they are used by desktop and mobile browsers -->
    <link rel="shortcut icon" href="<?php echo e(asset('assets/media/favicons/favicon.png')); ?>">
    <link rel="icon" type="image/png" sizes="192x192" href="<?php echo e(asset('assets/media/favicons/favicon-192x192.png')); ?>">
    <link rel="apple-touch-icon" sizes="180x180" href="<?php echo e(asset('assets/media/favicons/apple-touch-icon-180x180.png')); ?>">
    <!-- END Icons -->

    <!-- Stylesheets -->
    <link rel="stylesheet" href="<?php echo e(asset('assets/js/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/js/plugins/select2/css/select2.min.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/js/plugins/ion-rangeslider/css/ion.rangeSlider.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/js/plugins/dropzone/min/dropzone.min.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/js/plugins/flatpickr/flatpickr.min.css')); ?>">
    <!-- <link rel="stylesheet" href="<?php echo e(asset('assets/js/plugins/datatables-bs5/css/dataTables.bootstrap5.min.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/js/plugins/datatables-buttons-bs5/css/buttons.bootstrap5.min.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/js/plugins/datatables-responsive-bs5/css/responsive.bootstrap5.min.css')); ?>"> -->
    <link rel="stylesheet" href="https://cdn.datatables.net/2.2.2/css/dataTables.dataTables.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/responsive/3.0.4/css/responsive.dataTables.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/buttons/3.2.2/css/buttons.dataTables.css">
    <link rel="stylesheet" href="<?php echo e(asset('assets/js/plugins/flatpickr/flatpickr.min.css')); ?>">
    <!-- Dashmix framework -->
    <link rel="stylesheet" id="css-main" href="<?php echo e(asset('assets/css/dashmix.min.css')); ?>">
    <style>
    .block-content {
    padding: 1.25rem 1.25rem;
}
div.dt-buttons > .dt-button, div.dt-buttons > div.dt-button-split .dt-button {
  background:#0665d0;
  color: #fff;
  border-color: #0665d0;
  border-radius:5px;
}
div.dt-buttons > .dt-button:hover:not(.disabled), div.dt-buttons > div.dt-button-split .dt-button:hover:not(.disabled) {
  background:#0551a6;
  color: #fff;
  border-color: #0551a6;

}
div.dt-container .dt-paging .dt-paging-button.current, div.dt-container .dt-paging .dt-paging-button.current:hover {
  background:#0665d0;
  color: #fff !important;
  border-color: #0665d0;

}
    </style>
  </head>


  <body>

    <div id="page-container" class="sidebar-o sidebar-dark enable-page-overlay side-scroll page-header-fixed main-content-narrow">
      <!-- Side Overlay-->
      <aside id="side-overlay">
        <!-- Side Header -->
        <div class="bg-image" style="background-image: url('<?php echo e(asset('assets/media/various/bg_side_overlay_header.jpg')); ?>');">
          <div class="bg-primary-op">
            <div class="content-header">
              <!-- User Avatar -->
              <a class="img-link me-1" href="be_pages_generic_profile.html">
                <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar10.jpg')); ?>" alt="">
              </a>
              <!-- END User Avatar -->

              <!-- User Info -->
              <div class="ms-2">
                <a class="text-white fw-semibold" href="be_pages_generic_profile.html">George Taylor</a>
                <div class="text-white-75 fs-sm">Full Stack Developer</div>
              </div>
              <!-- END User Info -->

              <!-- Close Side Overlay -->
              <!-- Layout API, functionality initialized in Template._uiApiLayout() -->
              <a class="ms-auto text-white" href="javascript:void(0)" data-toggle="layout" data-action="side_overlay_close">
                <i class="fa fa-times-circle"></i>
              </a>
              <!-- END Close Side Overlay -->
            </div>
          </div>
        </div>
        <!-- END Side Header -->

        <!-- Side Content -->
        <div class="content-side">
          <!-- Side Overlay Tabs -->
          <div class="block block-transparent pull-x pull-t mb-0">
            <ul class="nav nav-tabs nav-tabs-block nav-justified" role="tablist">
              <li class="nav-item" role="presentation">
                <button class="nav-link active" id="so-settings-tab" data-bs-toggle="tab" data-bs-target="#so-settings" role="tab" aria-controls="so-settings" aria-selected="true">
                  <i class="fa fa-fw fa-cog"></i>
                </button>
              </li>
              <li class="nav-item" role="presentation">
                <button class="nav-link" id="so-people-tab" data-bs-toggle="tab" data-bs-target="#so-people" role="tab" aria-controls="so-people" aria-selected="false">
                  <i class="far fa-fw fa-user-circle"></i>
                </button>
              </li>
              <li class="nav-item" role="presentation">
                <button class="nav-link" id="so-profile-tab" data-bs-toggle="tab" data-bs-target="#so-profile" role="tab" aria-controls="so-profile" aria-selected="false">
                  <i class="far fa-fw fa-edit"></i>
                </button>
              </li>
            </ul>
            <div class="block-content tab-content overflow-hidden">
              <!-- Settings Tab -->
              <div class="tab-pane pull-x fade fade-up show active" id="so-settings" role="tabpanel" aria-labelledby="so-settings-tab" tabindex="0">
                <div class="block mb-0">
                  <!-- Color Themes -->
                  <!-- Toggle Themes functionality initialized in Template._uiHandleTheme() -->
                  <div class="block-content block-content-sm block-content-full bg-body">
                    <span class="text-uppercase fs-sm fw-bold">Color Themes</span>
                  </div>
                  <div class="block-content block-content-full">
                    <div class="row g-sm text-center">
                      <div class="col-4 mb-1">
                        <a class="d-block py-3 text-white fs-sm fw-semibold bg-default" data-toggle="theme" data-theme="default" href="#">
                          Default
                        </a>
                      </div>
                      <div class="col-4 mb-1">
                        <a class="d-block py-3 text-white fs-sm fw-semibold bg-xwork" data-toggle="theme" data-theme="assets/css/themes/xwork.min.css" href="#">
                          xWork
                        </a>
                      </div>
                      <div class="col-4 mb-1">
                        <a class="d-block py-3 text-white fs-sm fw-semibold bg-xmodern" data-toggle="theme" data-theme="assets/css/themes/xmodern.min.css" href="#">
                          xModern
                        </a>
                      </div>
                      <div class="col-4 mb-1">
                        <a class="d-block py-3 text-white fs-sm fw-semibold bg-xeco" data-toggle="theme" data-theme="assets/css/themes/xeco.min.css" href="#">
                          xEco
                        </a>
                      </div>
                      <div class="col-4 mb-1">
                        <a class="d-block py-3 text-white fs-sm fw-semibold bg-xsmooth" data-toggle="theme" data-theme="assets/css/themes/xsmooth.min.css" href="#">
                          xSmooth
                        </a>
                      </div>
                      <div class="col-4 mb-1">
                        <a class="d-block py-3 text-white fs-sm fw-semibold bg-xinspire" data-toggle="theme" data-theme="assets/css/themes/xinspire.min.css" href="#">
                          xInspire
                        </a>
                      </div>
                      <div class="col-4 mb-1">
                        <a class="d-block py-3 text-white fs-sm fw-semibold bg-xdream" data-toggle="theme" data-theme="assets/css/themes/xdream.min.css" href="#">
                          xDream
                        </a>
                      </div>
                      <div class="col-4 mb-1">
                        <a class="d-block py-3 text-white fs-sm fw-semibold bg-xpro" data-toggle="theme" data-theme="assets/css/themes/xpro.min.css" href="#">
                          xPro
                        </a>
                      </div>
                      <div class="col-4 mb-1">
                        <a class="d-block py-3 text-white fs-sm fw-semibold bg-xplay" data-toggle="theme" data-theme="assets/css/themes/xplay.min.css" href="#">
                          xPlay
                        </a>
                      </div>
                      <div class="col-12">
                        <a class="d-block py-3 bg-body-dark fw-semibold text-dark" href="be_ui_color_themes.html">All Color Themes</a>
                      </div>
                    </div>
                  </div>
                  <!-- END Color Themes -->

                  <!-- Sidebar -->
                  <div class="block-content block-content-sm block-content-full bg-body">
                    <span class="text-uppercase fs-sm fw-bold">Sidebar</span>
                  </div>
                  <div class="block-content block-content-full">
                    <div class="row g-sm text-center">
                      <div class="col-6 mb-1">
                        <a class="d-block py-3 bg-body-dark fw-semibold text-dark" data-toggle="layout" data-action="sidebar_style_dark" href="javascript:void(0)">Dark</a>
                      </div>
                      <div class="col-6 mb-1">
                        <a class="d-block py-3 bg-body-dark fw-semibold text-dark" data-toggle="layout" data-action="sidebar_style_light" href="javascript:void(0)">Light</a>
                      </div>
                    </div>
                  </div>
                  <!-- END Sidebar -->

                  <!-- Header -->
                  <div class="block-content block-content-sm block-content-full bg-body">
                    <span class="text-uppercase fs-sm fw-bold">Header</span>
                  </div>
                  <div class="block-content block-content-full">
                    <div class="row g-sm text-center mb-2">
                      <div class="col-6 mb-1">
                        <a class="d-block py-3 bg-body-dark fw-semibold text-dark" data-toggle="layout" data-action="header_style_dark" href="javascript:void(0)">Dark</a>
                      </div>
                      <div class="col-6 mb-1">
                        <a class="d-block py-3 bg-body-dark fw-semibold text-dark" data-toggle="layout" data-action="header_style_light" href="javascript:void(0)">Light</a>
                      </div>
                      <div class="col-6 mb-1">
                        <a class="d-block py-3 bg-body-dark fw-semibold text-dark" data-toggle="layout" data-action="header_mode_fixed" href="javascript:void(0)">Fixed</a>
                      </div>
                      <div class="col-6 mb-1">
                        <a class="d-block py-3 bg-body-dark fw-semibold text-dark" data-toggle="layout" data-action="header_mode_static" href="javascript:void(0)">Static</a>
                      </div>
                    </div>
                  </div>
                  <!-- END Header -->

                  <!-- Content -->
                  <div class="block-content block-content-sm block-content-full bg-body">
                    <span class="text-uppercase fs-sm fw-bold">Content</span>
                  </div>
                  <div class="block-content block-content-full">
                    <div class="row g-sm text-center">
                      <div class="col-6 mb-1">
                        <a class="d-block py-3 bg-body-dark fw-semibold text-dark" data-toggle="layout" data-action="content_layout_boxed" href="javascript:void(0)">Boxed</a>
                      </div>
                      <div class="col-6 mb-1">
                        <a class="d-block py-3 bg-body-dark fw-semibold text-dark" data-toggle="layout" data-action="content_layout_narrow" href="javascript:void(0)">Narrow</a>
                      </div>
                      <div class="col-12 mb-1">
                        <a class="d-block py-3 bg-body-dark fw-semibold text-dark" data-toggle="layout" data-action="content_layout_full_width" href="javascript:void(0)">Full Width</a>
                      </div>
                    </div>
                  </div>
                  <!-- END Content -->

                  <!-- Layout API -->
                  <div class="block-content block-content-full border-top">
                    <a class="btn w-100 btn-alt-primary" href="be_layout_api.html">
                      <i class="fa fa-fw fa-flask me-1"></i> Layout API
                    </a>
                  </div>
                  <!-- END Layout API -->
                </div>
              </div>
              <!-- END Settings Tab -->

              <!-- People -->
              <div class="tab-pane pull-x fade fade-up" id="so-people" role="tabpanel" aria-labelledby="so-people-tab" tabindex="0">
                <div class="block mb-0">
                  <!-- Online -->
                  <div class="block-content block-content-sm block-content-full bg-body">
                    <span class="text-uppercase fs-sm fw-bold">Online</span>
                  </div>
                  <div class="block-content">
                    <ul class="nav-items">
                      <li>
                        <a class="d-flex py-2" href="be_pages_generic_profile.html">
                          <div class="flex-shrink-0 mx-3 overlay-container">
                            <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar8.jpg')); ?>" alt="">
                            <span class="overlay-item item item-tiny item-circle border border-2 border-white bg-success"></span>
                          </div>
                          <div class="flex-grow-1">
                            <div class="fw-semibold">Lisa Jenkins</div>
                            <div class="fs-sm text-muted">Photographer</div>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a class="d-flex py-2" href="be_pages_generic_profile.html">
                          <div class="flex-shrink-0 mx-3 overlay-container">
                            <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar10.jpg')); ?>" alt="">
                            <span class="overlay-item item item-tiny item-circle border border-2 border-white bg-success"></span>
                          </div>
                          <div class="flex-grow-1">
                            <div class="fw-semibold">Justin Hunt</div>
                            <div class="fw-normal fs-sm text-muted">Web Designer</div>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a class="d-flex py-2" href="be_pages_generic_profile.html">
                          <div class="flex-shrink-0 mx-3 overlay-container">
                            <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar5.jpg')); ?>" alt="">
                            <span class="overlay-item item item-tiny item-circle border border-2 border-white bg-success"></span>
                          </div>
                          <div class="flex-grow-1">
                            <div class="fw-semibold">Amanda Powell</div>
                            <div class="fw-normal fs-sm text-muted">Web Developer</div>
                          </div>
                        </a>
                      </li>
                    </ul>
                  </div>
                  <!-- Online -->

                  <!-- Busy -->
                  <div class="block-content block-content-sm block-content-full bg-body">
                    <span class="text-uppercase fs-sm fw-bold">Busy</span>
                  </div>
                  <div class="block-content">
                    <ul class="nav-items">
                      <li>
                        <a class="d-flex py-2" href="be_pages_generic_profile.html">
                          <div class="flex-shrink-0 mx-3 overlay-container">
                            <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar6.jpg')); ?>" alt="">
                            <span class="overlay-item item item-tiny item-circle border border-2 border-white bg-danger"></span>
                          </div>
                          <div class="flex-grow-1">
                            <div class="fw-semibold">Sara Fields</div>
                            <div class="fw-normal fs-sm text-muted">UI Designer</div>
                          </div>
                        </a>
                      </li>
                    </ul>
                  </div>
                  <!-- END Busy -->

                  <!-- Away -->
                  <div class="block-content block-content-sm block-content-full bg-body">
                    <span class="text-uppercase fs-sm fw-bold">Away</span>
                  </div>
                  <div class="block-content">
                    <ul class="nav-items">
                      <li>
                        <a class="d-flex py-2" href="be_pages_generic_profile.html">
                          <div class="flex-shrink-0 mx-3 overlay-container">
                            <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar16.jpg')); ?>" alt="">
                            <span class="overlay-item item item-tiny item-circle border border-2 border-white bg-warning"></span>
                          </div>
                          <div class="flex-grow-1">
                            <div class="fw-semibold">Brian Stevens</div>
                            <div class="fw-normal fs-sm text-muted">Copywriter</div>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a class="d-flex py-2" href="be_pages_generic_profile.html">
                          <div class="flex-shrink-0 mx-3 overlay-container">
                            <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar4.jpg')); ?>" alt="">
                            <span class="overlay-item item item-tiny item-circle border border-2 border-white bg-warning"></span>
                          </div>
                          <div class="flex-grow-1">
                            <div class="fw-semibold">Betty Kelley</div>
                            <div class="fw-normal fs-sm text-muted">Writer</div>
                          </div>
                        </a>
                      </li>
                    </ul>
                  </div>
                  <!-- END Away -->

                  <!-- Offline -->
                  <div class="block-content block-content-sm block-content-full bg-body">
                    <span class="text-uppercase fs-sm fw-bold">Offline</span>
                  </div>
                  <div class="block-content">
                    <ul class="nav-items">
                      <li>
                        <a class="d-flex py-2" href="be_pages_generic_profile.html">
                          <div class="flex-shrink-0 mx-3 overlay-container">
                            <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar12.jpg')); ?>" alt="">
                            <span class="overlay-item item item-tiny item-circle border border-2 border-white bg-muted"></span>
                          </div>
                          <div class="flex-grow-1">
                            <div class="fw-semibold">Brian Cruz</div>
                            <div class="fw-normal fs-sm text-muted">Teacher</div>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a class="d-flex py-2" href="be_pages_generic_profile.html">
                          <div class="flex-shrink-0 mx-3 overlay-container">
                            <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar5.jpg')); ?>" alt="">
                            <span class="overlay-item item item-tiny item-circle border border-2 border-white bg-muted"></span>
                          </div>
                          <div class="flex-grow-1">
                            <div class="fw-semibold">Danielle Jones</div>
                            <div class="fw-normal fs-sm text-muted">Photographer</div>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a class="d-flex py-2" href="be_pages_generic_profile.html">
                          <div class="flex-shrink-0 mx-3 overlay-container">
                            <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar6.jpg')); ?>" alt="">
                            <span class="overlay-item item item-tiny item-circle border border-2 border-white bg-muted"></span>
                          </div>
                          <div class="flex-grow-1">
                            <div class="fw-semibold">Alice Moore</div>
                            <div class="fw-normal fs-sm text-muted">Front-end Developer</div>
                          </div>
                        </a>
                      </li>
                      <li>
                        <a class="d-flex py-2" href="be_pages_generic_profile.html">
                          <div class="flex-shrink-0 mx-3 overlay-container">
                            <img class="img-avatar img-avatar48" src="<?php echo e(asset('assets/media/avatars/avatar16.jpg')); ?>" alt="">
                            <span class="overlay-item item item-tiny item-circle border border-2 border-white bg-muted"></span>
                          </div>
                          <div class="flex-grow-1">
                            <div class="fw-semibold">Jack Greene</div>
                            <div class="fw-normal fs-sm text-muted">UX Specialist</div>
                          </div>
                        </a>
                      </li>
                    </ul>
                  </div>
                  <!-- END Offline -->

                  <!-- Add People -->
                  <div class="block-content block-content-full border-top">
                    <a class="btn w-100 btn-alt-primary" href="javascript:void(0)">
                      <i class="fa fa-fw fa-plus me-1 opacity-50"></i> Add People
                    </a>
                  </div>
                  <!-- END Add People -->
                </div>
              </div>
              <!-- END People -->

              <!-- Profile -->
              <div class="tab-pane pull-x fade fade-up" id="so-profile" role="tabpanel" aria-labelledby="so-profile-tab" tabindex="0">
                <form action="be_pages_dashboard.html" method="POST" onsubmit="return false;">
                  <div class="block mb-0">
                    <!-- Personal -->
                    <div class="block-content block-content-sm block-content-full bg-body">
                      <span class="text-uppercase fs-sm fw-bold">Personal</span>
                    </div>
                    <div class="block-content block-content-full">
                      <div class="mb-4">
                        <label class="form-label">Username</label>
                        <input type="text" readonly class="form-control" id="so-profile-username-static" value="Admin">
                      </div>
                      <div class="mb-4">
                        <label class="form-label" for="so-profile-name">Name</label>
                        <input type="text" class="form-control" id="so-profile-name" name="so-profile-name" value="George Taylor">
                      </div>
                      <div class="mb-4">
                        <label class="form-label" for="so-profile-email">Email</label>
                        <input type="email" class="form-control" id="so-profile-email" name="so-profile-email" value="g.taylor@example.com">
                      </div>
                    </div>
                    <!-- END Personal -->

                    <!-- Password Update -->
                    <div class="block-content block-content-sm block-content-full bg-body">
                      <span class="text-uppercase fs-sm fw-bold">Password Update</span>
                    </div>
                    <div class="block-content block-content-full">
                      <div class="mb-4">
                        <label class="form-label" for="so-profile-password">Current Password</label>
                        <input type="password" class="form-control" id="so-profile-password" name="so-profile-password">
                      </div>
                      <div class="mb-4">
                        <label class="form-label" for="so-profile-new-password">New Password</label>
                        <input type="password" class="form-control" id="so-profile-new-password" name="so-profile-new-password">
                      </div>
                      <div class="mb-4">
                        <label class="form-label" for="so-profile-new-password-confirm">Confirm New Password</label>
                        <input type="password" class="form-control" id="so-profile-new-password-confirm" name="so-profile-new-password-confirm">
                      </div>
                    </div>
                    <!-- END Password Update -->

                    <!-- Options -->
                    <div class="block-content block-content-sm block-content-full bg-body">
                      <span class="text-uppercase fs-sm fw-bold">Options</span>
                    </div>
                    <div class="block-content">
                      <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="" id="so-settings-status" name="so-settings-status">
                        <label class="form-check-label fw-semibold" for="so-settings-status">Online Status</label>
                      </div>
                      <p class="text-muted fs-sm">
                        Make your online status visible to other users of your app
                      </p>
                      <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="" id="so-settings-notifications" name="so-settings-notifications">
                        <label class="form-check-label fw-semibold" for="so-settings-notifications">Notifications</label>
                      </div>
                      <p class="text-muted fs-sm">
                        Receive desktop notifications regarding your projects and sales
                      </p>
                      <div class="form-check">
                        <input class="form-check-input" type="checkbox" value="" id="so-settings-updates" name="so-settings-updates">
                        <label class="form-check-label fw-semibold" for="so-settings-updates">Auto Updates</label>
                      </div>
                      <p class="text-muted fs-sm">
                        If enabled, we will keep all your applications and servers up to date with the most recent features automatically
                      </p>
                    </div>
                    <!-- END Options -->

                    <!-- Submit -->
                    <div class="block-content block-content-full border-top">
                      <button type="submit" class="btn w-100 btn-alt-primary">
                        <i class="fa fa-fw fa-save me-1 opacity-50"></i> Save
                      </button>
                    </div>
                    <!-- END Submit -->
                  </div>
                </form>
              </div>
              <!-- END Profile -->
            </div>
          </div>
          <!-- END Side Overlay Tabs -->
        </div>
        <!-- END Side Content -->
      </aside>
      <!-- END Side Overlay -->

      <!-- Sidebar -->
      <!--
        Sidebar Mini Mode - Display Helper classes

        Adding 'smini-hide' class to an element will make it invisible (opacity: 0) when the sidebar is in mini mode
        Adding 'smini-show' class to an element will make it visible (opacity: 1) when the sidebar is in mini mode
          If you would like to disable the transition animation, make sure to also add the 'no-transition' class to your element

        Adding 'smini-hidden' to an element will hide it when the sidebar is in mini mode
        Adding 'smini-visible' to an element will show it (display: inline-block) only when the sidebar is in mini mode
        Adding 'smini-visible-block' to an element will show it (display: block) only when the sidebar is in mini mode
      -->
      <nav id="sidebar" aria-label="Main Navigation">
        <!-- Side Header -->
        <div class="bg-header-dark">
          <div class="content-header bg-white-5">
            <!-- Logo -->
            <?php if($setting && $setting->logo != null){ ?> 
              <a class="fw-semibold text-white tracking-wide" href="<?php echo e(url('admin/dashboard')); ?>">
              <img style="width:125px;height:50px;"   src="<?php echo e(asset('db_files/other/'.$setting->logo.'')); ?>" alt="">
            </a>
            <?php } ?>
            <!-- END Logo -->

            <!-- Options -->
            <div>
              <!-- Toggle Sidebar Style -->
              <!-- Layout API, functionality initialized in Template._uiApiLayout() -->
              <!-- Class Toggle, functionality initialized in Helpers.dmToggleClass() -->
              <!-- <button type="button" class="btn btn-sm btn-alt-secondary" data-toggle="class-toggle" data-target="#sidebar-style-toggler" data-class="fa-toggle-off fa-toggle-on" onclick="Dashmix.layout('sidebar_style_toggle');Dashmix.layout('header_style_toggle');">
                <i class="fa fa-toggle-off" id="sidebar-style-toggler"></i>
              </button> -->
              <!-- END Toggle Sidebar Style -->

              <!-- Dark Mode -->
              <!-- Layout API, functionality initialized in Template._uiApiLayout() -->
              <button type="button" class="btn btn-sm btn-alt-secondary" data-toggle="class-toggle" data-target="#dark-mode-toggler" data-class="far fa" onclick="Dashmix.layout('dark_mode_toggle');">
                <i class="far fa-moon" id="dark-mode-toggler"></i>
              </button>
              <!-- END Dark Mode -->

              <!-- Close Sidebar, Visible only on mobile screens -->
              <!-- Layout API, functionality initialized in Template._uiApiLayout() -->
              <button type="button" class="btn btn-sm btn-alt-secondary d-lg-none" data-toggle="layout" data-action="sidebar_close">
                <i class="fa fa-times-circle"></i>
              </button>
              <!-- END Close Sidebar -->
            </div>
            <!-- END Options -->
          </div>
        </div>
        <!-- END Side Header -->

        <!-- Sidebar Scrolling -->
        <div class="js-sidebar-scroll">
          <!-- Side Navigation -->
          <div class="content-side">
            <ul class="nav-main">
              <li class="nav-main-item">
                <a class="nav-main-link <?php echo e(request()->is('admin/dashboard') ? 'active' : ''); ?>" href="<?php echo e(url('admin/dashboard')); ?>">
                  <i class="nav-main-link-icon fa fa-location-arrow"></i>
                  <span class="nav-main-link-name">Dashboard</span>
                  <!-- <span class="nav-main-link-badge badge rounded-pill bg-primary">8</span> -->
                </a>
              </li>
              <?php
                use App\Models\OrderRequests;
                use Carbon\Carbon;
                // $today_order_requests = OrderRequests::whereDate('created_at', Carbon::today())->count();
                $today_order_requests = OrderRequests::count();
                ?>

                <li class="nav-main-heading">Sales</li>
                <?php  if(Auth::user()->user_role == 1  || Auth::user()->user_role == 3){ ?>
              <li class="nav-main-item <?php echo e(in_array(request()->path(), ['admin/add-order', 'admin/all-orders', 'admin/order-requests']) ? 'open ' : ''); ?>">
                <a class="nav-main-link nav-main-link-submenu" data-toggle="submenu" aria-haspopup="true" aria-expanded="false" href="#">
                  <i class="nav-main-link-icon fa fa-boxes-packing"></i>
                  <span class="nav-main-link-name">Billing</span>
                  <?php if($today_order_requests > 0){ ?>
                    <span class="nav-main-link-badge badge rounded-pill bg-primary"><?php echo e($today_order_requests); ?></span>
                  <?php } ?>
                  
                </a>
                <ul class="nav-main-submenu">
                  <li class="nav-main-item">
                    <a class="nav-main-link <?php echo e(request()->is('admin/add-order') ? 'active' : ''); ?>" href="<?php echo e(url('admin/add-order')); ?>">
                      <span class="nav-main-link-name">Cashier</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link <?php echo e(request()->is('admin/all-orders') ? 'active' : ''); ?>" href="<?php echo e(url('admin/all-orders')); ?>">
                      <span class="nav-main-link-name"> Search Invoice</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link <?php echo e(request()->is('admin/order-requests') ? 'active' : ''); ?>" href="<?php echo e(url('admin/order-requests')); ?>">
                      <span class="nav-main-link-name">Order Requests</span>
                       <?php if($today_order_requests > 0){ ?>
                        <span class="nav-main-link-badge badge rounded-pill bg-primary"><?php echo e($today_order_requests); ?></span>
                       <?php } ?>
                    </a>
                  </li>
                </ul>
                </li>
                <?php } ?>

                <?php  if(Auth::user()->user_role == 1 || Auth::user()->user_role == 3){ ?>

<li class="nav-main-heading">GRN</li>
<li class="nav-main-item <?php echo e(in_array(request()->path(), ['admin/add-grn', 'admin/grns']) ? 'open ' : ''); ?>">
<a class="nav-main-link nav-main-link-submenu" data-toggle="submenu" aria-haspopup="true" aria-expanded="false" href="#">
  <i class="nav-main-link-icon fa fa-rotate-left"></i>
  <span class="nav-main-link-name">GRN's</span>
</a>
<ul class="nav-main-submenu">
  <li class="nav-main-item">
    <a class="nav-main-link <?php echo e(request()->is('admin/add-grn') ? 'active' : ''); ?>" href="<?php echo e(url('admin/add-grn')); ?>">
      <span class="nav-main-link-name">Add GRN</span>
    </a>
  </li>
  <li class="nav-main-item">
    <a class="nav-main-link <?php echo e(request()->is('admin/grns') ? 'active' : ''); ?>" href="<?php echo e(url('admin/grns')); ?>">
      <span class="nav-main-link-name">All GRN's</span>
    </a>
  </li>
  
</ul>
</li>
<li class="nav-main-item">
<a class="nav-main-link" href="<?php echo e(url('admin/premium')); ?>">
  <i class="nav-main-link-icon fa fa-arrow-right-to-bracket"></i>
  <span class="nav-main-link-name">Returns</span>
  <span class="nav-main-link-badge badge rounded-pill bg-danger">Premium</span>
</a>
</li>
<!-- <li class="nav-main-item">
<a class="nav-main-link nav-main-link-submenu" data-toggle="submenu" aria-haspopup="true" aria-expanded="false" href="#">
  <i class="nav-main-link-icon fa fa-arrow-right-to-bracket"></i>
  <span class="nav-main-link-name">Returns</span>
</a>
<ul class="nav-main-submenu">
  <li class="nav-main-item">
    <a class="nav-main-link" href="<?php echo e(url('admin/add-return')); ?>">
      <span class="nav-main-link-name">Add Return</span>
    </a>
  </li>
  <li class="nav-main-item">
    <a class="nav-main-link" href="<?php echo e(url('admin/returns')); ?>">
      <span class="nav-main-link-name">All Returns</span>
    </a>
  </li>
  
</ul>
</li> -->

<li class="nav-main-heading">Products</li>
<li class="nav-main-item">
<a class="nav-main-link <?php echo e(request()->is('admin/brands') ? 'active' : ''); ?>" href="<?php echo e(url('admin/brands')); ?>">
  <i class="nav-main-link-icon fa fa-rainbow"></i>
  <span class="nav-main-link-name">Brands</span>
</a>
</li>
<li class="nav-main-item">
<a class="nav-main-link <?php echo e(request()->is('admin/categories') ? 'active' : ''); ?>" href="<?php echo e(url('admin/categories')); ?>">
  <i class="nav-main-link-icon fa fa-diagram-project"></i>
  <span class="nav-main-link-name">Categories</span>
</a>
</li>
<li class="nav-main-item <?php echo e(in_array(request()->path(), ['admin/add-suplier', 'admin/supliers', 'admin/add-company', 'admin/companies']) ? 'open ' : ''); ?>">
<a class="nav-main-link nav-main-link-submenu" data-toggle="submenu" aria-haspopup="true" aria-expanded="false" href="#">
  <i class="nav-main-link-icon fa fa-boxes-packing"></i>
  <span class="nav-main-link-name">Suppliers</span>
</a>
<ul class="nav-main-submenu">
  <li class="nav-main-item">
    <a class="nav-main-link <?php echo e(request()->is('admin/add-suplier') ? 'active' : ''); ?>" href="<?php echo e(url('admin/add-suplier')); ?>">
      <span class="nav-main-link-name">Add Supplier </span>
    </a>
  </li>
  <li class="nav-main-item">
    <a class="nav-main-link <?php echo e(request()->is('admin/supliers') ? 'active' : ''); ?>" href="<?php echo e(url('admin/supliers')); ?>">
      <span class="nav-main-link-name">All Suppliers</span>
    </a>
  </li>
  <li class="nav-main-item">
    <a class="nav-main-link <?php echo e(request()->is('admin/add-company') ? 'active' : ''); ?>" href="<?php echo e(url('admin/add-company')); ?>">
      <span class="nav-main-link-name">Add Company</span>
    </a>
  </li>
  <li class="nav-main-item">
    <a class="nav-main-link <?php echo e(request()->is('admin/companies') ? 'active' : ''); ?>" href="<?php echo e(url('admin/companies')); ?>">
      <span class="nav-main-link-name">All Companies</span>
    </a>
  </li>
</ul>
</li>
<li class="nav-main-item <?php echo e(in_array(request()->path(), ['admin/add-product', 'admin/products', 'admin/import-products', 'admin/product-overview']) ? 'open ' : ''); ?>">
<a class="nav-main-link nav-main-link-submenu" data-toggle="submenu" aria-haspopup="true" aria-expanded="false" href="#">
  <i class="nav-main-link-icon fa fa-box"></i>
  <span class="nav-main-link-name">Products</span>
</a>
<ul class="nav-main-submenu">
  <li class="nav-main-item">
    <a class="nav-main-link <?php echo e(request()->is('admin/add-product') ? 'active' : ''); ?>" href="<?php echo e(url('admin/add-product')); ?>">
      <span class="nav-main-link-name">Add Product</span>
    </a>
  </li>
  <li class="nav-main-item">
    <a class="nav-main-link <?php echo e(request()->is('admin/products') ? 'active' : ''); ?>" href="<?php echo e(url('admin/products')); ?>">
      <span class="nav-main-link-name">All Products</span>
    </a>
  </li>
  <li class="nav-main-item">
    <a class="nav-main-link <?php echo e(request()->is('admin/import-products') ? 'active' : ''); ?>" href="<?php echo e(url('admin/import-products')); ?>">
      <span class="nav-main-link-name">Import Products</span>
    </a>
  </li>
   <li class="nav-main-item">
    <a class="nav-main-link <?php echo e(request()->is('admin/product-overview') ? 'active' : ''); ?>" href="<?php echo e(url('admin/product-overview')); ?>">
      <span class="nav-main-link-name">Product Overview</span>
    </a>
  </li>
</ul>
</li>

<?php  if(Auth::user()->user_role == 1){ ?>
                 <li class="nav-main-heading">Reports</li>
                  <li class="nav-main-item <?php echo e(in_array(request()->path(), ['admin/sales-report', 'admin/inventory-reports', 'admin/profit-loss-summery', 'admin/inventory-detailed']) ? 'open ' : ''); ?>">
                <a class="nav-main-link nav-main-link-submenu" data-toggle="submenu" aria-haspopup="true" aria-expanded="false" href="#">
                  <i class="nav-main-link-icon fa fa-file-lines"></i>
                  <span class="nav-main-link-name">Reports</span>
                </a>
                <ul class="nav-main-submenu">
                  <!-- <li class="nav-main-item">
                    <a class="nav-main-link" href="<?php echo e(url('admin/cost-report')); ?>">
                      <span class="nav-main-link-name">Cost Report</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link" href="<?php echo e(url('admin/financial-reports')); ?>">
                      <span class="nav-main-link-name">Financial Reports</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link" href="<?php echo e(url('admin/daily-updates')); ?>">
                      <span class="nav-main-link-name">Daily Updates</span>
                    </a>
                  </li> -->
                  <li class="nav-main-item">
                    <a class="nav-main-link <?php echo e(request()->is('admin/sales-report') ? 'active' : ''); ?>" href="<?php echo e(url('admin/sales-report')); ?>">
                      <span class="nav-main-link-name">Sales Reports</span>
                    </a>
                  </li>
                   <li class="nav-main-item">
                    <a class="nav-main-link <?php echo e(request()->is('admin/inventory-reports') ? 'active' : ''); ?>" href="<?php echo e(url('admin/inventory-reports')); ?>">
                      <span class="nav-main-link-name">Inventory Report</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link <?php echo e(request()->is('admin/profit-loss-summery') ? 'active' : ''); ?>" href="<?php echo e(url('admin/profit-loss-summery')); ?>">
                      <span class="nav-main-link-name">Profit & Loss Summery</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link <?php echo e(request()->is('admin/profit-loss-detailed') ? 'active' : ''); ?>" href="<?php echo e(url('admin/profit-loss-detailed')); ?>">
                      <span class="nav-main-link-name">Profit & Loss Detailed</span>
                    </a>
                  </li>
                </ul>
                </li>
                <?php } ?>


<?php } ?>
              <li class="nav-main-heading">Users</li>

              <?php  if(Auth::user()->user_role == 1){ ?>
              <!-- <li class="nav-main-item">
                <a class="nav-main-link nav-main-link-submenu" data-toggle="submenu" aria-haspopup="true" aria-expanded="false" href="#">
                  <i class="nav-main-link-icon fa fa-user-large"></i>
                  <span class="nav-main-link-name">Admins</span>
                </a>
                <ul class="nav-main-submenu">

                  <li class="nav-main-item">
                    <a class="nav-main-link" href="<?php echo e(url('admin/add-admin')); ?>">
                      <span class="nav-main-link-name">Add Admin</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link" href="<?php echo e(url('admin/admins')); ?>">
                      <span class="nav-main-link-name">All Admins</span>
                    </a>
                  </li>
                  
                </ul>
              </li> -->

              <!-- <li class="nav-main-item">
                <a class="nav-main-link nav-main-link-submenu" data-toggle="submenu" aria-haspopup="true" aria-expanded="false" href="#">
                  <i class="nav-main-link-icon fa fa-user-large"></i>
                  <span class="nav-main-link-name">Managers</span>
                </a>
                <ul class="nav-main-submenu">
                  <li class="nav-main-item">
                    <a class="nav-main-link" href="<?php echo e(url('admin/add-manager')); ?>">
                      <span class="nav-main-link-name">Add Manager</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link" href="<?php echo e(url('admin/managers')); ?>">
                      <span class="nav-main-link-name">All Managers</span>
                    </a>
                  </li>
                  
                </ul>
              </li> -->
              <li class="nav-main-item">
              <a class="nav-main-link" href="<?php echo e(url('admin/premium')); ?>">
                <i class="nav-main-link-icon fa fa-user-large"></i>
                <span class="nav-main-link-name">Managers</span>
                <span class="nav-main-link-badge badge rounded-pill bg-danger">Premium</span>
              </a>
              </li>
              <?php } ?>
              <?php  if(Auth::user()->user_role == 1 || Auth::user()->user_role == 3){ ?>
                <li class="nav-main-item">
              <a class="nav-main-link" href="<?php echo e(url('admin/premium')); ?>">
                <i class="nav-main-link-icon fa fa-user-large"></i>
                <span class="nav-main-link-name">Cashiers</span>
                <span class="nav-main-link-badge badge rounded-pill bg-danger">Premium</span>
              </a>
              </li>
              <!-- <li class="nav-main-item">
                <a class="nav-main-link nav-main-link-submenu" data-toggle="submenu" aria-haspopup="true" aria-expanded="false" href="#">
                  <i class="nav-main-link-icon fa fa-user-large"></i>
                  <span class="nav-main-link-name">Cashiers</span>
                </a>
                <ul class="nav-main-submenu">
                  <li class="nav-main-item">
                    <a class="nav-main-link" href="<?php echo e(url('admin/add-cashier')); ?>">
                      <span class="nav-main-link-name">Add Cashier</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link" href="<?php echo e(url('admin/cashiers')); ?>">
                      <span class="nav-main-link-name">All Cashiers</span>
                    </a>
                  </li>
                  
                </ul>
              </li> -->
              <?php } ?>

              <li class="nav-main-item <?php echo e(in_array(request()->path(), ['admin/add-customer', 'admin/customers', 'admin/deleted-customers']) ? 'open ' : ''); ?>">
                <a class="nav-main-link nav-main-link-submenu" data-toggle="submenu" aria-haspopup="true" aria-expanded="false" href="#">
                  <i class="nav-main-link-icon fa fa-circle-user"></i>
                  <span class="nav-main-link-name">Customers</span>
                </a>
                <ul class="nav-main-submenu">
                     <li class="nav-main-item">
                    <a class="nav-main-link <?php echo e(request()->is('admin/add-customer') ? 'active' : ''); ?>" href="<?php echo e(url('admin/add-customer')); ?>">
                      <span class="nav-main-link-name">Add Customer</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link <?php echo e(request()->is('admin/customers') ? 'active' : ''); ?>" href="<?php echo e(url('admin/customers')); ?>">
                      <span class="nav-main-link-name">All Customers</span>
                    </a>
                  </li>
                  <li class="nav-main-item">
                    <a class="nav-main-link <?php echo e(request()->is('admin/deleted-customers') ? 'active' : ''); ?>" href="<?php echo e(url('admin/deleted-customers')); ?>">
                      <span class="nav-main-link-name">Deleted Customers</span>
                    </a>
                  </li>
                </ul>
              </li>

             
               

              <!-- <li class="nav-main-item">
                <a class="nav-main-link" href="<?php echo e(url('admin/add-order')); ?>">
                  <i class="nav-main-link-icon fa fa-file"></i>
                  <span class="nav-main-link-name">Cashier</span>
                </a>
              </li> -->
             
                <?php  if(Auth::user()->user_role == 1){ ?>
                <li class="nav-main-heading">Other</li>
                <li class="nav-main-item">
                <a class="nav-main-link <?php echo e(request()->is('admin/system-settings') ? 'active' : ''); ?>" href="<?php echo e(url('admin/system-settings')); ?>">
                  <i class="nav-main-link-icon fa fa-cog"></i>
                  <span class="nav-main-link-name">System Settings</span>
                </a>
              </li>
                <?php } ?>
              
                 <!-- <li class="nav-main-heading">Web Content</li>
                 
                  <li class="nav-main-item">
                <a class="nav-main-link" href="<?php echo e(url('admin/banners')); ?>">
                  <i class="nav-main-link-icon fa fa-object-group"></i>
                  <span class="nav-main-link-name">Banners</span>
                </a>
              </li>
              <li class="nav-main-item">
                <a class="nav-main-link" href="<?php echo e(url('admin/select-web-categories')); ?>">
                  <i class="nav-main-link-icon fa fa-diagram-project"></i>
                  <span class="nav-main-link-name">Select Web Categories</span>
                </a>
              </li>
               -->
            </ul>
          </div>
          <!-- END Side Navigation -->
        </div>
        <!-- END Sidebar Scrolling -->
      </nav>
      <!-- END Sidebar -->

      <!-- Header -->
      <header id="page-header">
        <!-- Header Content -->
        <div class="content-header">
          <!-- Left Section -->
          <div class="space-x-1">
            <!-- Toggle Sidebar -->
            <!-- Layout API, functionality initialized in Template._uiApiLayout()-->
            <button type="button" class="btn btn-alt-secondary toggle-nav-bar" data-toggle="layout" data-action="sidebar_toggle">
              <i class="fa fa-fw fa-bars"></i>
            </button>
            <!-- END Toggle Sidebar -->

            <!-- Open Search Section -->
            <!-- Layout API, functionality initialized in Template._uiApiLayout() -->
            <!-- <button type="button" class="btn btn-alt-secondary" data-toggle="layout" data-action="header_search_on">
              <i class="fa fa-fw opacity-50 fa-search"></i> <span class="ms-1 d-none d-sm-inline-block">Search</span>
            </button> -->

            <a href="<?php echo e(url('admin/add-order')); ?>"><button type="button" class="btn btn-success">
                      <i class="fa fa-file me-1"></i> Cashier
            </button></a>

            <a href="<?php echo e(url('admin/add-customer')); ?>"><button type="button" class="btn btn-primary">
                      <i class="fa fa-circle-user me-1"></i> Add Customer
            </button></a>
            <!-- END Open Search Section -->
          </div>
          <!-- END Left Section -->

          <!-- Right Section -->
          <div class="space-x-1">
            <button type="button" class="btn btn-danger"  data-bs-toggle="modal" data-bs-target="#addExpenses">
              Add Expense
            </button>
            <button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#addRevenue">
              Add Revenue
            </button>
            <!-- User Dropdown -->
            <div class="dropdown d-inline-block">
              <button type="button" class="btn btn-alt-secondary" id="page-header-user-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="fa fa-fw fa-user d-sm-none"></i>
                <?php  if(Auth::user()->user_role == 1 ){ ?>
                  <span class="d-none d-sm-inline-block">Admin</span>
                <?php } ?>
                <?php  if(Auth::user()->user_role == 3 ){ ?>
                  <span class="d-none d-sm-inline-block">Manager</span>
                <?php } ?>
                <?php  if(Auth::user()->user_role == 4 ){ ?>
                  <span class="d-none d-sm-inline-block">Cashier</span>
                <?php } ?>
                <i class="fa fa-fw fa-angle-down opacity-50 ms-1 d-none d-sm-inline-block"></i>
              </button>
              <div class="dropdown-menu dropdown-menu-end p-0" aria-labelledby="page-header-user-dropdown">
                <div class="bg-primary-dark rounded-top fw-semibold text-white text-center p-3">
                  User Options
                </div>
                <div class="p-2">
                  <a class="dropdown-item" href="<?php echo e(url('admin/profile')); ?>">
                    <i class="far fa-fw fa-user me-1"></i> Profile
                  </a>
                  <!-- <a class="dropdown-item d-flex align-items-center justify-content-between" href="be_pages_generic_inbox.html">
                    <span><i class="far fa-fw fa-envelope me-1"></i> Inbox</span>
                    <span class="badge bg-primary rounded-pill">3</span>
                  </a>
                  <a class="dropdown-item" href="be_pages_generic_invoice.html">
                    <i class="far fa-fw fa-file-alt me-1"></i> Invoices
                  </a> -->
                  <div role="separator" class="dropdown-divider"></div>

                  <!-- Toggle Side Overlay -->
                  <!-- Layout API, functionality initialized in Template._uiApiLayout() -->
                  <!-- <a class="dropdown-item" href="javascript:void(0)" data-toggle="layout" data-action="side_overlay_toggle">
                    <i class="far fa-fw fa-building me-1"></i> Settings
                  </a> -->
                  <!-- END Side Overlay -->

                  <div role="separator" class="dropdown-divider"></div>
                  <a class="dropdown-item" href="<?php echo e(url('admin/logout')); ?>">
                    <i class="far fa-fw fa-arrow-alt-circle-left me-1"></i> Sign Out
                  </a>
                </div>
              </div>
            </div>
            <!-- END User Dropdown -->

            <!-- Notifications Dropdown -->
            <div class="dropdown d-inline-block">
              <button type="button" class="btn btn-alt-secondary" id="page-header-notifications-dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="fa fa-fw fa-bell"></i>
              </button>
              <div class="dropdown-menu dropdown-menu-lg dropdown-menu-end p-0" aria-labelledby="page-header-notifications-dropdown">
                <div class="bg-primary-dark rounded-top fw-semibold text-white text-center p-3">
                  Notifications
                </div>
                <ul class="nav-items my-2">
                 <?php
                 $low_stock_products = DB::table('grn_products')->select('product', DB::raw('SUM(quantity) as total_quantity'))->groupBy('product')->having('total_quantity', '<', 10)->get(); 
                 foreach($low_stock_products as $low_stock_product) {
                  $product_name = Products::withTrashed()->where('id', $low_stock_product->product)->value('product_name');
                  $product_code = Products::withTrashed()->where('id', $low_stock_product->product)->value('product_code');
                 ?>
                  <li>
                    <a class="d-flex text-dark py-2" href="javascript:void(0)">
                      <div class="flex-shrink-0 mx-3">
                        <i class="fa fa-fw fa-exclamation-circle text-warning"></i>
                      </div>
                      <div class="flex-grow-1 fs-sm pe-2">
                        <div class="fw-semibold"><?php echo e($product_name); ?> ( <?php echo e($product_code); ?>)  is low on stock - <?php if($low_stock_product->total_quantity == 0){ ?>
                       Out of Stock 
                    <?php }else{ ?>
                         <?php echo e($low_stock_product->total_quantity); ?>

                    <?php } ?>
                     </div>
                        <!-- <div class="text-muted">1 hour ago</div> -->
                      </div>
                    </a>
                  </li>
                <?php } ?>  
                </ul>
                <!-- <div class="p-2 border-top">
                  <a class="btn btn-alt-primary w-100 text-center" href="javascript:void(0)">
                    <i class="fa fa-fw fa-eye opacity-50 me-1"></i> View All
                  </a>
                </div> -->
              </div>
            </div>
            <!-- END Notifications Dropdown -->

            <!-- Toggle Side Overlay -->
            <!-- Layout API, functionality initialized in Template._uiApiLayout() -->
            <!-- <button type="button" class="btn btn-alt-secondary" data-toggle="layout" data-action="side_overlay_toggle">
              <i class="far fa-fw fa-list-alt"></i>
            </button> -->
            <!-- END Toggle Side Overlay -->
          </div>
          <!-- END Right Section -->
        </div>
        <!-- END Header Content -->

        <!-- Header Search -->
        <div id="page-header-search" class="overlay-header bg-header-dark">
          <div class="bg-white-10">
            <div class="content-header">
              <form class="w-100" action="be_pages_generic_search.html" method="POST">
                <div class="input-group">
                  <!-- Layout API, functionality initialized in Template._uiApiLayout() -->
                  <button type="button" class="btn btn-alt-primary" data-toggle="layout" data-action="header_search_off">
                    <i class="fa fa-fw fa-times-circle"></i>
                  </button>
                  <input type="text" class="form-control border-0" placeholder="Search or hit ESC.." id="page-header-search-input" name="page-header-search-input">
                </div>
              </form>
            </div>
          </div>
        </div>
        <!-- END Header Search -->

        <!-- Header Loader -->
        <!-- Please check out the Loaders page under Components category to see examples of showing/hiding it -->
        <div id="page-header-loader" class="overlay-header bg-header-dark">
          <div class="bg-white-10">
            <div class="content-header">
              <div class="w-100 text-center">
                <i class="fa fa-fw fa-sun fa-spin text-white"></i>
              </div>
            </div>
          </div>
        </div>
        <!-- END Header Loader -->
      </header>
      <!-- END Header -->

      <?php
        $defaultDate =  \Carbon\Carbon::now()->toDateString();
      ?>
      <div class="modal" id="addExpenses" tabindex="-1" role="dialog" aria-labelledby="addExpenses" aria-hidden="true">
            <div class="modal-dialog modal-xl" role="document">
              <div class="modal-content">
                <div class="block block-rounded block-themed block-transparent mb-0">
                  <div class="block-header bg-danger">
                    <h3 class="block-title">Add Expenses</h3>
                    <div class="block-options">
                      <button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
                        <i class="fa fa-fw fa-times"></i>
                      </button>
                    </div>
                  </div>
                  <form action="<?php echo e(url('admin/add-expense')); ?>" method="POST" >
                  <?php echo csrf_field(); ?>
                 
                  <div class="block-content">
                    <div class="row">
                      <div class="col-md-3 mb-3">
                        <label class="form-label">Date</label>
                        <input type="date" class="form-control" name="date" value="<?php echo e($defaultDate); ?>"  required>
                        <?php if($errors->has("date")): ?> <div class="alert alert-danger mt-2"><?php echo e($errors->first('date')); ?></div><?php endif; ?>
                      </div>
                      <div class="col-md-3 mb-3">
                        <label class="form-label">Expense Category</label>
                        <select class=" form-select expense-category" required name="expense_category" style="width: 100%;" data-placeholder="Select a expense category..">
                          <option value="Salaries & Wages">Salaries & Wages</option>
                          <option value="Rent">Rent</option>
                          <option value="Marketing & Advertising">Marketing & Advertising</option>
                          <option value="Office Expenses">Office Expenses</option>
                          <option value="Taxes">Taxes</option>
                          <option value="Bonuses & Commissions">Bonuses & Commissions</option>
                          <option value="Utility Bills Electricity">Utility Bills Electricity</option>
                          <option value="Utility Bills Water">Utility Bills Water</option>
                          <option value="Utility Bills Other">Utility Bills Other</option>
                          <option value="Transport">Transport</option>
                          <option value="Marketing & Advertising">Marketing & Advertising</option>
                          <option value="IT & Software Expenses">IT & Software Expenses</option>
                          <option value="Donations & Sponsorships">Donations & Sponsorships</option>
                          <option value="Insurance">Insurance</option>
                        </select>
                        <?php if($errors->has("expense_category")): ?> <div class="alert alert-danger mt-2"><?php echo e($errors->first('expense_category')); ?></div><?php endif; ?>
                      </div>
                      <div class="col-md-3 mb-3">
                        <label class="form-label">Remark</label>
                        <input type="text" class="form-control" name="remark" required>
                        <?php if($errors->has("remark")): ?> <div class="alert alert-danger mt-2"><?php echo e($errors->first('remark')); ?></div><?php endif; ?>
                      </div>
                      <div class="col-md-3 mb-3">
                        <label class="form-label">Amount</label>
                        <input type="number" class="form-control" name="amount" required>
                        <?php if($errors->has("amount")): ?> <div class="alert alert-danger mt-2"><?php echo e($errors->first('amount')); ?></div><?php endif; ?>
                      </div>
                    </div>
                  </div>
                  <div class="block-content block-content-full text-end bg-body">
                  <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                    <button type="submit" class="btn  btn-primary">Save</button>
                  </div>
                  </form>
                </div>
              </div>
            </div>
          </div>


          <div class="modal" id="addRevenue" tabindex="-1" role="dialog" aria-labelledby="addRevenue" aria-hidden="true">
            <div class="modal-dialog modal-xl" role="document">
              <div class="modal-content">
                <div class="block block-rounded block-themed block-transparent mb-0">
                  <div class="block-header bg-success">
                    <h3 class="block-title">Add Revenue</h3>
                    <div class="block-options">
                      <button type="button" class="btn-block-option" data-bs-dismiss="modal" aria-label="Close">
                        <i class="fa fa-fw fa-times"></i>
                      </button>
                    </div>
                  </div>
                  <form action="<?php echo e(url('admin/add-revenue')); ?>" method="POST" >
                  <?php echo csrf_field(); ?>
                 
                  <div class="block-content">
                    <div class="row">
                      <div class="col-md-3 mb-3">
                        <label class="form-label">Date</label>
                        <input type="date" class="form-control" name="date" value="<?php echo e($defaultDate); ?>"  required>
                        <?php if($errors->has("date")): ?> <div class="alert alert-danger mt-2"><?php echo e($errors->first('date')); ?></div><?php endif; ?>
                      </div>
                      <div class="col-md-3 mb-3">
                        <label class="form-label">Revenue Category</label>
                        <select class=" form-select revenue-category" required  name="expense_category" style="width: 100%;" data-placeholder="Select a expense category..">
                          <option value="Non Stock- Sales Revenue">Non Stock- Sales Revenue</option>
                        </select>
                        <?php if($errors->has("expense_category")): ?> <div class="alert alert-danger mt-2"><?php echo e($errors->first('expense_category')); ?></div><?php endif; ?>
                      </div>
                      <div class="col-md-3 mb-3">
                        <label class="form-label">Remark</label>
                        <input type="text" class="form-control" name="remark" required>
                        <?php if($errors->has("remark")): ?> <div class="alert alert-danger mt-2"><?php echo e($errors->first('remark')); ?></div><?php endif; ?>
                      </div>
                      <div class="col-md-3 mb-3">
                        <label class="form-label">Amount</label>
                        <input type="number" class="form-control" name="amount" required>
                        <?php if($errors->has("amount")): ?> <div class="alert alert-danger mt-2"><?php echo e($errors->first('amount')); ?></div><?php endif; ?>
                      </div>
                    </div>
                  </div>
                  <div class="block-content block-content-full text-end bg-body">
                  <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                    <button type="submit" class="btn  btn-primary">Save</button>
                  </div>
                  </form>
                </div>
              </div>
            </div>
          </div><?php /**PATH /home/u446954234/domains/orionerp.xyz/public_html/cus107-dmarq/Modules/Admin/resources/views/layouts/header.blade.php ENDPATH**/ ?>