<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title style="font-weight: bold; font-size: 1.3em;">MELSOFT QUANTA</title>

    <!-- Custom fonts for this template-->
    <link href="<?php echo e(asset('assets/vendor/fontawesome-free/css/all.min.css')); ?>" rel="stylesheet" type="text/css">
    <link
        href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
        rel="stylesheet">

    <!-- Custom styles for this template-->
    <link href="<?php echo e(asset('assets/css/sb-admin-2.min.css')); ?>" rel="stylesheet">
    <!-- Bootstrap 5 -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">

    <style>
    html, body {
        height: 100%;
        overflow-y: auto;
    }

    .table-scroll {
        max-height: 70vh;
        overflow-y: auto;
    }

    .table-scroll thead th {
        position: sticky;
        top: 0;
        background-color: white;
        z-index: 1;
    }

    /* Responsive navbar styles */
    @media (max-width: 992px) {
        body {
            padding-top: 180px !important; /* Increased padding for mobile */
        }

        .second-navbar {
            overflow-x: auto;
            white-space: nowrap;
            flex-wrap: nowrap;
            -webkit-overflow-scrolling: touch;
        }

        .second-navbar .container {
            width: auto;
            min-width: 100%;
        }

        .second-navbar .navbar-nav {
            display: inline-flex;
            flex-direction: row;
        }

        .second-navbar .nav-item {
            white-space: nowrap;
        }

        /* Adjust dropdowns for mobile */
        .dropdown-menu {
            max-height: 70vh;
            overflow-y: auto;
        }

        /* Make sure dropdowns are visible on mobile */
        .dropdown-submenu > .dropdown-menu {
            position: relative !important;
            left: 0 !important;
            top: 0 !important;
            margin-left: 15px;
            margin-bottom: 10px;
        }
    }

    /* Scrollbar styling for horizontal scroll */
    .second-navbar::-webkit-scrollbar {
        height: 8px;
    }

    .second-navbar::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .second-navbar::-webkit-scrollbar-thumb {
        background: #018ca3;
        border-radius: 4px;
    }

    .second-navbar::-webkit-scrollbar-thumb:hover {
        background: #017085;
    }
   /* Make dropdowns float above everything */
.navbar .dropdown-menu {
    position: absolute !important;
    z-index: 2000 !important;
}

/* Ensure submenus also float above */
.dropdown-submenu .dropdown-menu {
    position: absolute !important;
    z-index: 3000 !important;
    top: 0;
    left: 80%;
    margin-top: -1px;
}

/* On mobile, force dropdowns overlay */
@media (max-width: 992px) {
    .navbar .dropdown-menu {
        position: fixed !important;
        top: 120px;
        left: 50%;               /* start at middle */
        transform: translateX(-50%); /* center horizontally */
        width: 70%;              /* make a bit wider */
        max-height: 70vh;
        overflow-y: auto;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    /* Submenus stacked under parent */
    .dropdown-submenu .dropdown-menu {
        display: none;
        position: static !important;
        margin-left: 100px;
        margin-top: 5px;
        padding-left: 30px;
        border-left: 2px solid #ddd;
    }

}

</style>
</head>

<body id="page-top" style="padding-top: 150px;">

    <!-- Page Wrapper -->
    <div id="wrapper">
        <?php
            $PermissionsEdit = App\Models\PermissionUser::getPermission('Edit', Auth::user()->id);
            $PermissionsChartOfAccounts = App\Models\PermissionUser::getPermission('Chart of Accounts', Auth::user()->id);
            $PermissionsGeneralLedger = App\Models\PermissionUser::getPermission('General Ledger', Auth::user()->id);
            $PermissionsAddGeneralLedger = App\Models\PermissionUser::getPermission('Add General Ledger', Auth::user()->id);
            $PermissionsEditGeneralLedger = App\Models\PermissionUser::getPermission('Edit General Ledger', Auth::user()->id);
            $PermissionsDeleteGeneralLedger = App\Models\PermissionUser::getPermission('Delete General Ledger', Auth::user()->id);

            $PermissionsAccountTypes = App\Models\PermissionUser::getPermission('Account Types', Auth::user()->id);
            $PermissionsAddAccountTypes = App\Models\PermissionUser::getPermission('Add Account Types', Auth::user()->id);
            $PermissionsEditAccountTypes = App\Models\PermissionUser::getPermission('Edit Account Types', Auth::user()->id);
            $PermissionsDeleteAccountTypes = App\Models\PermissionUser::getPermission('Delete Account Types', Auth::user()->id);

            $PermissionsDepartment = App\Models\PermissionUser::getPermission('Departments', Auth::user()->id);
            $PermissionsAddDepartment = App\Models\PermissionUser::getPermission('Add Department', Auth::user()->id);
            $PermissionsEditDepartment = App\Models\PermissionUser::getPermission('Edit Department', Auth::user()->id);
            $PermissionsDeleteDepartment = App\Models\PermissionUser::getPermission('Delete Department', Auth::user()->id);

            $PermissionsTransactionTypes = App\Models\PermissionUser::getPermission('Transaction Types', Auth::user()->id);
            $PermissionsCustomersTType = App\Models\PermissionUser::getPermission('Customers TType', Auth::user()->id);
            $PermissionsAddCustomerTType = App\Models\PermissionUser::getPermission('Add Customer TType', Auth::user()->id);
            $PermissionsEditCustomerTType = App\Models\PermissionUser::getPermission('Edit Customer TType', Auth::user()->id);
            $PermissionsDeleteCustomerTType = App\Models\PermissionUser::getPermission('Delete Customer TType', Auth::user()->id);

            $PermissionsSupplierTType = App\Models\PermissionUser::getPermission('Supplier TType', Auth::user()->id);
            $PermissionsAddSupplierTType = App\Models\PermissionUser::getPermission('Add Supplier TType', Auth::user()->id);
            $PermissionsEditSupplierTType = App\Models\PermissionUser::getPermission('Edit Supplier TType', Auth::user()->id);
            $PermissionsDeleteSupplierTType = App\Models\PermissionUser::getPermission('Delete Supplier TType', Auth::user()->id);

            $PermissionsInventoryTType = App\Models\PermissionUser::getPermission('Inventory TType', Auth::user()->id);
            $PermissionsAddInventoryTType = App\Models\PermissionUser::getPermission('Add Inventory TType', Auth::user()->id);
            $PermissionsEditInventoryTType = App\Models\PermissionUser::getPermission('Edit Inventory TType', Auth::user()->id);
            $PermissionsDeleteInventoryTType = App\Models\PermissionUser::getPermission('Delete Inventory TType', Auth::user()->id);

            $PermissionsCustomers = App\Models\PermissionUser::getPermission('Customers', Auth::user()->id);
            $PermissionsCustomerAccount = App\Models\PermissionUser::getPermission('Customer Account', Auth::user()->id);
            $PermissionsAddCustomerAccount = App\Models\PermissionUser::getPermission('Add Customer Account', Auth::user()->id);
            $PermissionsEditCustomerAccount = App\Models\PermissionUser::getPermission('Edit Customer Account', Auth::user()->id);
            $PermissionsDeleteCustomerAccount = App\Models\PermissionUser::getPermission('Delete Customer Account', Auth::user()->id);

            $PermissionsSuppliers = App\Models\PermissionUser::getPermission('Suppliers', Auth::user()->id);
            $PermissionsSupplierAccounts = App\Models\PermissionUser::getPermission('Supplier Accounts', Auth::user()->id);
            $PermissionsAddSupplierAccount = App\Models\PermissionUser::getPermission('Add Supplier Account', Auth::user()->id);
            $PermissionsEditSupplierAccount = App\Models\PermissionUser::getPermission('Edit Supplier Account', Auth::user()->id);
            $PermissionsDeleteSupplierAccount = App\Models\PermissionUser::getPermission('Delete Supplier Account', Auth::user()->id);

            $PermissionsCashbook = App\Models\PermissionUser::getPermission('Cashbook', Auth::user()->id);
            $PermissionsCashbookAccount = App\Models\PermissionUser::getPermission('Cashbook Account', Auth::user()->id);
            $PermissionsAddCashbookAccount = App\Models\PermissionUser::getPermission('Add Cashbook Account', Auth::user()->id);
            $PermissionsEditCashbookAccount = App\Models\PermissionUser::getPermission('Edit Cashbook Account', Auth::user()->id);
            $PermissionsDeleteCashbookAccount = App\Models\PermissionUser::getPermission('Delete Cashbook Account', Auth::user()->id);

            $PermissionsInventory = App\Models\PermissionUser::getPermission('Inventory', Auth::user()->id);
            $PermissionsBinLocations = App\Models\PermissionUser::getPermission('Bin Locations', Auth::user()->id);
            $PermissionsAddBinLocations = App\Models\PermissionUser::getPermission('Add Bin Locations', Auth::user()->id);
            $PermissionsEditBinLocations = App\Models\PermissionUser::getPermission('Edit Bin Locations', Auth::user()->id);
            $PermissionsDeleteBinLocations = App\Models\PermissionUser::getPermission('Delete Bin Locations', Auth::user()->id);

            $PermissionsCartegories = App\Models\PermissionUser::getPermission('Cartegories', Auth::user()->id);
            $PermissionsAddCartegories = App\Models\PermissionUser::getPermission('Add Cartegories', Auth::user()->id);
            $PermissionsEditCartegories = App\Models\PermissionUser::getPermission('Edit Cartegories', Auth::user()->id);
            $PermissionsDeleteCartegories = App\Models\PermissionUser::getPermission('Delete Cartegories', Auth::user()->id);

            $PermissionsItems = App\Models\PermissionUser::getPermission('Items', Auth::user()->id);
            $PermissionsAddItems = App\Models\PermissionUser::getPermission('Add Items', Auth::user()->id);
            $PermissionsEditItems = App\Models\PermissionUser::getPermission('Edit Items', Auth::user()->id);
            $PermissionsDeleteItems = App\Models\PermissionUser::getPermission('Delete Items', Auth::user()->id);

            $PermissionsPriceListNames = App\Models\PermissionUser::getPermission('Price List Names', Auth::user()->id);
            $PermissionsAddPriceListName = App\Models\PermissionUser::getPermission('Add Price List Name', Auth::user()->id);
            $PermissionsEditPriceListName = App\Models\PermissionUser::getPermission('Edit Price List Name', Auth::user()->id);
            $PermissionsDeletePriceListName = App\Models\PermissionUser::getPermission('Delete Price List Name', Auth::user()->id);

            $PermissionsUOM = App\Models\PermissionUser::getPermission('UOM', Auth::user()->id);
            $PermissionsAddUOM = App\Models\PermissionUser::getPermission('Add UOM', Auth::user()->id);
            $PermissionsEditUOM = App\Models\PermissionUser::getPermission('Edit UOM', Auth::user()->id);
            $PermissionsDeleteUOM = App\Models\PermissionUser::getPermission('Delete UOM', Auth::user()->id);

            $PermissionsUOMCartegories = App\Models\PermissionUser::getPermission('UOM Cartegories', Auth::user()->id);
            $PermissionsAddUOMCartegories = App\Models\PermissionUser::getPermission('Add UOM Cartegories', Auth::user()->id);
            $PermissionsEditUOMCartegories = App\Models\PermissionUser::getPermission('Edit UOM Cartegories', Auth::user()->id);
            $PermissionsDeleteUOMCartegories = App\Models\PermissionUser::getPermission('Delete UOM Cartegories', Auth::user()->id);

            $PermissionsWarehouse = App\Models\PermissionUser::getPermission('Warehouse', Auth::user()->id);
            $PermissionsAddWarehouse = App\Models\PermissionUser::getPermission('Add Warehouse', Auth::user()->id);
            $PermissionsEditWarehouse = App\Models\PermissionUser::getPermission('Edit Warehouse', Auth::user()->id);
            $PermissionsDeletetWarehouse = App\Models\PermissionUser::getPermission('Delete Warehouse', Auth::user()->id);

            $PermissionsMulticurrency = App\Models\PermissionUser::getPermission('Multicurrency', Auth::user()->id);
            $PermissionsCurrency = App\Models\PermissionUser::getPermission('Currency', Auth::user()->id);
            $PermissionsAddCurrency  = App\Models\PermissionUser::getPermission('Add Currency', Auth::user()->id);
            $PermissionsEditCurrency  = App\Models\PermissionUser::getPermission('Edit Currency', Auth::user()->id);
            $PermissionsDeleteCurrency  = App\Models\PermissionUser::getPermission('Delete Currency', Auth::user()->id);

            $PermissionsHomeCurrency  = App\Models\PermissionUser::getPermission('Home Currency', Auth::user()->id);
            $PermissionsAddHomeCurrency  = App\Models\PermissionUser::getPermission('Add Home Currency', Auth::user()->id);
            $PermissionsEditHomeCurrency  = App\Models\PermissionUser::getPermission('Edit Home Currency', Auth::user()->id);
            $PermissionsDeleteHomeCurrency  = App\Models\PermissionUser::getPermission('Delete Home Currency', Auth::user()->id);

            $PermissionsDailyRates  = App\Models\PermissionUser::getPermission('Daily Rates', Auth::user()->id);
            $PermissionsEditDailyRates  = App\Models\PermissionUser::getPermission('Edit Daily Rates', Auth::user()->id);
            $PermissionsAddDailyRates  = App\Models\PermissionUser::getPermission('Add Daily Rates', Auth::user()->id);
            $PermissionsDeleteDailyRates  = App\Models\PermissionUser::getPermission('Delete Daily Rates', Auth::user()->id);
            $PermissionsTax  = App\Models\PermissionUser::getPermission('Tax', Auth::user()->id);
            $PermissionsAddTax  = App\Models\PermissionUser::getPermission('Add Tax', Auth::user()->id);
            $PermissionsEditTax  = App\Models\PermissionUser::getPermission('Edit Tax', Auth::user()->id);
            $PermissionsDeleteTax  = App\Models\PermissionUser::getPermission('Delete Tax', Auth::user()->id);

            $PermissionsProjects  = App\Models\PermissionUser::getPermission('Projects', Auth::user()->id);
            $PermissionsAddProjects  = App\Models\PermissionUser::getPermission('Add Projects', Auth::user()->id);
            $PermissionsEditProjects  = App\Models\PermissionUser::getPermission('Edit Projects', Auth::user()->id);
            $PermissionsDeleteProjects  = App\Models\PermissionUser::getPermission('Delete Projects', Auth::user()->id);

            $PermissionsCustomerCartegory  = App\Models\PermissionUser::getPermission('Customer Cartegory', Auth::user()->id);
            $PermissionsAddCustomerCartegory  = App\Models\PermissionUser::getPermission('Add Customer Cartegory', Auth::user()->id);
            $PermissionsEditCustomerCartegory  = App\Models\PermissionUser::getPermission('Edit Customer Cartegory', Auth::user()->id);
            $PermissionsDeleteCustomerCartegory  = App\Models\PermissionUser::getPermission('Delete Customer Cartegory', Auth::user()->id);

            $PermissionsCustomerAgeAnalysis  = App\Models\PermissionUser::getPermission('Customer Age Analysis', Auth::user()->id);
            $PermissionsAddCustomerAgeAnalysis  = App\Models\PermissionUser::getPermission('Add Customer Age Analysis', Auth::user()->id);
            $PermissionsEditCustomerAgeAnalysis  = App\Models\PermissionUser::getPermission('Edit Customer Age Analysis', Auth::user()->id);
            $PermissionsDeleteCustomerAgeAnalysis  = App\Models\PermissionUser::getPermission('Delete Customer Age Analysis', Auth::user()->id);

            $PermissionsCustomerSalesRep  = App\Models\PermissionUser::getPermission('Customer Sales Rep', Auth::user()->id);
            $PermissionsAddCustomerSalesRep  = App\Models\PermissionUser::getPermission('Add Customer Sales Rep', Auth::user()->id);
            $PermissionsEditCustomerSalesRep  = App\Models\PermissionUser::getPermission('Edit Customer Sales Rep', Auth::user()->id);
            $PermissionsDeleteCustomerSalesRep  = App\Models\PermissionUser::getPermission('Delete Customer Sales Rep', Auth::user()->id);

            $PermissionsCustomerAreas  = App\Models\PermissionUser::getPermission('Customer Areas', Auth::user()->id);
            $PermissionsAddCustomerAreas  = App\Models\PermissionUser::getPermission('Add Customer Areas', Auth::user()->id);
            $PermissionsEditCustomerAreas  = App\Models\PermissionUser::getPermission('Edit Customer Areas', Auth::user()->id);
            $PermissionsDeleteCustomerAreas  = App\Models\PermissionUser::getPermission('Delete Customer Areas', Auth::user()->id);

            $PermissionsSupplierCategories  = App\Models\PermissionUser::getPermission('Supplier Categories', Auth::user()->id);
            $PermissionsAddSupplierCategories  = App\Models\PermissionUser::getPermission('Add Supplier Categories', Auth::user()->id);
            $PermissionsEditSupplierCategories  = App\Models\PermissionUser::getPermission('Edit Supplier Categories', Auth::user()->id);
            $PermissionsDeleteSupplierCategories  = App\Models\PermissionUser::getPermission('Delete Supplier Categories', Auth::user()->id);

            $PermissionsSupplierAgeAnalysis  = App\Models\PermissionUser::getPermission('Supplier Age Analysis', Auth::user()->id);
            $PermissionsAddSupplierAgeAnalysis  = App\Models\PermissionUser::getPermission('Add Supplier Age Analysis', Auth::user()->id);
            $PermissionsEditSupplierAgeAnalysis  = App\Models\PermissionUser::getPermission('Edit Supplier Age Analysis', Auth::user()->id);
            $PermissionsDeleteSupplierAgeAnalysis  = App\Models\PermissionUser::getPermission('Delete Supplier Age Analysis', Auth::user()->id);

            $PermissionsSupplierArea  = App\Models\PermissionUser::getPermission('Supplier Area', Auth::user()->id);
            $PermissionsAddSupplierArea  = App\Models\PermissionUser::getPermission('Add Supplier Area', Auth::user()->id);
            $PermissionsEditSupplierArea  = App\Models\PermissionUser::getPermission('Edit Supplier Area', Auth::user()->id);
            $PermissionsDeleteSupplierArea  = App\Models\PermissionUser::getPermission('Delete Supplier Area', Auth::user()->id);

            $PermissionsProcessing  = App\Models\PermissionUser::getPermission('Processing', Auth::user()->id);
            $PermissionsProcessGeneralLedger  = App\Models\PermissionUser::getPermission('Process General Ledger', Auth::user()->id);
            $PermissionsBankReconcilliation  = App\Models\PermissionUser::getPermission('Bank Reconcilliation', Auth::user()->id);
            $PermissionsAddBankReconcilliation  = App\Models\PermissionUser::getPermission('Add Bank Reconcilliation', Auth::user()->id);
            $PermissionsEditBankReconcilliation  = App\Models\PermissionUser::getPermission('Edit Bank Reconcilliation', Auth::user()->id);
            $PermissionsDeleteBankReconcilliation  = App\Models\PermissionUser::getPermission('Delete Bank Reconcilliation', Auth::user()->id);
            $PermissionsProcessCashbookReceipt  = App\Models\PermissionUser::getPermission('Process Cashbook Receipt', Auth::user()->id);
            $PermissionsAddCashbookReceipt  = App\Models\PermissionUser::getPermission('Add Cashbook Receipt', Auth::user()->id);
            $PermissionsEditCashbookReceipt  = App\Models\PermissionUser::getPermission('Edit Cashbook Receipt', Auth::user()->id);
            $PermissionsDeleteCashbookReceipt  = App\Models\PermissionUser::getPermission('Delete Cashbook Receipt', Auth::user()->id);

            $PermissionsCashbookPayment  = App\Models\PermissionUser::getPermission('Cashbook Payment', Auth::user()->id);
            $PermissionsAddCashbookPayment  = App\Models\PermissionUser::getPermission('Add Cashbook Payment', Auth::user()->id);
            $PermissionsEditCashbookPayment  = App\Models\PermissionUser::getPermission('Edit Cashbook Payment', Auth::user()->id);
            $PermissionsDeleteCashbookPayment  = App\Models\PermissionUser::getPermission('Delete Cashbook Payment', Auth::user()->id);

            $PermissionsProcessCustomer  = App\Models\PermissionUser::getPermission('Process Customer', Auth::user()->id);
            $PermissionsCustomerQuotation  = App\Models\PermissionUser::getPermission('Customer Quotation', Auth::user()->id);
            $PermissionsAddCustomerQuotation  = App\Models\PermissionUser::getPermission('Add Customer Quotation', Auth::user()->id);
            $PermissionsEditCustomerQuotation  = App\Models\PermissionUser::getPermission('Edit Customer Quotation', Auth::user()->id);
            $PermissionsDeleteCustomerQuotation  = App\Models\PermissionUser::getPermission('Delete Customer Quotation', Auth::user()->id);

            $PermissionsSalesOrder  = App\Models\PermissionUser::getPermission('Sales Order', Auth::user()->id);
            $PermissionsAddSalesOrder  = App\Models\PermissionUser::getPermission('Add Sales Order', Auth::user()->id);
            $PermissionsEditSalesOrder  = App\Models\PermissionUser::getPermission('Edit Sales Order', Auth::user()->id);
            $PermissionsDeleteSalesOrder  = App\Models\PermissionUser::getPermission('Delete Sales Order', Auth::user()->id);

            $PermissionsCustomerInvoice  = App\Models\PermissionUser::getPermission('Customer Invoice', Auth::user()->id);
            $PermissionsAddCustomerInvoice  = App\Models\PermissionUser::getPermission('Add Customer Invoice', Auth::user()->id);
            $PermissionsEditCustomerInvoice  = App\Models\PermissionUser::getPermission('Edit Customer Invoice', Auth::user()->id);
            $PermissionsDeleteCustomerInvoice  = App\Models\PermissionUser::getPermission('Delete Customer Invoice', Auth::user()->id);

            $PermissionsCreditNote  = App\Models\PermissionUser::getPermission('Credit Note', Auth::user()->id);
            $PermissionsAddCreditNote  = App\Models\PermissionUser::getPermission('Add Credit Note', Auth::user()->id);
            $PermissionsEditCreditNote  = App\Models\PermissionUser::getPermission('Edit Credit Note', Auth::user()->id);
            $PermissionsDeleteCreditNote  = App\Models\PermissionUser::getPermission('Delete Credit Note', Auth::user()->id);

            $PermissionsDebitNote  = App\Models\PermissionUser::getPermission('Debit Note', Auth::user()->id);
            $PermissionsAddDebitNote  = App\Models\PermissionUser::getPermission('Add Debit Note', Auth::user()->id);
            $PermissionsEditDebitNote  = App\Models\PermissionUser::getPermission('Edit Debit Note', Auth::user()->id);
            $PermissionsDeleteDebitNote  = App\Models\PermissionUser::getPermission('Delete Debit Note', Auth::user()->id);

            $PermissionsCustomerReceipting  = App\Models\PermissionUser::getPermission('Customer Receipting', Auth::user()->id);
            $PermissionsAddCustomerReceipt  = App\Models\PermissionUser::getPermission('Add Customer Receipt', Auth::user()->id);
            $PermissionsEditCustomerReceipt  = App\Models\PermissionUser::getPermission('Edit Customer Receiptt', Auth::user()->id);
            $PermissionsDeleteCustomerReceipt  = App\Models\PermissionUser::getPermission('Delete Customer Receipt', Auth::user()->id);

            $PermissionsProcessSupplier  = App\Models\PermissionUser::getPermission('Process Supplier', Auth::user()->id);
            $PermissionsPurchaseOrder  = App\Models\PermissionUser::getPermission('Purchase Order', Auth::user()->id);
            $PermissionsAddPurchaseOrder  = App\Models\PermissionUser::getPermission('Add Purchase Order', Auth::user()->id);
            $PermissionsEditPurchaseOrder  = App\Models\PermissionUser::getPermission('Edit Purchase Order', Auth::user()->id);
            $PermissionsDeletePurchaseOrder  = App\Models\PermissionUser::getPermission('Delete Purchase Order', Auth::user()->id);

            $PermissionsGoodsReceivedVoucher  = App\Models\PermissionUser::getPermission('Goods Received Voucher', Auth::user()->id);
            $PermissionsAddGoodsReceivedVoucher  = App\Models\PermissionUser::getPermission('Add Goods Received Voucher', Auth::user()->id);
            $PermissionsEditGoodsReceivedVoucher  = App\Models\PermissionUser::getPermission('Edit Goods Received Voucher', Auth::user()->id);
            $PermissionsDeleteGoodsReceivedVoucher  = App\Models\PermissionUser::getPermission('Goods Received Voucher', Auth::user()->id);

            $PermissionsSupplierInvoice  = App\Models\PermissionUser::getPermission('Supplier Invoice', Auth::user()->id);
            $PermissionsAddSupplierInvoice  = App\Models\PermissionUser::getPermission('Add Supplier Invoice', Auth::user()->id);
            $PermissionsEditSupplierInvoice  = App\Models\PermissionUser::getPermission('Edit Supplier Invoice', Auth::user()->id);
            $PermissionsDeleteSupplierInvoice  = App\Models\PermissionUser::getPermission('Delete Supplier Invoice', Auth::user()->id);

            $PermissionsReturnandDebit  = App\Models\PermissionUser::getPermission('Return & Debit', Auth::user()->id);
            $PermissionsAddReturnandDebit  = App\Models\PermissionUser::getPermission('Add Return & Debit', Auth::user()->id);
            $PermissionsEditReturnandDebit  = App\Models\PermissionUser::getPermission('Edit Return & Debit', Auth::user()->id);
            $PermissionsDeleteReturnandDebit  = App\Models\PermissionUser::getPermission('Delete Return & Debit', Auth::user()->id);

            $PermissionsCreditToSupplier  = App\Models\PermissionUser::getPermission('Credit To Supplier', Auth::user()->id);
            $PermissionsAddCreditToSupplier  = App\Models\PermissionUser::getPermission('Add Credit To Supplier', Auth::user()->id);
            $PermissionsEditCreditToSupplier  = App\Models\PermissionUser::getPermission('Edit Credit To Supplier', Auth::user()->id);
            $PermissionsDeleteCreditToSupplier  = App\Models\PermissionUser::getPermission('Delete Credit To Supplier', Auth::user()->id);

            $PermissionsJournals  = App\Models\PermissionUser::getPermission('Journals', Auth::user()->id);
            $PermissionsCustomerJournal  = App\Models\PermissionUser::getPermission('Customer Journal', Auth::user()->id);
            $PermissionsAddCustomerJournals  = App\Models\PermissionUser::getPermission('Add Customer Journals', Auth::user()->id);
            $PermissionsEditCustomerJournals  = App\Models\PermissionUser::getPermission('Edit Customer Journals', Auth::user()->id);
            $PermissionsDeleteCustomerJournal  = App\Models\PermissionUser::getPermission('Delete Customer Journal', Auth::user()->id);

            $PermissionsSupplierJournal  = App\Models\PermissionUser::getPermission('Supplier Journal', Auth::user()->id);
            $PermissionsAddSupplierJournal  = App\Models\PermissionUser::getPermission('Add Supplier Journal', Auth::user()->id);
            $PermissionsEditSupplierJournal  = App\Models\PermissionUser::getPermission('Edit Supplier Journal', Auth::user()->id);
            $PermissionsDeleteSupplierJournal  = App\Models\PermissionUser::getPermission('Delete Supplier Journal', Auth::user()->id);

            $PermissionsInventoryJournal  = App\Models\PermissionUser::getPermission('Inventory  Journal', Auth::user()->id);
            $PermissionsAddInventoryJournal  = App\Models\PermissionUser::getPermission('Add Inventory Journal', Auth::user()->id);
            $PermissionsEditInventoryJournal  = App\Models\PermissionUser::getPermission('Add Inventory Journal', Auth::user()->id);
            $PermissionsDeleteInventoryJournal  = App\Models\PermissionUser::getPermission('Delete Inventory Journal', Auth::user()->id);

            $PermissionsGeneralJournal  = App\Models\PermissionUser::getPermission('General Journal', Auth::user()->id);
            $PermissionsAddGeneralJournal  = App\Models\PermissionUser::getPermission('Add General Journal', Auth::user()->id);
            $PermissionsEditGeneralJournal  = App\Models\PermissionUser::getPermission('Add General Journal', Auth::user()->id);
            $PermissionsDeleteGeneralJournal  = App\Models\PermissionUser::getPermission('Delete General Journal', Auth::user()->id);

            $PermissionsWarehouseTransfer  = App\Models\PermissionUser::getPermission('Warehouse Transfer', Auth::user()->id);
            $PermissionsAddWarehouseTransfer  = App\Models\PermissionUser::getPermission('Add Warehouse Transfer', Auth::user()->id);
            $PermissionsEditWarehouseTransfer  = App\Models\PermissionUser::getPermission('Edit Warehouse Transfer', Auth::user()->id);
            $PermissionsDeleteWarehouseTransfer  = App\Models\PermissionUser::getPermission('Delete Warehouse Transfer', Auth::user()->id);

            $PermissionsReports  = App\Models\PermissionUser::getPermission('Reports', Auth::user()->id);
            $PermissionsGeneralLedgerReports  = App\Models\PermissionUser::getPermission('General Ledger Reports', Auth::user()->id);
            $PermissionsGLTransactions  = App\Models\PermissionUser::getPermission('GL Transactions', Auth::user()->id);
            $PermissionsTaxReport  = App\Models\PermissionUser::getPermission('Tax Report', Auth::user()->id);
            $PermissionsCashbookReport  = App\Models\PermissionUser::getPermission('Cashbook Report', Auth::user()->id);
            $PermissionsProjectReport  = App\Models\PermissionUser::getPermission('Project Report', Auth::user()->id);
            $PermissionsIncomeStatementReport  = App\Models\PermissionUser::getPermission('Income Statement Report', Auth::user()->id);
            $PermissionsTrialBalanceReport  = App\Models\PermissionUser::getPermission('Trial Balance Report', Auth::user()->id);
            $PermissionsBalanceSheetReport  = App\Models\PermissionUser::getPermission('Balance Sheet Report', Auth::user()->id);
            $PermissionsCustomerReports  = App\Models\PermissionUser::getPermission('Customer Reports', Auth::user()->id);
            $PermissionsCustomerStatements  = App\Models\PermissionUser::getPermission('Customer Statements', Auth::user()->id);
            $PermissionsAgeAnalysisReport  = App\Models\PermissionUser::getPermission('Customer Age Analysis Report', Auth::user()->id);
            $PermissionsCustomerDailyTransactions  = App\Models\PermissionUser::getPermission('Customer Daily Transactions', Auth::user()->id);
            $PermissionsCustomerSalesCollection  = App\Models\PermissionUser::getPermission('Customer Sales Collection', Auth::user()->id);
            $PermissionsCustomerOutstandingSales  = App\Models\PermissionUser::getPermission('Customer Outstanding Sales', Auth::user()->id);
            $PermissionsInvoiceSummary  = App\Models\PermissionUser::getPermission('Invoice Summary', Auth::user()->id);
            $PermissionsCustomerListing  = App\Models\PermissionUser::getPermission('Customer Listing', Auth::user()->id);
            $PermissionsCustomerDocumentReprint  = App\Models\PermissionUser::getPermission('Customer Documents Reprint', Auth::user()->id);
            $PermissionsSupplierReports  = App\Models\PermissionUser::getPermission('Supplier Reports', Auth::user()->id);
            $PermissionsSupplierAgeAnalysisReport  = App\Models\PermissionUser::getPermission('Supplier Age Analysis Report', Auth::user()->id);
            $PermissionsPayments  = App\Models\PermissionUser::getPermission('Payments', Auth::user()->id);
            $PermissionsOutstandingPayments  = App\Models\PermissionUser::getPermission('Outstanding Payments', Auth::user()->id);
            $PermissionsSupplierInvoices  = App\Models\PermissionUser::getPermission('Supplier Invoices', Auth::user()->id);
            $PermissionsSupplierListing  = App\Models\PermissionUser::getPermission('Supplier Listing', Auth::user()->id);
            $PermissionsSupplierDocumentReprint  = App\Models\PermissionUser::getPermission('Supplier Document Reprint', Auth::user()->id);
            $PermissionsInventoryReports  = App\Models\PermissionUser::getPermission('Inventory Reports', Auth::user()->id);
            $PermissionsStockLevel  = App\Models\PermissionUser::getPermission('Stock Level', Auth::user()->id);
            $PermissionsStockMovement  = App\Models\PermissionUser::getPermission('Stock Movement', Auth::user()->id);
            $PermissionsWarehouseTransfers  = App\Models\PermissionUser::getPermission('Warehouse Transfers', Auth::user()->id);
            $PermissionsSalesAnalysis  = App\Models\PermissionUser::getPermission('Sales Analysis', Auth::user()->id);
            $PermissionsStockValuation  = App\Models\PermissionUser::getPermission('Stock Valuation', Auth::user()->id);
            $PermissionsStockManagement  = App\Models\PermissionUser::getPermission('Stock Management', Auth::user()->id);
            $PermissionsAdministration  = App\Models\PermissionUser::getPermission('Administration', Auth::user()->id);
            $PermissionsGeneralSettings  = App\Models\PermissionUser::getPermission('General Settings', Auth::user()->id);
            $PermissionsCompanyInformation  = App\Models\PermissionUser::getPermission('Company Information', Auth::user()->id);
            $PermissionsAddCompanyInformation  = App\Models\PermissionUser::getPermission('Add Company Information', Auth::user()->id);
            $PermissionsEditCompanyInformation  = App\Models\PermissionUser::getPermission('Edit Company Information', Auth::user()->id);
            $PermissionsDeleteCompanyInformation  = App\Models\PermissionUser::getPermission('Delete Company Information', Auth::user()->id);
            $PermissionsUserSettings  = App\Models\PermissionUser::getPermission('User Settings', Auth::user()->id);
            $PermissionsUsers  = App\Models\PermissionUser::getPermission('Users', Auth::user()->id);
            $PermissionsAddUsers  = App\Models\PermissionUser::getPermission('Add Users', Auth::user()->id);
            $PermissionsEditUsers  = App\Models\PermissionUser::getPermission('Edit Users', Auth::user()->id);
            $PermissionsDeleteUsers  = App\Models\PermissionUser::getPermission('Delete Users', Auth::user()->id);
            $PermissionsUserGroup  = App\Models\PermissionUser::getPermission('User Group', Auth::user()->id);
            $PermissionsAddUserGroup  = App\Models\PermissionUser::getPermission('Add User Group', Auth::user()->id);
            $PermissionsEditUserGroup  = App\Models\PermissionUser::getPermission('Edit User Group', Auth::user()->id);
            $PermissionsDeleteUserGroup  = App\Models\PermissionUser::getPermission('Delete User Group', Auth::user()->id);
            $PermissionsGroup  = App\Models\PermissionUser::getPermission('Group', Auth::user()->id);
            $PermissionsAddGroup  = App\Models\PermissionUser::getPermission('Add Group', Auth::user()->id);
            $PermissionsEditGroup  = App\Models\PermissionUser::getPermission('Edit Group', Auth::user()->id);
            $PermissionsDeleteGroup  = App\Models\PermissionUser::getPermission('Delete Group', Auth::user()->id);
            $PermissionsRoles  = App\Models\PermissionUser::getPermission('Roles', Auth::user()->id);
            $PermissionsAddRoles  = App\Models\PermissionUser::getPermission('AddRoles', Auth::user()->id);
            $PermissionsEditRoles  = App\Models\PermissionUser::getPermission('EditRoles', Auth::user()->id);
            $PermissionsDeleteRoles  = App\Models\PermissionUser::getPermission('DeleteRoles', Auth::user()->id);
        ?>

        <!-- Content Wrapper -->
        <div id="content-wrapper" class="d-flex flex-column">

            <!-- Main Content -->
            <div id="content">

                <!-- Topbar -->
                <!-- Topbar -->
                <nav class="navbar navbar-expand navbar-light topbar mb-4 static-top shadow"
                    style="background-color: #419a40; display: flex; justify-content: center; align-items: center;position: fixed; top: 0; left: 0; right: 0; z-index: 1000;">
                    <div class="container d-flex justify-content-center align-items-center" style="height: 100%;">
                        <h3 class="text-white m-0" style="font-weight: bold; text-align:center;  font-size: 1.1em;">
                            <a href="<?php echo e(url('/home')); ?>" style="color: white; ">
                                Melsoft Quanta<?php echo e($companyName ? ' - ' . $companyName : ''); ?>

                            </a>
                        </h3>
                    </div>

                    <!-- Topbar Navbar -->
                    <ul class="navbar-nav ml-auto">

                        <!-- Nav Item - Search Dropdown (Visible Only XS) -->
                        <li class="nav-item dropdown no-arrow d-sm-none">
                            <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button"
                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <i class="fas fa-search fa-fw"></i>
                            </a>
                            <!-- Dropdown - Messages -->
                            <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in"
                                aria-labelledby="searchDropdown">
                                <form class="form-inline mr-auto w-100 navbar-search">
                                    <div class="input-group">
                                        <input type="text" class="form-control bg-light border-0 small"
                                            placeholder="Search for..." aria-label="Search"
                                            aria-describedby="basic-addon2">
                                        <div class="input-group-append">
                                            <button class="btn btn-primary" type="button">
                                                <i class="fas fa-search fa-sm"></i>
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </li>

                        <div class="topbar-divider d-none d-sm-block"></div>

                        <!-- Nav Item - User Information -->
                        <li class="nav-item dropdown no-arrow">
                            <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
                                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <span class="mr-2 d-none d-lg-inline"
                                    style="font-weight: bold; font-size: 1.1em;"><?php echo e(Auth::user()->name); ?></span>
                                <img class="img-profile rounded-circle"
                                    src="<?php echo e(asset('assets/img/undraw_profile.svg')); ?>">
                            </a>
                            <!-- Dropdown - User Information -->
                            <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
                                aria-labelledby="userDropdown">
                                <a class="dropdown-item" href="#">
                                    <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
                                    Profile
                                </a>
                                <a class="dropdown-item" href="#">
                                    <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
                                    Settings
                                </a>
                                <a class="dropdown-item" href="#">
                                    <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
                                    Activity Log
                                </a>
                                <div class="dropdown-divider"></div>
                                <form action="<?php echo e(route('logout')); ?>" method="POST">
                                    <?php echo csrf_field(); ?>
                                    <a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
                                        <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                                        Logout
                                    </a>
                                </form>
                            </div>
                        </li>
                    </ul>
                </nav>

                <!-- Second Navbar (Menu) -->
                <nav class="navbar navbar-expand navbar-light second-navbar"
                    style="background-color: #018ca3; justify-content: center; align-items: center; position: fixed; top: 70px; left: 0; right: 0; z-index: 998;">
                    <div class="container">
                        <ul class="navbar-nav">
                            <!-- Keep all your menu items exactly as they were -->
                         <?php if(!empty($PermissionsEdit)): ?>
                            <li class="nav-item dropdown">

                                <a class="nav-link  text-white" href="#" id="dropdownLinkA" role="button"
                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
                                    style="font-weight: bold; font-size: 1.3em;">
                                    Edit <i class="fas fa-plus"></i>
                                </a>
                                <div class="dropdown-menu" style="background-color: #018ca3;" aria-labelledby="dropdownLinkA">

                                <?php if(!empty($PermissionsChartOfAccounts)): ?>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item " href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">Chart of
                                            accounts</a>
                                            <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty($PermissionsChartOfAccounts) &&!empty($PermissionsGeneralLedger)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('ledger.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">General
                                                ledger</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsChartOfAccounts) &&!empty($PermissionsAccountTypes)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('account_types.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Account
                                                types</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsChartOfAccounts) &&!empty($PermissionsDepartment)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('departments.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Departments</a>
                                            <?php endif; ?>
                                            </div>
                                    </div>
                                <?php endif; ?>
                                <div class="dropdown-divider"></div>
                                <?php if(!empty($PermissionsTransactionTypes)): ?>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">Transaction Types </a>
                                        <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty($PermissionsTransactionTypes) && !empty($PermissionsCustomersTType)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('customerTransactions.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Customers </a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsTransactionTypes) && !empty($PermissionsSupplierTType)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplierTransactions.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Suppliers</a>
                                            <?php endif; ?>

                                             <?php if(!empty($PermissionsTransactionTypes) && !empty($PermissionsInventoryTType)): ?>
                                            <div class="dropdown-divider"></div>
                                             <a class="dropdown-item" href="<?php echo e(route('inventoryTransactions.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Inventory </a>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                <?php endif; ?>
                                     <div class="dropdown-divider"></div>
                                 <?php if(!empty($PermissionsCustomers)): ?>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">Customers </a>
                                        <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty($PermissionsCustomers) && !empty($PermissionsCustomerAccount)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('customer.accounts.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Accounts </a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomers) && !empty($PermissionsCustomerCartegory)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('customer.categories.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Categories</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomers) && !empty($PermissionsCustomerAgeAnalysis)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('customer_ageing.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Age Analysis</a>
                                            <?php endif; ?>
                                            <?php if(!empty($PermissionsCustomers) && !empty($PermissionsCustomerSalesRep)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('sales.reps.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Sales Rep</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomers) && !empty($PermissionsCustomerAreas)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('areas.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Areas</a>
                                            <?php endif; ?>
                                            </div>

                                    </div>
                                <?php endif; ?>
                                <?php if(!empty($PermissionsTax)): ?>
                                 <div class="dropdown-divider"></div>
                                    <a class="dropdown-item" href="<?php echo e(route('payment_type.create')); ?>"
                                        style="font-weight: bold; font-size: 1.3em;color: white;">Payment Type
                                    </a>
                                <?php endif; ?>
                                <?php if(!empty($PermissionsSuppliers)): ?>
                                    <div class="dropdown-divider"></div>
                                    <div class="dropdown-submenu" style="position: relative;">

                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">Suppliers </a>

                                        <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty($PermissionsSuppliers) && !empty($PermissionsSupplierAccounts)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.accounts.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Accounts </a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsSuppliers) && !empty($PermissionsSupplierCategories)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.categories.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Categories</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsSuppliers) && !empty($PermissionsSupplierAgeAnalysis)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier_ageing.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Age Analysis</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsSuppliers) && !empty($PermissionsSupplierArea)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.areas.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Areas</a>
                                            <?php endif; ?>
                                            </div>
                                    </div>
                                <?php endif; ?>

                                <?php if(!empty($PermissionsCashbook)): ?>
                                        <div class="dropdown-divider"></div>
                                        <a class="dropdown-item" href="<?php echo e(route('cashbook.entries.create')); ?>"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">Cashbook
                                        </a>
                                    <?php endif; ?>

                                   <?php if(!empty($PermissionsInventory)): ?>
                                    <div class="dropdown-divider"></div>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">Inventory </a>
                                        <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty($PermissionsInventory) && !empty($PermissionsBinLocations)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.bin_locations.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Bin Locations </a>
                                            <?php endif; ?>
                                            <?php if(!empty($PermissionsInventory) && !empty($PermissionsCartegories)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.inventory_categories.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Categories</a>
                                            <?php endif; ?>

                                           <?php if(!empty($PermissionsInventory) && !empty($PermissionsItems)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.item_types.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Items</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsInventory) && !empty($PermissionsPriceListNames)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.price_list_names.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Price List Names</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsInventory) && !empty($PermissionsUOM)): ?>
                                                <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('uoms.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">UOM</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsInventory) && !empty($PermissionsUOMCartegories)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('uom_categories.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">UOM Categories</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsInventory) && !empty($PermissionsWarehouse)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.warehouses.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Warehouses</a>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    <?php endif; ?>

                                   <?php if(!empty($PermissionsMulticurrency)): ?>
                                    <div class="dropdown-divider"></div>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">Multicurrency</a>
                                        <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                           <?php if(!empty($PermissionsMulticurrency) && !empty($PermissionsCurrency)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('currency.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Add
                                                currency</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsMulticurrency) && !empty($PermissionsHomeCurrency)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('home_currency.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Home
                                                currency</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsMulticurrency) && !empty($PermissionsDailyRates)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('daily_rates.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Daily
                                                Rates</a>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                 <?php endif; ?>

                                <?php if(!empty($PermissionsTax)): ?>
                                 <div class="dropdown-divider"></div>
                                    <a class="dropdown-item" href="<?php echo e(route('tax.create')); ?>"
                                        style="font-weight: bold; font-size: 1.3em;color: white;">Tax
                                    </a>
                                <?php endif; ?>

                                <?php if(!empty($PermissionsProjects)): ?>
                                    <div class="dropdown-divider"></div>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="<?php echo e(route('projects.create')); ?>"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">Projects</a>
                                    </div>
                                <?php endif; ?>

                            </li>
                        <?php endif; ?>

                            <div class="vr mx-2"></div> <!-- Vertical Divider -->
                        <?php if(!empty($PermissionsProcessing)): ?>
                            <li class="nav-item dropdown">
                                <a class="nav-link  text-white" href="#" id="dropdownLinkB" role="button"
                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
                                    style="font-weight: bold; font-size: 1.3em;">
                                    Process <i class="fas fa-plus"></i>
                                </a>
                                <div class="dropdown-menu" style="background-color: #018ca3;" aria-labelledby="dropdownLinkB">
                                    <div class="dropdown-submenu" style="position: relative;">
                                     <?php if(!empty($PermissionsProcessing) && !empty($PermissionsProcessGeneralLedger)): ?>
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">General ledger</a>
                                     <?php endif; ?>
                                        <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                    <?php if(!empty($PermissionsProcessing) && !empty($PermissionsBankReconcilliation)): ?>
                                            <a class="dropdown-item" href="#"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Bank
                                                Reconcilliation</a>
                                    <?php endif; ?>
                                    <?php if(!empty($PermissionsProcessing) && !empty($PermissionsProcessCashbookReceipt)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('cashbook.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Cashbook</a>
                                    <?php endif; ?>
                                        </div>
                                    </div>
                                   <!-- Updated Dropdown Menu -->
                                    <?php if(!empty($PermissionsProcessCustomer)): ?>
                                   <div class="dropdown-divider"></div>
                                   <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">Customer</a>
                                        <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty($PermissionsProcessCustomer) && !empty($PermissionsCustomerQuotation)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('customer.quotation')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Quotation</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsProcessCustomer) && !empty($PermissionsSalesOrder)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('customer.sales-order')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Sales Order</a>
                                            <?php endif; ?>

                                             <?php if(!empty($PermissionsProcessCustomer) && !empty( $PermissionsCustomerInvoice)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('customer.invoice')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Invoice</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsProcessCustomer) && !empty($PermissionsCreditNote)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('customer.credit-note')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Credit Note</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsProcessCustomer) && !empty($PermissionsDebitNote)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('customer.debit-note')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Debit Note</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsProcessCustomer) && !empty($PermissionsCustomerReceipting)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('receipts.create')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Receipting</a>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                <?php endif; ?>
                                <?php if(!empty($PermissionsProcessSupplier)): ?>
                                    <!-- Updated Dropdown Menu -->
                                    <div class="dropdown-divider"></div>

                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#" style="font-weight: bold; font-size: 1.2em;color: white;">Supplier</a>
                                        <div class="dropdown-menu bg-primary" style="display: none; position: absolute; left: 100%; top: 0;">
                                             <?php if(!empty($PermissionsProcessSupplier) && !empty($PermissionsPurchaseOrder)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.purchase-order')); ?>" style="font-weight: bold; font-size: 1.2em;color: white;">Purchases Order</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsProcessSupplier) && !empty($PermissionsGoodsReceivedVoucher)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.goods-received')); ?>" style="font-weight: bold; font-size: 1.2em;color: white;">Goods Received Voucher</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsProcessSupplier) && !empty($PermissionsSupplierInvoice)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.sales-invoice')); ?>" style="font-weight: bold; font-size: 1.2em;color: white;">Supplier Invoice</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsProcessSupplier) && !empty($PermissionsReturnandDebit)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.returns-debit')); ?>" style="font-weight: bold; font-size: 1.2em;color: white;">Return & Debit</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsProcessSupplier) && !empty($PermissionsCreditToSupplier)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.credit-supplier')); ?>" style="font-weight: bold; font-size: 1.2em;color: white;">Credit to Supplier</a>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    <?php endif; ?>

                                    <?php if(!empty($PermissionsJournals)): ?>
                                    <div class="dropdown-divider"></div>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em; color: white;">Journals</a>
                                        <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty($PermissionsJournals) && !empty($PermissionsCustomerJournal)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('customer.journal.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Customer</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsJournals) && !empty($PermissionsSupplierJournal)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplier.journal.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Supplier</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsJournals) && !empty($PermissionsGeneralJournal)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('general.journal.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">General
                                                Journals</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsJournals) && !empty($PermissionsInventoryJournal)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('inventory.journal.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Inventory</a>
                                            <?php endif; ?>

                                        </div>
                                    </div>
                                    <?php endif; ?>

                                    <!-- Add Warehouse Transfer after Journals -->
                                    <?php if(!empty($PermissionsWarehouseTransfer)): ?>
                                    <div class="dropdown-divider"></div>
                                    <a class="dropdown-item" href="<?php echo e(route('warehouse.transfer')); ?>"
                                        style="font-weight: bold; font-size: 1.3em; color: white;">
                                        Warehouse Transfer
                                    </a>
                                    <?php endif; ?>
                                </div>
                            </li>
                            <?php endif; ?>

                            <?php if(!empty($PermissionsReports)): ?>
                            <div class="vr mx-2"></div> <!-- Vertical Divider -->

                            <li class="nav-item dropdown">
                                <a class="nav-link  text-white" href="#" id="dropdownLinkC" role="button"
                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
                                    style="font-weight: bold; font-size: 1.3em;">
                                    Reports <i class="fas fa-plus"></i>
                                </a>
                                <div class="dropdown-menu" style="background-color: #018ca3;" aria-labelledby="dropdownLinkC">

                                    <div class="dropdown-submenu" style="position: relative;">
                                        <?php if(!empty($PermissionsReports) && !empty($PermissionsGeneralLedgerReports)): ?>
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">General Ledger</a>
                                    <?php endif; ?>


                                    <div class="dropdown-menu bg-primary"
                                        style="display: none; position: absolute; left: 100%; top: 0;">
                                        <?php if(!empty($PermissionsReports) && !empty($PermissionsGLTransactions)): ?>
                                        <a class="dropdown-item" href="<?php echo e(route('glTransaction.index')); ?>"
                                            style="font-weight: bold; font-size: 1.2em;color: white;">GL Transactions</a>
                                    <?php endif; ?>
                                    <?php if(!empty($PermissionsReports) && !empty($PermissionsTaxReport)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('chartOfAccounts.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Chart of accounts</a>
                                    <?php endif; ?>
                                    <?php if(!empty($PermissionsReports) && !empty($PermissionsTaxReport)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('taxReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Tax</a>
                                    <?php endif; ?>

                                    <?php if(!empty($PermissionsReports) && !empty($PermissionsCashbookReport)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('cashbookDailyTransaction.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Cashbook</a>
                                    <?php endif; ?>

                                    <?php if(!empty($PermissionsReports) && !empty($PermissionsProjectReport)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('projectReports.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Projects</a>
                                    <?php endif; ?>

                                    <?php if(!empty($PermissionsReports) && !empty($PermissionsIncomeStatementReport)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="#"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Income Statement</a>
                                    <?php endif; ?>

                                    <?php if(!empty($PermissionsReports) && !empty($PermissionsBalanceSheetReport)): ?>
                                    <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="#"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Balance Sheet</a>
                                    <?php endif; ?>
                                    <?php if(!empty($PermissionsReports) && !empty($PermissionsTrialBalanceReport)): ?>
                                    <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="#"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Trial Balance</a>
                                        </div>
                                    </div>
                                    <?php endif; ?>

                                   <?php if(!empty($PermissionsCustomerReports)): ?>
                                    <div class="dropdown-divider"></div>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.2em;color: white;">Customers</a>

                                            <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsCustomerStatements)): ?>
                                            <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                            <a class="dropdown-item" href="<?php echo e(route('customerStatementReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Customer Statements</a>
                                            <?php endif; ?>
                                           <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsAgeAnalysisReport)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="#"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Age Analysis</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsCustomerDailyTransactions)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('customerDailyTransaction.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Daily Transactions</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsCustomerDailyTransactions)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('usersalesreport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">User Sales</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsCustomerDailyTransactions)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('inventorysalesreport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Inventory Sales</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsCustomerDailyTransactions)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('salesreport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Daily Sales</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsCustomerSalesCollection)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('salesCollectionReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Sales Collection</a>
                                            <?php endif; ?>
                                            <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsCustomerOutstandingSales)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('outstandingSalesReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Outstanding Sales</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsInvoiceSummary)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('invoiceSummaryReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Invoice Summary</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsCustomerListing)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('customerListingReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Customer Listing</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsCustomerReports) && !empty($PermissionsCustomerDocumentReprint)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('documentReprint.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Documents Reprint</a>
                                            <?php endif; ?>

                                       </div>
                                    </div>
                                    <?php endif; ?>

                                <?php if(!empty($PermissionsSupplierReports)): ?>
                                    <div class="dropdown-divider"></div>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.2em;color: white;">Suppliers</a>
                                        <div class="dropdown-menu bg-primary"style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty($PermissionsSupplierReports) && !empty($PermissionsSupplierAgeAnalysisReport)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('supplierStatementReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Supplier Statements</a>
                                            <?php endif; ?>
                                            <?php if(!empty($PermissionsSupplierReports) && !empty($PermissionsSupplierAgeAnalysisReport)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="#"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Age Analysis</a>
                                            <?php endif; ?>
                                            <?php if(!empty($PermissionsSupplierReports) && !empty($PermissionsSupplierAgeAnalysisReport)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplierDailyTransaction.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Daily Transactions</a>
                                            <?php endif; ?>
                                            <?php if(!empty($PermissionsSupplierReports) && !empty($PermissionsPayments)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplierPaymentsReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Payments</a>
                                            <?php endif; ?>
                                            <?php if(!empty($PermissionsSupplierReports) && !empty($PermissionsOutstandingPayments)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('outstandingPaymentsReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Outstanding Payments</a>
                                            <?php endif; ?>
                                            <?php if(!empty($PermissionsSupplierReports) && !empty($PermissionsSupplierInvoices)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplierInvoiceSummaryReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Supplier Invoices</a>
                                            <?php endif; ?>
                                            <?php if(!empty($PermissionsSupplierReports) && !empty($PermissionsSupplierListing)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplierListingReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Supplier Listing</a>
                                            <?php endif; ?>
                                            <?php if(!empty($PermissionsSupplierReports) && !empty($PermissionsSupplierDocumentReprint)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('supplierDocumentReprint.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Documents Reprint</a>
                                            <?php endif; ?>
                                          </div>
                                    </div>
                                    <?php endif; ?>

                                    <?php if(!empty($PermissionsInventoryReports)): ?>
                                    <div class="dropdown-divider"></div>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">Inventory</a>
                                        <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty($PermissionsInventoryReports) && !empty($PermissionsStockLevel)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('inventoryStockLevel.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Stock Level</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsInventoryReports) && !empty($PermissionsStockMovement)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('inventoryMovementReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Stock Movement</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsInventoryReports) && !empty($PermissionsWarehouseTransfers)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('warehouseTransferReport.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Warehouse Transfers</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsInventoryReports) && !empty($PermissionsSalesAnalysis)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('salesAnalysis.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Sales Analysis</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsInventoryReports) && !empty($PermissionsStockValuation)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('stockValuation.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Stock Valuation</a>
                                            <?php endif; ?>

                                            <?php if(!empty($PermissionsInventoryReports) && !empty($PermissionsStockManagement)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('stockManagement.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Stock Management</a>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    <?php endif; ?>

                                </div>
                            </li>
                            <?php endif; ?>

                            <div class="vr mx-2"></div> <!-- Vertical Divider -->
                            <?php if(!empty($PermissionsAdministration)): ?>
                            <li class="nav-item dropdown">
                                <a class="nav-link  text-white" href="#" id="dropdownLinkB" role="button"
                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
                                    style="font-weight: bold; font-size: 1.3em;">
                                    Adminstration <i class="fas fa-plus"></i>
                                </a>

                                <div class="dropdown-menu" style="background-color: #018ca3;" aria-labelledby="dropdownLinkB">
                                   <?php if(!empty ($PermissionsGeneralSettings)): ?>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">General Settings</a>
                                        <div class="dropdown-menu bg-primary"
                                            style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty ($PermissionsGeneralSettings) && !empty($PermissionsCompanyInformation)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('company-settings.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Company Information</a>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    <?php endif; ?>
                                    <div class="dropdown-divider"></div>
                                <?php if(!empty ($PermissionsUserSettings)): ?>
                                    <div class="dropdown-submenu" style="position: relative;">
                                        <a class="dropdown-item" href="#"
                                            style="font-weight: bold; font-size: 1.3em;color: white;">User Settings</a>
                                        <div class="dropdown-menu bg-primary"
                                         style="background-color: #018ca3;"   style="display: none; position: absolute; left: 100%; top: 0;">
                                            <?php if(!empty ($PermissionsUserSettings) && !empty($PermissionsUsers)): ?>
                                            <a class="dropdown-item" href="<?php echo e(route('users.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Users</a>
                                            <?php endif; ?>

                                            <?php if(!empty ($PermissionsUserSettings) && !empty($PermissionsGroup)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('groups.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Groups</a>
                                            <?php endif; ?>

                                            <?php if(!empty ($PermissionsUserSettings) && !empty($PermissionsRoles)): ?>
                                            <div class="dropdown-divider"></div>
                                            <a class="dropdown-item" href="<?php echo e(route('roles.index')); ?>"
                                                style="font-weight: bold; font-size: 1.2em;color: white;">Roles</a>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    <?php endif; ?>
                                </div>
                            </li>
                            <?php endif; ?>
                        </ul>
                    </div>
                </nav>
                <!-- End of Thirdbar -->


                <!-- Begin Page Content -->
                <?php echo $__env->yieldContent('content'); ?>
                <!-- /.container-fluid -->

            </div>
            <!-- End of Main Content -->

           <!-- Footer -->
            <footer class="sticky-footer bg-white" style="width: 100%; z-index: 10;">
                <div class="container my-auto">
                    <div class="copyright text-center my-auto">
                        <span>Copyright &copy; Melsoft Private Limited 2025</span>
                    </div>
                </div>
            </footer>


            <!-- End of Footer -->

        </div>
        <!-- End of Content Wrapper -->

    </div>
    <!-- End of Page Wrapper -->

    <!-- Scroll to Top Button-->
    <a class="scroll-to-top rounded" href="#page-top">
        <i class="fas fa-angle-up"></i>
    </a>

    <!-- Logout Modal-->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
    aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
                <button class="close" type="button" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
            <div class="modal-footer">
                <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>

                <!-- Hidden logout form -->
                <form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST" style="display: none;">
                    <?php echo csrf_field(); ?>
                </form>

                <!-- Logout button triggers POST form -->
                <a class="btn btn-primary" href="#"
                   onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
                    Logout
                </a>
            </div>
        </div>
    </div>
</div>


    <script>
    // Show/hide submenu on hover
    document.querySelectorAll('.dropdown-submenu').forEach(function(submenu) {
        submenu.addEventListener('mouseenter', function() {
            submenu.querySelector('.dropdown-menu').style.display = 'block';
        });
        submenu.addEventListener('mouseleave', function() {
            submenu.querySelector('.dropdown-menu').style.display = 'none';
        });
    });
    </script>
    <!-- Bootstrap core JavaScript-->
    <script src="<?php echo e(asset('assets/vendor/jquery/jquery.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/vendor/bootstrap/js/bootstrap.bundle.min.js')); ?>"></script>

    <!-- Core plugin JavaScript-->
    <script src="<?php echo e(asset('assets/vendor/jquery-easing/jquery.easing.min.js')); ?>"></script>

    <!-- Custom scripts for all pages-->
    <script src="<?php echo e(asset('assets/js/sb-admin-2.min.js')); ?>"></script>

    <!-- Page level plugins -->
    <script src="<?php echo e(asset('assets/vendor/chart.js/Chart.min.js')); ?>"></script>

    <!-- Page level custom scripts -->
    <script src="<?php echo e(asset('assets/js/demo/chart-area-demo.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/js/demo/chart-pie-demo.js')); ?>"></script>


</body>

</html>
<?php /**PATH /home/melsoftzimco/public_html/demo/resources/views/layouts/master.blade.php ENDPATH**/ ?>