-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `itrpos`
--

-- --------------------------------------------------------

--
-- Table structure for table `account_mappings`
--

CREATE TABLE IF NOT EXISTS `account_mappings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `mapping_code` varchar(50) NOT NULL,
  `mapping_name` varchar(100) NOT NULL,
  `account_id` int NOT NULL,
  `description` text,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mapping_code` (`mapping_code`),
  KEY `idx_mapping_code` (`mapping_code`),
  KEY `idx_account_id` (`account_id`),
  KEY `idx_is_active` (`is_active`)
) ENGINE=MyISAM AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `account_mappings`
--

INSERT INTO `account_mappings` (`id`, `mapping_code`, `mapping_name`, `account_id`, `description`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'rev_Sale', 'Sales Revenue', 1, 'Primary sales income', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(2, 'rev_Service', 'Service Income', 2, 'Service-related income', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(3, 'rev_Discount', 'Sales Discount', 3, 'Sales discounts given', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(4, 'rev_Return', 'Sales Return', 4, 'Sales returns and refunds', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(5, 'rev_Other', 'Other Income', 5, 'Miscellaneous income', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(6, 'exp_CostOfSales', 'Cost of Goods Sold', 6, 'Direct cost of inventory sold', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(7, 'ast_Cash', 'Cash in Hand', 20, 'Physical cash on hand', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(8, 'ast_Bank', 'Bank Accounts', 21, 'All bank accounts', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(9, 'ast_PettyCash', 'Petty Cash', 22, 'Petty cash fund', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(10, 'ast_Customer', 'Accounts Receivable', 23, 'Money owed by customers', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(11, 'ast_Stock', 'Inventory', 24, 'Stock and supplies', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(12, 'ast_Prepaid', 'Prepaid Expenses', 25, 'Prepaid rent, insurance, etc.', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(13, 'ast_TaxRecoverable', 'Tax Recoverable', 26, 'Input tax recoverable', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(14, 'ast_Equipment', 'Equipment', 28, 'Kitchen equipment, POS systems', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(15, 'ast_Furniture', 'Furniture and Fixtures', 29, 'Tables, chairs, decor', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(16, 'ast_Vehicles', 'Vehicles', 30, 'Delivery vehicles', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(17, 'ast_Buildings', 'Buildings', 31, 'Restaurant premises', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(18, 'ast_AccumulatedDepreciation', 'Accumulated Depreciation', 32, 'Accumulated depreciation', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(19, 'lib_Supplier', 'Accounts Payable', 34, 'Money owed to suppliers', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(20, 'lib_Accrued', 'Accrued Expenses', 35, 'Accrued wages, utilities', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(21, 'lib_Tax', 'Taxes Payable', 36, 'Sales tax, income tax', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(22, 'lib_Unearned', 'Unearned Revenue', 37, 'Advance payments received', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(23, 'eqt_Investment', 'Owner\'s Investment', 38, 'Initial and additional investments', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(24, 'eqt_RetainedEarnings', 'Retained Earnings', 39, 'Accumulated profits/losses', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(25, 'eqt_CurrentYear', 'Current Year Earnings', 40, 'Current year profit/loss', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(26, 'exp_Expenses', 'Operating Expenses', 7, 'All operating expenses', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(27, 'exp_Payroll', 'Payroll Expenses', 8, 'Wages and salaries', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(28, 'exp_Rent', 'Rent Expense', 9, 'Premises rent', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(29, 'exp_Utilities', 'Utilities', 10, 'Electricity, water, gas', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(30, 'exp_Marketing', 'Marketing', 11, 'Advertising and promotion', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(31, 'exp_Supplies', 'Supplies', 12, 'Operating supplies', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(32, 'exp_Maintenance', 'Maintenance', 13, 'Equipment maintenance', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(33, 'exp_Insurance', 'Insurance', 14, 'Business insurance', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(34, 'exp_ProfessionalFees', 'Professional Fees', 15, 'Legal, accounting fees', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(35, 'exp_BankCharges', 'Bank Charges', 16, 'Bank fees and charges', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(36, 'exp_Depreciation', 'Depreciation', 17, 'Asset depreciation', 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(37, 'exp_StockLoss', 'Stock Loss', 41, 'Account for tracking inventory losses and stock adjustments', 1, '2025-11-05 17:16:23', '2025-11-05 17:16:23');

-- --------------------------------------------------------

--
-- Table structure for table `account_transactions`
--

CREATE TABLE IF NOT EXISTS `account_transactions` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `branch_id` int NOT NULL DEFAULT '1',
  `sale_id` int DEFAULT NULL,
  `account_type` varchar(50) NOT NULL,
  `account_id` int DEFAULT NULL,
  `card_type_id` int DEFAULT NULL,
  `card_last_four` varchar(4) DEFAULT NULL,
  `card_transaction_ref` varchar(100) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `tip_amount` decimal(10,2) DEFAULT '0.00',
  `description` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`),
  KEY `account_id` (`account_id`),
  KEY `idx_account_type` (`account_type`),
  KEY `idx_account_transactions_store_id` (`store_id`),
  KEY `fk_account_transactions_branch` (`branch_id`),
  KEY `idx_card_type_id` (`card_type_id`),
  KEY `idx_card_last_four` (`card_last_four`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `account_types`
--

CREATE TABLE IF NOT EXISTS `account_types` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type_code` varchar(10) NOT NULL,
  `type_name` varchar(50) NOT NULL,
  `default_side` enum('DR','CR') NOT NULL,
  `description` text,
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `type_code` (`type_code`),
  KEY `idx_type_code` (`type_code`),
  KEY `idx_sort_order` (`sort_order`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `account_types`
--

INSERT INTO `account_types` (`id`, `type_code`, `type_name`, `default_side`, `description`, `sort_order`, `created_at`) VALUES
(1, 'AST', 'Assets', 'DR', 'All asset accounts', 1, '2025-11-05 17:16:22'),
(2, 'LBT', 'Liabilities', 'CR', 'All liability accounts', 2, '2025-11-05 17:16:22'),
(3, 'EQT', 'Equity', 'CR', 'All equity accounts', 3, '2025-11-05 17:16:22'),
(4, 'REV', 'Revenue', 'CR', 'All revenue accounts', 4, '2025-11-05 17:16:22'),
(5, 'EXP', 'Expenses', 'DR', 'All expense accounts', 5, '2025-11-05 17:16:22');

-- --------------------------------------------------------

--
-- Table structure for table `bank_accounts`
--

CREATE TABLE IF NOT EXISTS `bank_accounts` (
  `id` int NOT NULL AUTO_INCREMENT,
  `bank_name` varchar(100) NOT NULL,
  `account_title` varchar(150) NOT NULL,
  `chart_of_account_id` int DEFAULT NULL,
  `mapped_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `mapped_by` int DEFAULT NULL,
  `account_number` varchar(50) NOT NULL,
  `iban` varchar(50) DEFAULT NULL,
  `branch_name` varchar(100) DEFAULT NULL,
  `branch_code` varchar(50) DEFAULT NULL,
  `swift_code` varchar(50) DEFAULT NULL,
  `address` text,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_chart_of_account_id` (`chart_of_account_id`),
  KEY `idx_mapped_at` (`mapped_at`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `bom_components`
--

CREATE TABLE IF NOT EXISTS `bom_components` (
  `id` int NOT NULL AUTO_INCREMENT,
  `bom_id` int NOT NULL,
  `component_item_id` int NOT NULL,
  `quantity` decimal(12,6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `bom_id` (`bom_id`),
  KEY `component_item_id` (`component_item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `bom_master`
--

CREATE TABLE IF NOT EXISTS `bom_master` (
  `id` int NOT NULL AUTO_INCREMENT,
  `item_id` int NOT NULL,
  `description` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `item_id` (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `branch_info`
--

CREATE TABLE IF NOT EXISTS `branch_info` (
  `id` int NOT NULL AUTO_INCREMENT,
  `default_store_id` int DEFAULT NULL,
  `branch_name` varchar(255) DEFAULT NULL,
  `branch_code` varchar(20) DEFAULT NULL,
  `branch_address` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `license_key` varchar(100) DEFAULT NULL,
  `machine_id` varchar(255) DEFAULT NULL,
  `last_verified_at` datetime DEFAULT NULL,
  `license_cache` text,
  `ntn` varchar(30) DEFAULT NULL,
  `strn` varchar(30) DEFAULT NULL,
  `branch_phone` varchar(50) DEFAULT NULL,
  `province` varchar(100) DEFAULT 'Punjab',
  `is_active` tinyint(1) DEFAULT '1',
  `branch_type` enum('head_office','branch') DEFAULT 'branch',
  `is_default` tinyint(1) DEFAULT '0' COMMENT 'Default branch for this installation',
  PRIMARY KEY (`id`),
  UNIQUE KEY `branch_code` (`branch_code`),
  KEY `idx_branch_info_type` (`branch_type`),
  KEY `idx_branch_info_active` (`is_active`),
  KEY `idx_branch_info_default` (`is_default`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `card_types`
--

CREATE TABLE IF NOT EXISTS `card_types` (
  `id` int NOT NULL AUTO_INCREMENT,
  `card_code` varchar(50) NOT NULL,
  `card_name` varchar(100) NOT NULL,
  `display_name` varchar(100) DEFAULT NULL,
  `icon_class` varchar(100) DEFAULT 'fas fa-credit-card',
  `color_class` varchar(100) DEFAULT 'btn-outline-primary',
  `default_charge_rate` decimal(5,2) DEFAULT '0.00',
  `sort_order` int DEFAULT '0',
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `card_code` (`card_code`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `card_types`
--

INSERT INTO `card_types` (`id`, `card_code`, `card_name`, `display_name`, `icon_class`, `color_class`, `default_charge_rate`, `sort_order`, `is_active`, `created_at`) VALUES
(1, 'VISA', 'VISA', 'VISA Card', 'fab fa-cc-visa', 'btn-outline-primary', 0.00, 1, 1, '2025-11-05 17:16:38'),
(2, 'MASTER', 'MasterCard', 'MasterCard', 'fab fa-cc-mastercard', 'btn-outline-warning', 0.00, 2, 1, '2025-11-05 17:16:38'),
(3, 'QR', 'QR Code', 'QR Payment', 'fas fa-qrcode', 'btn-outline-success', 0.00, 3, 1, '2025-11-05 17:16:38');

-- --------------------------------------------------------

--
-- Table structure for table `categories`
--

CREATE TABLE IF NOT EXISTS `categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `icon` varchar(255) DEFAULT 'assets/img/categories/category-01.png',
  PRIMARY KEY (`id`),
  KEY `idx_icon` (`icon`(250))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `chart_of_accounts`
--

CREATE TABLE IF NOT EXISTS `chart_of_accounts` (
  `id` int NOT NULL AUTO_INCREMENT,
  `account_code` varchar(20) NOT NULL,
  `account_name` varchar(100) NOT NULL,
  `account_type` enum('asset','liability','equity','revenue','expense') NOT NULL,
  `account_category` enum('current_asset','fixed_asset','current_liability','long_term_liability','equity','revenue','cost_of_sales','operating_expense','other_expense') NOT NULL,
  `parent_account_id` int DEFAULT NULL,
  `account_level` int DEFAULT '1',
  `is_active` tinyint(1) DEFAULT '1',
  `description` text,
  `opening_balance` decimal(15,2) DEFAULT '0.00',
  `current_balance` decimal(15,2) DEFAULT '0.00',
  `store_id` int DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_code` (`account_code`),
  KEY `idx_account_code` (`account_code`),
  KEY `idx_account_type` (`account_type`),
  KEY `idx_store_id` (`store_id`),
  KEY `idx_is_active` (`is_active`)
) ENGINE=MyISAM AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `chart_of_accounts`
--

INSERT INTO `chart_of_accounts` (`id`, `account_code`, `account_name`, `account_type`, `account_category`, `parent_account_id`, `account_level`, `is_active`, `description`, `opening_balance`, `current_balance`, `store_id`, `created_at`, `updated_at`) VALUES
(1, '4000', 'Sales Revenue', 'revenue', 'revenue', NULL, 1, 1, 'Primary sales income', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(2, '4001', 'Service Income', 'revenue', 'revenue', NULL, 1, 1, 'Service-related income', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(3, '4002', 'Sales Discount', 'revenue', 'revenue', NULL, 1, 1, 'Sales discounts given', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(4, '4003', 'Sales Return', 'revenue', 'revenue', NULL, 1, 1, 'Sales returns and refunds', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(5, '4004', 'Other Income', 'revenue', 'revenue', NULL, 1, 1, 'Miscellaneous income', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(6, '5000', 'Cost of Goods Sold', 'expense', 'cost_of_sales', NULL, 1, 1, 'Direct cost of inventory sold', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(7, '6000', 'Operating Expenses', 'expense', 'operating_expense', NULL, 1, 1, 'All operating expenses', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(8, '6001', 'Payroll Expenses', 'expense', 'operating_expense', NULL, 2, 1, 'Wages and salaries', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(9, '6002', 'Rent Expense', 'expense', 'operating_expense', NULL, 2, 1, 'Premises rent', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(10, '6003', 'Utilities', 'expense', 'operating_expense', NULL, 2, 1, 'Electricity, water, gas', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(11, '6004', 'Marketing', 'expense', 'operating_expense', NULL, 2, 1, 'Advertising and promotion', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(12, '6005', 'Supplies', 'expense', 'operating_expense', NULL, 2, 1, 'Operating supplies', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(13, '6006', 'Maintenance', 'expense', 'operating_expense', NULL, 2, 1, 'Equipment maintenance', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(14, '6007', 'Insurance', 'expense', 'operating_expense', NULL, 2, 1, 'Business insurance', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(15, '6008', 'Professional Fees', 'expense', 'operating_expense', NULL, 2, 1, 'Legal, accounting fees', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(16, '6009', 'Bank Charges', 'expense', 'operating_expense', NULL, 2, 1, 'Bank fees and charges', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(17, '6010', 'Depreciation', 'expense', 'operating_expense', NULL, 2, 1, 'Asset depreciation', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(18, '1000', 'Current Assets', 'asset', 'current_asset', NULL, 1, 1, 'All current assets', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(19, '1100', 'Cash and Cash Equivalents', 'asset', 'current_asset', NULL, 2, 1, 'Cash and bank accounts', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(20, '1101', 'Cash in Hand', 'asset', 'current_asset', NULL, 3, 1, 'Physical cash on hand', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(21, '1102', 'Bank Accounts', 'asset', 'current_asset', NULL, 3, 1, 'All bank accounts', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(22, '1103', 'Petty Cash', 'asset', 'current_asset', NULL, 3, 1, 'Petty cash fund', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(23, '1200', 'Accounts Receivable', 'asset', 'current_asset', NULL, 2, 1, 'Money owed by customers', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(24, '1300', 'Inventory', 'asset', 'current_asset', NULL, 2, 1, 'Stock and supplies', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(25, '1400', 'Prepaid Expenses', 'asset', 'current_asset', NULL, 2, 1, 'Prepaid rent, insurance, etc.', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(26, '1500', 'Tax Recoverable', 'asset', 'current_asset', NULL, 2, 1, 'Input tax recoverable', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(27, '2000', 'Fixed Assets', 'asset', 'fixed_asset', NULL, 1, 1, 'All fixed assets', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(28, '2100', 'Equipment', 'asset', 'fixed_asset', NULL, 2, 1, 'Kitchen equipment, POS systems', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(29, '2200', 'Furniture and Fixtures', 'asset', 'fixed_asset', NULL, 2, 1, 'Tables, chairs, decor', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(30, '2300', 'Vehicles', 'asset', 'fixed_asset', NULL, 2, 1, 'Delivery vehicles', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(31, '2400', 'Buildings', 'asset', 'fixed_asset', NULL, 2, 1, 'Restaurant premises', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(32, '2500', 'Accumulated Depreciation', 'asset', 'fixed_asset', NULL, 2, 1, 'Accumulated depreciation', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(33, '3000', 'Current Liabilities', 'liability', 'current_liability', NULL, 1, 1, 'All current liabilities', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(34, '3100', 'Accounts Payable', 'liability', 'current_liability', NULL, 2, 1, 'Money owed to suppliers', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(35, '3200', 'Accrued Expenses', 'liability', 'current_liability', NULL, 2, 1, 'Accrued wages, utilities', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(36, '3300', 'Taxes Payable', 'liability', 'current_liability', NULL, 2, 1, 'Sales tax, income tax', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(37, '3400', 'Unearned Revenue', 'liability', 'current_liability', NULL, 2, 1, 'Advance payments received', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(38, '4100', 'Owner\'s Investment', 'equity', 'equity', NULL, 2, 1, 'Initial and additional investments', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(39, '4200', 'Retained Earnings', 'equity', 'equity', NULL, 2, 1, 'Accumulated profits/losses', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(40, '4300', 'Current Year Earnings', 'equity', 'equity', NULL, 2, 1, 'Current year profit/loss', 0.00, 0.00, 1, '2025-11-05 17:16:22', '2025-11-05 17:16:22'),
(41, '6011', 'Stock Loss', 'expense', 'operating_expense', NULL, 2, 1, 'Losses due to stock adjustments, damage, theft, or obsolescence', 0.00, 0.00, 1, '2025-11-05 17:16:23', '2025-11-05 17:16:23');

-- --------------------------------------------------------

--
-- Table structure for table `customers`
--

CREATE TABLE IF NOT EXISTS `customers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `primary_store_id` int DEFAULT NULL,
  `name` varchar(100) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `address` text,
  `is_walk_in` tinyint(1) DEFAULT '0',
  `ntn` varchar(20) DEFAULT NULL,
  `province` varchar(100) DEFAULT 'Punjab',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `discount_applied` enum('Y','N') DEFAULT 'N',
  `discount_rate` decimal(5,2) DEFAULT '0.00',
  `category_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_customers_store_id` (`primary_store_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` (`id`, `primary_store_id`, `name`, `phone`, `email`, `address`, `is_walk_in`, `ntn`, `province`, `active`, `discount_applied`, `discount_rate`, `category_id`, `created_at`) VALUES
(1, 1, 'Walk-in Customer', NULL, NULL, NULL, 1, NULL, 'Punjab', 1, 'N', 0.00, NULL, '2025-11-05 17:16:18');

-- --------------------------------------------------------

--
-- Table structure for table `customer_categories`
--

CREATE TABLE IF NOT EXISTS `customer_categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_name` varchar(100) NOT NULL,
  `description` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `category_name` (`category_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `cus_outstanding`
--

CREATE TABLE IF NOT EXISTS `cus_outstanding` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sale_id` int NOT NULL,
  `customer_id` int NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `status` enum('unpaid','partial','paid') DEFAULT 'unpaid',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`),
  KEY `customer_id` (`customer_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `cus_payments`
--

CREATE TABLE IF NOT EXISTS `cus_payments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `customer_id` int NOT NULL,
  `sale_id` int DEFAULT NULL,
  `amount_paid` decimal(10,2) NOT NULL,
  `payment_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `remarks` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`),
  KEY `customer_id` (`customer_id`),
  KEY `idx_cus_payments_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `delivery_orders`
--

CREATE TABLE IF NOT EXISTS `delivery_orders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `sale_id` int NOT NULL,
  `customer_id` int NOT NULL,
  `rider_id` int DEFAULT NULL,
  `delivery_status` enum('pending','out_for_delivery','delivered','cancelled') DEFAULT 'pending',
  `delivery_address` text,
  `delivery_time` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`),
  KEY `customer_id` (`customer_id`),
  KEY `rider_id` (`rider_id`),
  KEY `idx_delivery_orders_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `delivery_riders`
--

CREATE TABLE IF NOT EXISTS `delivery_riders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `assigned_store_id` int DEFAULT NULL,
  `name` varchar(100) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `vehicle_number` varchar(50) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_delivery_riders_store_id` (`assigned_store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `dinein_floors`
--

CREATE TABLE IF NOT EXISTS `dinein_floors` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `name` varchar(100) NOT NULL,
  `description` text,
  `is_active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `idx_dinein_floors_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `dinein_tables`
--

CREATE TABLE IF NOT EXISTS `dinein_tables` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `floor_id` int NOT NULL,
  `table_name` varchar(50) NOT NULL,
  `seats` int DEFAULT '4',
  `status` enum('available','occupied','reserved') DEFAULT 'available',
  `is_active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `floor_id` (`floor_id`),
  KEY `idx_dinein_tables_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `discounts`
--

CREATE TABLE IF NOT EXISTS `discounts` (
  `id` int NOT NULL AUTO_INCREMENT,
  `discount_name` varchar(100) NOT NULL,
  `discount_code` varchar(20) DEFAULT NULL,
  `discount_type` enum('percentage','fixed') NOT NULL,
  `discount_rate` decimal(10,2) NOT NULL,
  `discount_cap` decimal(10,2) DEFAULT NULL,
  `category_id` int DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `discount_code` (`discount_code`),
  KEY `idx_category_id` (`category_id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `discounts`
--

INSERT INTO `discounts` (`id`, `discount_name`, `discount_code`, `discount_type`, `discount_rate`, `discount_cap`, `category_id`, `is_active`, `created_at`, `updated_at`) VALUES
(1, '10% Off', 'DISCOUNT10', 'percentage', 10.00, NULL, NULL, 1, '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(2, '15% Off (Max Rs 500)', 'DISCOUNT15', 'percentage', 15.00, 500.00, NULL, 1, '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(3, 'Rs 100 Off', 'FIXED100', 'fixed', 100.00, NULL, NULL, 1, '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(4, 'Rs 200 Off (Max Rs 200)', 'FIXED200', 'fixed', 200.00, 200.00, NULL, 1, '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(5, '20% Off (Max Rs 1000)', 'DISCOUNT20', 'percentage', 20.00, 1000.00, NULL, 1, '2025-11-05 17:16:38', '2025-11-05 17:16:38');

-- --------------------------------------------------------

--
-- Table structure for table `discount_categories`
--

CREATE TABLE IF NOT EXISTS `discount_categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_name` varchar(100) NOT NULL,
  `display_order` int DEFAULT '0',
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `expenses`
--

CREATE TABLE IF NOT EXISTS `expenses` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `account_id` int NOT NULL,
  `remarks` text,
  `amount` decimal(10,2) NOT NULL,
  `expense_date` datetime DEFAULT CURRENT_TIMESTAMP,
  `payment_method` enum('cash','card','upi','bank') DEFAULT 'cash',
  `bank_account_id` int DEFAULT NULL,
  `journal_entry_id` int DEFAULT NULL,
  `status` enum('pending','approved','rejected','reversed') DEFAULT 'approved',
  `approved_by` int DEFAULT NULL,
  `approved_at` timestamp NULL DEFAULT NULL,
  `reversal_date` date DEFAULT NULL,
  `reversal_reason` text,
  `reversal_journal_id` int DEFAULT NULL,
  `rejection_reason` text,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`),
  KEY `bank_account_id` (`bank_account_id`),
  KEY `idx_expenses_store_id` (`store_id`),
  KEY `journal_entry_id` (`journal_entry_id`),
  KEY `idx_expenses_status` (`status`),
  KEY `idx_expenses_approved_by` (`approved_by`),
  KEY `idx_expenses_approved_at` (`approved_at`),
  KEY `idx_status` (`status`),
  KEY `idx_reversal_journal` (`reversal_journal_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `expense_accounts`
--

CREATE TABLE IF NOT EXISTS `expense_accounts` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id` int NOT NULL,
  `subcategory_id` int NOT NULL,
  `name` varchar(100) NOT NULL,
  `chart_of_account_id` int DEFAULT NULL,
  `mapped_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `mapped_by` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `category_id` (`category_id`),
  KEY `subcategory_id` (`subcategory_id`),
  KEY `idx_chart_of_account_id` (`chart_of_account_id`),
  KEY `idx_mapped_at` (`mapped_at`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `expense_categories`
--

CREATE TABLE IF NOT EXISTS `expense_categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `expense_subcategories`
--

CREATE TABLE IF NOT EXISTS `expense_subcategories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id` int NOT NULL,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `category_id` (`category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `fbr_config`
--

CREATE TABLE IF NOT EXISTS `fbr_config` (
  `id` int NOT NULL AUTO_INCREMENT,
  `is_enabled` tinyint(1) DEFAULT NULL,
  `api_url` varchar(255) DEFAULT NULL,
  `pos_id` bigint DEFAULT NULL,
  `usin` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `fbr_digital`
--

CREATE TABLE IF NOT EXISTS `fbr_digital` (
  `id` int NOT NULL AUTO_INCREMENT,
  `is_enabled` tinyint(1) DEFAULT '0',
  `api_url` varchar(255) DEFAULT NULL,
  `token` text,
  `mode` enum('sandbox','production') DEFAULT 'sandbox',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `fbr_invoices`
--

CREATE TABLE IF NOT EXISTS `fbr_invoices` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sale_id` int NOT NULL,
  `fbr_invoice_number` varchar(100) NOT NULL,
  `qr_code` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `fbr_logs`
--

CREATE TABLE IF NOT EXISTS `fbr_logs` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sale_id` int DEFAULT NULL,
  `response` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `fiscal_periods`
--

CREATE TABLE IF NOT EXISTS `fiscal_periods` (
  `id` int NOT NULL AUTO_INCREMENT,
  `period_code` varchar(50) DEFAULT NULL,
  `period_name` varchar(50) NOT NULL,
  `period_year` int DEFAULT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `is_closed` tinyint(1) DEFAULT '0',
  `period_status` varchar(50) DEFAULT 'Open',
  `closed_by` int DEFAULT NULL,
  `closed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_period_code` (`period_code`),
  KEY `idx_start_date` (`start_date`),
  KEY `idx_end_date` (`end_date`),
  KEY `idx_is_closed` (`is_closed`),
  KEY `idx_period_status` (`period_status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `fiscal_period_setup`
--

CREATE TABLE IF NOT EXISTS `fiscal_period_setup` (
  `start_year` varchar(50) NOT NULL,
  `start_month` int DEFAULT NULL,
  `start_day` int DEFAULT NULL,
  `month_count` int DEFAULT NULL,
  `open_year` int DEFAULT NULL,
  PRIMARY KEY (`start_year`),
  KEY `idx_open_year` (`open_year`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `hold_items`
--

CREATE TABLE IF NOT EXISTS `hold_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `hold_id` int DEFAULT NULL,
  `item_id` int DEFAULT NULL,
  `item_name` varchar(100) DEFAULT NULL,
  `quantity` int DEFAULT NULL,
  `unit_price` decimal(10,2) DEFAULT NULL,
  `tax_rate` decimal(5,2) DEFAULT NULL,
  `modifiers` text COMMENT 'JSON array of selected modifiers',
  `remarks` text,
  `void_status` enum('active','void') NOT NULL DEFAULT 'active',
  `template_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_hold_items_store_id` (`store_id`),
  KEY `idx_hold_id_item` (`hold_id`,`item_id`),
  KEY `idx_void_status` (`void_status`),
  KEY `idx_hold_void` (`hold_id`,`void_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `hold_orders`
--

CREATE TABLE IF NOT EXISTS `hold_orders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `customer_name` varchar(100) DEFAULT NULL,
  `customer_id` int DEFAULT NULL,
  `table_id` int DEFAULT NULL,
  `order_mode` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `total_amount` decimal(10,2) DEFAULT '0.00',
  `discount_id` int DEFAULT NULL,
  `order_taker_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_order_taker_id` (`order_taker_id`),
  KEY `idx_hold_orders_store_id` (`store_id`),
  KEY `idx_table_id_created` (`table_id`,`created_at`),
  KEY `idx_order_mode_table` (`order_mode`,`table_id`),
  KEY `idx_customer_id` (`customer_id`),
  KEY `idx_discount_id` (`discount_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `inventory_movements`
--

CREATE TABLE IF NOT EXISTS `inventory_movements` (
  `id` int NOT NULL AUTO_INCREMENT,
  `item_id` int NOT NULL,
  `store_id` int DEFAULT NULL,
  `branch_id` int NOT NULL DEFAULT '1',
  `movement_type` enum('in','out','adjustment') NOT NULL,
  `reference_type` enum('purchase','sale','manual','other','sale_return','purchase_return','stock_transfer_out','stock_transfer_in','production','opening_balance') DEFAULT 'manual',
  `reference_id` int DEFAULT NULL,
  `quantity` decimal(12,6) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `item_id` (`item_id`),
  KEY `store_id` (`store_id`),
  KEY `idx_inventory_movements_branch_id` (`branch_id`),
  KEY `idx_inventory_movements_branch_store` (`branch_id`,`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `items`
--

CREATE TABLE IF NOT EXISTS `items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `item_code` varchar(50) NOT NULL,
  `sku_number` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `retail_price` decimal(10,2) NOT NULL,
  `cost_price` decimal(10,2) NOT NULL,
  `reorder_quantity` int DEFAULT '0',
  `reorder_level` int DEFAULT '0',
  `tax_type` enum('included','excluded','nil') NOT NULL,
  `tax_rate_id` int DEFAULT NULL,
  `category_id` int DEFAULT NULL,
  `sub_category_id` int DEFAULT NULL,
  `bulk_qty` int DEFAULT NULL,
  `bulk_price` decimal(10,2) DEFAULT NULL,
  `pkg_qty` int DEFAULT NULL,
  `uom_id` int NOT NULL,
  `item_type` enum('loose','bulk') NOT NULL DEFAULT 'loose',
  `product_image` varchar(255) DEFAULT NULL,
  `item_role` enum('stock','material','non_stock') NOT NULL DEFAULT 'stock',
  `is_serialized` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Whether this item requires serial number tracking',
  `prep_time` int DEFAULT NULL COMMENT 'Preparation time in minutes for KDS',
  PRIMARY KEY (`id`),
  UNIQUE KEY `item_code` (`item_code`),
  KEY `tax_rate_id` (`tax_rate_id`),
  KEY `category_id` (`category_id`),
  KEY `sub_category_id` (`sub_category_id`),
  KEY `uom_id` (`uom_id`),
  KEY `idx_items_is_serialized` (`is_serialized`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `item_modifiers`
--

CREATE TABLE IF NOT EXISTS `item_modifiers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `short_name` varchar(50) DEFAULT NULL COMMENT 'For kitchen display',
  `price_adjustment` decimal(10,2) DEFAULT '0.00' COMMENT 'Price to add/subtract from base item',
  `cost_adjustment` decimal(10,2) DEFAULT '0.00' COMMENT 'Cost impact for inventory',
  `is_default` tinyint(1) DEFAULT '0' COMMENT '1 = selected by default',
  `is_active` tinyint(1) DEFAULT '1',
  `sort_order` int DEFAULT '0',
  `prep_time_adjustment` int DEFAULT '0' COMMENT 'Additional prep time in minutes',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `is_active` (`is_active`),
  KEY `sort_order` (`sort_order`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `item_modifier_groups`
--

CREATE TABLE IF NOT EXISTS `item_modifier_groups` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `display_name` varchar(100) NOT NULL,
  `description` text,
  `is_required` tinyint(1) DEFAULT '0' COMMENT '1 = customer must choose an option',
  `is_multiple_choice` tinyint(1) DEFAULT '0' COMMENT '1 = customer can select multiple options',
  `max_selections` int DEFAULT NULL COMMENT 'Maximum selections allowed when multiple choice',
  `min_selections` int DEFAULT '1' COMMENT 'Minimum selections required',
  `is_active` tinyint(1) DEFAULT '1',
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `is_active` (`is_active`),
  KEY `sort_order` (`sort_order`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `item_modifier_group_assignments`
--

CREATE TABLE IF NOT EXISTS `item_modifier_group_assignments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `item_id` int NOT NULL,
  `modifier_group_id` int NOT NULL,
  `is_required` tinyint(1) DEFAULT '0' COMMENT 'Override group default for this item',
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `item_modifier_unique` (`item_id`,`modifier_group_id`),
  KEY `item_id` (`item_id`),
  KEY `modifier_group_id` (`modifier_group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `item_serials`
--

CREATE TABLE IF NOT EXISTS `item_serials` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `item_id` int UNSIGNED NOT NULL COMMENT 'FK to items.id',
  `serial_no` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Actual serial/IMEI/unique number',
  `details` text COLLATE utf8mb4_unicode_ci COMMENT 'Additional description',
  `cost_price` decimal(10,2) DEFAULT NULL COMMENT 'Purchase cost for this unit',
  `selling_price` decimal(10,2) DEFAULT NULL COMMENT 'Selling price for this unit',
  `warranty_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Warranty description',
  `warranty_expiry` date DEFAULT NULL COMMENT 'Warranty expiration date',
  `status_code` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'SIN' COMMENT 'Current status',
  `branch_id` int UNSIGNED DEFAULT NULL COMMENT 'Current location',
  `supplier_id` int UNSIGNED DEFAULT NULL COMMENT 'Original supplier',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_item_serial` (`item_id`,`serial_no`),
  KEY `idx_serial_item` (`item_id`),
  KEY `idx_serial_no` (`serial_no`),
  KEY `idx_serial_status` (`status_code`),
  KEY `idx_serial_branch` (`branch_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `item_serial_transactions`
--

CREATE TABLE IF NOT EXISTS `item_serial_transactions` (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `serial_id` bigint UNSIGNED NOT NULL COMMENT 'FK to item_serials.id',
  `item_id` int UNSIGNED NOT NULL COMMENT 'FK to items.id',
  `trans_type` varchar(3) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'GRN/SAL/RET/TRI/TRO/DMG/etc',
  `doc_type` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'purchase/sale/sale_return/transfer',
  `doc_id` bigint UNSIGNED NOT NULL COMMENT 'FK to purchase_items.id or sale_items.id',
  `header_id` bigint UNSIGNED DEFAULT NULL COMMENT 'FK to purchases.id or sales.id',
  `branch_id` int UNSIGNED DEFAULT NULL,
  `user_id` int UNSIGNED DEFAULT NULL,
  `remarks` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_st_serial` (`serial_id`),
  KEY `idx_st_item` (`item_id`),
  KEY `idx_st_type` (`trans_type`),
  KEY `idx_st_doc` (`doc_type`,`doc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `journal_entries`
--

CREATE TABLE IF NOT EXISTS `journal_entries` (
  `id` int NOT NULL AUTO_INCREMENT,
  `entry_number` varchar(20) NOT NULL,
  `entry_date` date NOT NULL,
  `period_id` int DEFAULT NULL,
  `transaction_date` date NOT NULL,
  `source_type` enum('sale','purchase','purchase_return','expense','payment','receipt','adjustment','manual','opening_balance') NOT NULL,
  `reference_id` int DEFAULT NULL,
  `description` text,
  `total_debit` decimal(15,2) DEFAULT '0.00',
  `total_credit` decimal(15,2) DEFAULT '0.00',
  `status` enum('draft','posted','void') DEFAULT 'draft',
  `store_id` int DEFAULT '1',
  `user_id` int NOT NULL,
  `posted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `entry_number` (`entry_number`),
  KEY `idx_entry_number` (`entry_number`),
  KEY `idx_entry_date` (`entry_date`),
  KEY `idx_source_type` (`source_type`),
  KEY `idx_reference_id` (`reference_id`),
  KEY `idx_status` (`status`),
  KEY `idx_store_id` (`store_id`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_period_id` (`period_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `journal_entry_lines`
--

CREATE TABLE IF NOT EXISTS `journal_entry_lines` (
  `id` int NOT NULL AUTO_INCREMENT,
  `journal_entry_id` int NOT NULL,
  `account_id` int NOT NULL,
  `debit_amount` decimal(15,2) DEFAULT '0.00',
  `credit_amount` decimal(15,2) DEFAULT '0.00',
  `description` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_journal_entry_id` (`journal_entry_id`),
  KEY `idx_account_id` (`account_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kds_activity_log`
--

CREATE TABLE IF NOT EXISTS `kds_activity_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `kds_order_id` int DEFAULT NULL,
  `kds_order_item_id` int DEFAULT NULL,
  `action` varchar(50) NOT NULL,
  `details` text,
  `description` text,
  `user_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `kds_order_id` (`kds_order_id`),
  KEY `kds_order_item_id` (`kds_order_item_id`),
  KEY `user_id` (`user_id`),
  KEY `created_at` (`created_at`),
  KEY `idx_kds_activity_log_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kds_cleanup_log`
--

CREATE TABLE IF NOT EXISTS `kds_cleanup_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `cleanup_date` datetime DEFAULT CURRENT_TIMESTAMP,
  `retention_days` int DEFAULT '7',
  `orders_deleted` int DEFAULT '0',
  `order_items_deleted` int DEFAULT '0',
  `activity_logs_deleted` int DEFAULT '0',
  `total_records_deleted` int DEFAULT '0',
  `execution_time_ms` int DEFAULT '0',
  `status` enum('success','failed','partial') DEFAULT 'success',
  `message` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_cleanup_date` (`cleanup_date`),
  KEY `idx_status` (`status`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `kds_cleanup_log`
--

INSERT INTO `kds_cleanup_log` (`id`, `cleanup_date`, `retention_days`, `orders_deleted`, `order_items_deleted`, `activity_logs_deleted`, `total_records_deleted`, `execution_time_ms`, `status`, `message`, `created_at`) VALUES
(1, '2025-11-05 22:16:15', 7, 0, 0, 0, 0, 0, 'success', 'KDS retention system initialized', '2025-11-05 17:16:15');

-- --------------------------------------------------------

--
-- Table structure for table `kds_orders`
--

CREATE TABLE IF NOT EXISTS `kds_orders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `sale_id` int NOT NULL,
  `hold_id` int DEFAULT NULL,
  `invoice_number` varchar(50) NOT NULL,
  `order_number` varchar(50) NOT NULL,
  `table_number` varchar(20) DEFAULT NULL,
  `customer_name` varchar(100) DEFAULT NULL,
  `order_type` enum('dine_in','take_away','delivery') NOT NULL DEFAULT 'dine_in',
  `order_status` enum('pending','preparing','ready','served','cancelled') NOT NULL DEFAULT 'pending',
  `priority` enum('normal','urgent','rush') NOT NULL DEFAULT 'normal',
  `estimated_time` int DEFAULT NULL COMMENT 'Estimated preparation time in minutes',
  `notes` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `prepared_at` timestamp NULL DEFAULT NULL,
  `served_at` timestamp NULL DEFAULT NULL,
  `created_by` int DEFAULT NULL,
  `prepared_by` int DEFAULT NULL,
  `served_by` int DEFAULT NULL,
  `order_taker_id` int DEFAULT NULL,
  `order_sequence` int DEFAULT '1',
  `parent_order_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_number` (`order_number`),
  KEY `sale_id` (`sale_id`),
  KEY `order_status` (`order_status`),
  KEY `priority` (`priority`),
  KEY `created_at` (`created_at`),
  KEY `hold_id` (`hold_id`),
  KEY `idx_order_taker_id` (`order_taker_id`),
  KEY `idx_kds_orders_store_id` (`store_id`),
  KEY `idx_parent_order` (`parent_order_id`),
  KEY `idx_sequence` (`order_sequence`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kds_order_items`
--

CREATE TABLE IF NOT EXISTS `kds_order_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `kds_order_id` int NOT NULL,
  `sale_item_id` int NOT NULL,
  `hold_item_id` int DEFAULT NULL,
  `item_id` int NOT NULL,
  `item_name` varchar(100) NOT NULL,
  `quantity` int NOT NULL,
  `unit_price` decimal(10,2) NOT NULL,
  `total_price` decimal(10,2) NOT NULL,
  `item_status` enum('pending','preparing','ready','served') NOT NULL DEFAULT 'pending',
  `special_instructions` text,
  `preparation_notes` text,
  `prepared_at` timestamp NULL DEFAULT NULL,
  `served_at` timestamp NULL DEFAULT NULL,
  `prepared_by` int DEFAULT NULL,
  `served_by` int DEFAULT NULL,
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `item_status_type` enum('original','new','quantity_changed') DEFAULT 'original',
  `served_quantity` int DEFAULT '0',
  `total_quantity` int DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `kds_order_id` (`kds_order_id`),
  KEY `sale_item_id` (`sale_item_id`),
  KEY `item_id` (`item_id`),
  KEY `item_status` (`item_status`),
  KEY `hold_item_id` (`hold_item_id`),
  KEY `idx_kds_order_items_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kds_settings`
--

CREATE TABLE IF NOT EXISTS `kds_settings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` text,
  `description` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `setting_key` (`setting_key`),
  KEY `idx_kds_settings_store_id` (`store_id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `kds_settings`
--

INSERT INTO `kds_settings` (`id`, `store_id`, `setting_key`, `setting_value`, `description`, `created_at`, `updated_at`) VALUES
(1, 1, 'auto_refresh_interval', '30', 'Auto refresh interval in seconds', '2025-08-17 14:35:24', '2025-11-05 17:16:17'),
(2, 1, 'sound_enabled', '1', 'Enable sound notifications', '2025-08-17 14:35:24', '2025-11-05 17:16:17'),
(3, 1, 'alert_duration', '10', 'Alert display duration in seconds', '2025-08-17 14:35:24', '2025-11-05 17:16:17'),
(4, 1, 'max_orders_display', '20', 'Maximum orders to display per station', '2025-08-17 14:35:24', '2025-11-05 17:16:17'),
(5, 1, 'order_timeout_minutes', '45', 'Order timeout in minutes', '2025-08-17 14:35:24', '2025-11-05 17:16:17'),
(6, 1, 'enable_priority_orders', '1', 'Enable priority order handling', '2025-08-17 14:35:24', '2025-11-05 17:16:17'),
(7, 1, 'enable_special_instructions', '1', 'Enable special instructions display', '2025-08-17 14:35:24', '2025-11-05 17:16:17'),
(8, 1, 'enable_preparation_notes', '1', 'Enable preparation notes', '2025-08-17 14:35:24', '2025-11-05 17:16:17'),
(9, 1, 'enable_estimated_time', '1', 'Enable estimated preparation time', '2025-08-17 14:35:24', '2025-11-05 17:16:17'),
(10, 1, 'enable_station_filtering', '1', 'Enable station-based filtering', '2025-08-17 14:35:24', '2025-11-05 17:16:17'),
(11, 1, 'enable_kds', '1', 'Enable KDS system', '2025-08-17 14:35:24', '2025-11-05 17:16:17');

-- --------------------------------------------------------

--
-- Table structure for table `kds_stations`
--

CREATE TABLE IF NOT EXISTS `kds_stations` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `name` varchar(100) NOT NULL,
  `description` text,
  `printer_id` int DEFAULT NULL,
  `enable_kot_print` tinyint(1) DEFAULT '1',
  `color` varchar(7) DEFAULT '#007bff',
  `is_active` tinyint(1) DEFAULT '1',
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `preparation_time` int DEFAULT '10',
  PRIMARY KEY (`id`),
  KEY `idx_kds_stations_store_id` (`store_id`),
  KEY `idx_printer_id` (`printer_id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `kds_stations`
--

INSERT INTO `kds_stations` (`id`, `store_id`, `name`, `description`, `printer_id`, `enable_kot_print`, `color`, `is_active`, `sort_order`, `created_at`, `preparation_time`) VALUES
(1, 1, 'Hot Kitchen', 'Main hot food preparation area', NULL, 1, '#dc3545', 1, 1, '2025-08-17 14:35:24', 10),
(2, 1, 'Cold Kitchen', 'Salads, cold dishes, and garnishes', NULL, 1, '#17a2b8', 1, 2, '2025-08-17 14:35:24', 10),
(3, 1, 'Grill Station', 'Grilled items and BBQ', NULL, 1, '#fd7e14', 1, 3, '2025-08-17 14:35:24', 10),
(4, 1, 'Fry Station', 'Deep fried items', NULL, 1, '#ffc107', 1, 4, '2025-08-17 14:35:24', 10),
(5, 1, 'Dessert Station', 'Desserts and sweets', NULL, 1, '#e83e8c', 1, 5, '2025-08-17 14:35:24', 10),
(6, 1, 'Beverage Station', 'Drinks and beverages', NULL, 1, '#6f42c1', 1, 6, '2025-08-17 14:35:24', 10);

-- --------------------------------------------------------

--
-- Table structure for table `kds_station_items`
--

CREATE TABLE IF NOT EXISTS `kds_station_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `station_id` int NOT NULL,
  `item_id` int NOT NULL,
  `preparation_time` int DEFAULT NULL COMMENT 'Estimated preparation time in minutes',
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `station_item_unique` (`station_id`,`item_id`),
  KEY `station_id` (`station_id`),
  KEY `item_id` (`item_id`),
  KEY `idx_kds_station_items_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kpra_config`
--

CREATE TABLE IF NOT EXISTS `kpra_config` (
  `id` int NOT NULL AUTO_INCREMENT,
  `is_enabled` tinyint(1) DEFAULT '0',
  `key` varchar(255) DEFAULT NULL,
  `business_id` varchar(50) DEFAULT NULL,
  `api_url` varchar(255) DEFAULT 'http://kpra.gov.pk/rims/integration/',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kpra_invoices`
--

CREATE TABLE IF NOT EXISTS `kpra_invoices` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sale_id` int NOT NULL,
  `kpra_invoice_number` varchar(100) NOT NULL,
  `qr_code_url` text,
  `qr_code_image` text,
  `response_status` varchar(10) DEFAULT NULL,
  `response_message` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kpra_logs`
--

CREATE TABLE IF NOT EXISTS `kpra_logs` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sale_id` int DEFAULT NULL,
  `request_data` text,
  `response_data` text,
  `status_code` varchar(10) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `languages`
--

CREATE TABLE IF NOT EXISTS `languages` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` varchar(5) NOT NULL,
  `name` varchar(50) NOT NULL,
  `native_name` varchar(50) NOT NULL,
  `flag` varchar(100) DEFAULT NULL,
  `rtl` tinyint(1) DEFAULT '0',
  `active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `languages`
--

INSERT INTO `languages` (`id`, `code`, `name`, `native_name`, `flag`, `rtl`, `active`, `created_at`) VALUES
(1, 'en', 'English', 'English', 'us.png', 0, 1, '2025-11-05 17:16:29'),
(2, 'fa', 'Persian', 'فارسی', 'ir.png', 1, 1, '2025-11-05 17:16:29'),
(3, 'ur', 'Urdu', 'اردو', 'pk.png', 1, 1, '2025-11-05 17:16:29'),
(4, 'ar', 'Arabic', 'العربية', 'sa.png', 1, 1, '2025-11-05 17:16:38');

-- --------------------------------------------------------

--
-- Table structure for table `modifier_group_assignments`
--

CREATE TABLE IF NOT EXISTS `modifier_group_assignments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `modifier_id` int NOT NULL,
  `modifier_group_id` int NOT NULL,
  `is_required` tinyint(1) DEFAULT '0' COMMENT 'Override group default for this modifier',
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `modifier_group_unique` (`modifier_id`,`modifier_group_id`),
  KEY `modifier_id` (`modifier_id`),
  KEY `modifier_group_id` (`modifier_group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `modifier_templates`
--

CREATE TABLE IF NOT EXISTS `modifier_templates` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `icon` varchar(50) DEFAULT 'layers',
  `is_active` tinyint(1) DEFAULT '1',
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `modifier_template_options`
--

CREATE TABLE IF NOT EXISTS `modifier_template_options` (
  `id` int NOT NULL AUTO_INCREMENT,
  `template_id` int NOT NULL,
  `name` varchar(100) NOT NULL,
  `price_adjustment` decimal(10,2) DEFAULT '0.00',
  `is_active` tinyint(1) DEFAULT '1',
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `order_takers`
--

CREATE TABLE IF NOT EXISTS `order_takers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `assigned_store_id` int DEFAULT NULL,
  `name` varchar(100) NOT NULL,
  `employee_id` varchar(50) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `commission_rate` decimal(5,2) DEFAULT '0.00',
  `password` varchar(255) NOT NULL,
  `user_id` int DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `employee_id` (`employee_id`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_employee_id` (`employee_id`),
  KEY `idx_order_takers_store_id` (`assigned_store_id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `order_takers`
--

INSERT INTO `order_takers` (`id`, `assigned_store_id`, `name`, `employee_id`, `phone`, `email`, `commission_rate`, `password`, `user_id`, `is_active`, `created_at`) VALUES
(1, 1, 'Default Order Taker', 'EMP001', '', '', 0.00, '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', NULL, 1, '2025-08-17 14:35:25'),
(2, 1, 'John Smith', 'EMP002', '+1234567890', 'john@example.com', 5.00, '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', NULL, 1, '2025-08-17 14:35:25'),
(3, 1, 'Sarah Johnson', 'EMP003', '+1234567891', 'sarah@example.com', 3.50, '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', NULL, 1, '2025-08-17 14:35:25'),
(4, 1, 'Mike Wilson', 'EMP004', '+1234567892', 'mike@example.com', 4.00, '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', NULL, 1, '2025-08-17 14:35:25');

-- --------------------------------------------------------

--
-- Stand-in structure for view `order_taker_summary`
-- (See below for the actual view)
--
DROP VIEW IF EXISTS `order_taker_summary`;
CREATE TABLE IF NOT EXISTS `order_taker_summary` (
`avg_completed_order` decimal(14,6)
,`avg_hold_order` decimal(14,6)
,`commission_rate` decimal(5,2)
,`employee_id` varchar(50)
,`id` int
,`name` varchar(100)
,`total_commission` decimal(41,8)
,`total_completed_amount` decimal(32,2)
,`total_completed_orders` bigint
,`total_hold_amount` decimal(32,2)
,`total_hold_orders` bigint
);

-- --------------------------------------------------------

--
-- Table structure for table `payment_methods`
--

CREATE TABLE IF NOT EXISTS `payment_methods` (
  `id` int NOT NULL AUTO_INCREMENT,
  `method_name` varchar(50) NOT NULL,
  `display_name` varchar(100) DEFAULT NULL,
  `icon_class` varchar(50) DEFAULT NULL,
  `color_class` varchar(50) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `requires_bank_account` tinyint(1) DEFAULT '0',
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `method_name` (`method_name`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `payment_methods`
--

INSERT INTO `payment_methods` (`id`, `method_name`, `display_name`, `icon_class`, `color_class`, `is_active`, `requires_bank_account`, `sort_order`, `created_at`) VALUES
(1, 'cash', 'Cash Payment', 'fas fa-money-bill-wave', 'btn-outline-success', 1, 0, 1, '2025-08-17 14:35:24'),
(2, 'card', 'Card Payment', 'fas fa-credit-card', 'btn-outline-primary', 1, 0, 2, '2025-08-17 14:35:24'),
(3, 'upi', 'UPI Payment', 'fas fa-mobile-alt', 'btn-outline-info', 1, 0, 3, '2025-08-17 14:35:24'),
(4, 'bank', 'Bank Transfer', 'fas fa-university', 'btn-outline-warning', 1, 1, 4, '2025-08-17 14:35:24'),
(5, 'credit', 'Credit Sale', 'fas fa-clock', 'btn-outline-secondary', 1, 0, 5, '2025-08-17 14:35:24');

-- --------------------------------------------------------

--
-- Table structure for table `payment_methods_backup`
--

CREATE TABLE IF NOT EXISTS `payment_methods_backup` (
  `id` int NOT NULL DEFAULT '0',
  `method_name` varchar(50) NOT NULL,
  `display_name` varchar(100) DEFAULT NULL,
  `icon_class` varchar(50) DEFAULT NULL,
  `color_class` varchar(50) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `requires_bank_account` tinyint(1) DEFAULT '0',
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `payment_methods_backup`
--

INSERT INTO `payment_methods_backup` (`id`, `method_name`, `display_name`, `icon_class`, `color_class`, `is_active`, `requires_bank_account`, `sort_order`, `created_at`) VALUES
(1, 'cash', 'Cash Payment', 'fas fa-money-bill-wave', 'btn-outline-success', 1, 0, 1, '2025-08-17 14:35:24'),
(2, 'card', 'Card Payment', 'fas fa-credit-card', 'btn-outline-primary', 1, 0, 2, '2025-08-17 14:35:24'),
(3, 'upi', 'UPI Payment', 'fas fa-mobile-alt', 'btn-outline-info', 1, 0, 3, '2025-08-17 14:35:24'),
(4, 'bank', 'Bank Transfer', 'fas fa-university', 'btn-outline-warning', 1, 1, 4, '2025-08-17 14:35:24'),
(5, 'credit', 'Credit Sale', 'fas fa-clock', 'btn-outline-secondary', 1, 0, 5, '2025-08-17 14:35:24');

-- --------------------------------------------------------

--
-- Table structure for table `payment_method_tax_rates`
--

CREATE TABLE IF NOT EXISTS `payment_method_tax_rates` (
  `id` int NOT NULL AUTO_INCREMENT,
  `payment_method` varchar(50) NOT NULL,
  `tax_rate` decimal(5,2) NOT NULL DEFAULT '0.00',
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `payment_method` (`payment_method`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `payment_method_tax_rates`
--

INSERT INTO `payment_method_tax_rates` (`id`, `payment_method`, `tax_rate`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'cash', 10.00, 1, '2025-11-05 17:16:15', '2025-11-05 17:16:15'),
(2, 'card', 6.00, 1, '2025-11-05 17:16:15', '2025-11-05 17:16:15'),
(3, 'upi', 6.00, 1, '2025-11-05 17:16:15', '2025-11-05 17:16:15'),
(4, 'bank', 6.00, 1, '2025-11-05 17:16:15', '2025-11-05 17:16:15'),
(5, 'credit', 0.00, 1, '2025-11-05 17:16:15', '2025-11-05 17:16:15');

-- --------------------------------------------------------

--
-- Table structure for table `price_history`
--

CREATE TABLE IF NOT EXISTS `price_history` (
  `id` int NOT NULL AUTO_INCREMENT,
  `item_id` int NOT NULL,
  `item_name` varchar(100) NOT NULL,
  `vendor_id` int DEFAULT NULL,
  `old_cost_price` decimal(10,2) DEFAULT NULL,
  `new_cost_price` decimal(10,2) DEFAULT NULL,
  `old_retail_price` decimal(10,2) DEFAULT NULL,
  `new_retail_price` decimal(10,2) DEFAULT NULL,
  `changed_by` varchar(100) DEFAULT NULL,
  `changed_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `print_devices`
--

CREATE TABLE IF NOT EXISTS `print_devices` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `connection_type` enum('usb','lan') NOT NULL,
  `print_type` enum('receipt','kot','barcode','quotation','shift_summary','all') DEFAULT 'all',
  `printer_name` varchar(100) DEFAULT NULL,
  `printer_type` enum('thermal','dot_matrix','laser','inkjet') DEFAULT 'thermal',
  `print_mode` enum('ask','auto','no') DEFAULT 'auto',
  `ip_address` varchar(100) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `is_default` tinyint(1) DEFAULT '0',
  `auto_detect` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_print_devices_type` (`print_type`),
  KEY `idx_print_devices_active` (`is_active`),
  KEY `idx_print_devices_default` (`is_default`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `print_devices`
--

INSERT INTO `print_devices` (`id`, `name`, `connection_type`, `print_type`, `printer_name`, `printer_type`, `print_mode`, `ip_address`, `is_active`, `is_default`, `auto_detect`, `created_at`) VALUES
(1, 'Counter Receipt Printer', 'usb', 'receipt', 'Microsoft Print to PDF', 'thermal', 'ask', NULL, 1, 1, 1, '2025-11-05 17:16:29'),
(2, 'Kitchen KOT Printer', 'lan', 'kot', 'Kitchen Printer', 'thermal', 'auto', NULL, 1, 1, 1, '2025-11-05 17:16:29'),
(3, 'Barcode Label Printer', 'usb', 'barcode', 'Microsoft Print to PDF', 'thermal', 'auto', NULL, 1, 0, 1, '2025-11-05 17:16:29');

-- --------------------------------------------------------

--
-- Table structure for table `production_items`
--

CREATE TABLE IF NOT EXISTS `production_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `production_order_id` int NOT NULL,
  `material_store_id` int DEFAULT NULL COMMENT 'Store to deduct materials from',
  `finish_store_id` int DEFAULT NULL COMMENT 'Store to add finished goods to',
  `item_id` int NOT NULL,
  `quantity` decimal(10,2) NOT NULL,
  `unit_cost` decimal(10,2) DEFAULT '0.00',
  `total_cost` decimal(10,2) DEFAULT '0.00',
  `status` enum('pending','completed') NOT NULL DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `production_order_id` (`production_order_id`),
  KEY `item_id` (`item_id`),
  KEY `status` (`status`),
  KEY `material_store_id` (`material_store_id`),
  KEY `finish_store_id` (`finish_store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `production_materials`
--

CREATE TABLE IF NOT EXISTS `production_materials` (
  `id` int NOT NULL AUTO_INCREMENT,
  `production_item_id` int NOT NULL,
  `material_item_id` int NOT NULL,
  `quantity_consumed` decimal(10,2) NOT NULL,
  `unit_cost` decimal(10,2) DEFAULT '0.00',
  `total_cost` decimal(10,2) DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `production_item_id` (`production_item_id`),
  KEY `material_item_id` (`material_item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `production_orders`
--

CREATE TABLE IF NOT EXISTS `production_orders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `order_number` varchar(50) NOT NULL,
  `production_date` date NOT NULL,
  `status` enum('pending','in_progress','completed','cancelled') NOT NULL DEFAULT 'pending',
  `remarks` text,
  `total_cost` decimal(10,2) DEFAULT '0.00',
  `created_by` int NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_number` (`order_number`),
  KEY `production_date` (`production_date`),
  KEY `status` (`status`),
  KEY `created_by` (`created_by`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `purchases`
--

CREATE TABLE IF NOT EXISTS `purchases` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `branch_id` int NOT NULL DEFAULT '1',
  `purchase_number` varchar(50) NOT NULL,
  `vendor_id` int NOT NULL,
  `purchase_date` datetime DEFAULT CURRENT_TIMESTAMP,
  `total_amount` decimal(10,2) NOT NULL,
  `tax_amount` decimal(10,2) DEFAULT '0.00',
  `discount_amount` decimal(10,2) DEFAULT '0.00',
  `net_amount` decimal(10,2) NOT NULL,
  `payment_method` enum('cash','card','upi','credit') DEFAULT 'cash',
  `status` varchar(20) DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `purchase_number` (`purchase_number`),
  KEY `vendor_id` (`vendor_id`),
  KEY `idx_purchases_store_id` (`store_id`),
  KEY `idx_purchases_branch_id` (`branch_id`),
  KEY `idx_purchases_branch_store` (`branch_id`,`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `purchase_items`
--

CREATE TABLE IF NOT EXISTS `purchase_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `purchase_id` int NOT NULL,
  `item_id` int NOT NULL,
  `item_name` varchar(100) NOT NULL,
  `quantity` int NOT NULL,
  `unit_cost` decimal(10,2) NOT NULL,
  `total_cost` decimal(10,2) NOT NULL,
  `tax_rate` decimal(5,2) DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `purchase_id` (`purchase_id`),
  KEY `item_id` (`item_id`),
  KEY `idx_purchase_items_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `purchase_returns`
--

CREATE TABLE IF NOT EXISTS `purchase_returns` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `purchase_id` int NOT NULL,
  `vendor_id` int NOT NULL,
  `return_date` datetime DEFAULT CURRENT_TIMESTAMP,
  `total_amount` decimal(10,2) NOT NULL,
  `remarks` varchar(255) DEFAULT NULL,
  `customer_remarks` varchar(255) DEFAULT NULL,
  `created_by` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `purchase_id` (`purchase_id`),
  KEY `vendor_id` (`vendor_id`),
  KEY `idx_purchase_returns_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `purchase_return_items`
--

CREATE TABLE IF NOT EXISTS `purchase_return_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `purchase_return_id` int NOT NULL,
  `item_id` int NOT NULL,
  `quantity` int NOT NULL,
  `unit_cost` decimal(10,2) NOT NULL,
  `total_cost` decimal(10,2) NOT NULL,
  `tax_rate` decimal(5,2) DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `purchase_return_id` (`purchase_return_id`),
  KEY `item_id` (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `quotations`
--

CREATE TABLE IF NOT EXISTS `quotations` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `quotation_number` varchar(50) NOT NULL,
  `customer_id` int DEFAULT NULL,
  `customer_name` varchar(100) DEFAULT NULL,
  `quotation_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `subtotal` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tax_amount` decimal(10,2) DEFAULT '0.00',
  `discount_amount` decimal(10,2) DEFAULT '0.00',
  `net_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `status` enum('draft','sent','accepted','rejected','expired','converted') DEFAULT 'draft',
  `remarks` text,
  `created_by` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `quotation_number` (`quotation_number`),
  KEY `idx_quotations_store_id` (`store_id`),
  KEY `idx_quotations_customer_id` (`customer_id`),
  KEY `idx_quotations_status` (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `quotation_items`
--

CREATE TABLE IF NOT EXISTS `quotation_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `quotation_id` int NOT NULL,
  `item_id` int NOT NULL,
  `item_name` varchar(100) NOT NULL,
  `quantity` int NOT NULL,
  `unit_price` decimal(10,2) NOT NULL,
  `total_price` decimal(10,2) NOT NULL,
  `tax_rate` decimal(5,2) DEFAULT '0.00',
  `remarks` text,
  PRIMARY KEY (`id`),
  KEY `quotation_id` (`quotation_id`),
  KEY `item_id` (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rights`
--

CREATE TABLE IF NOT EXISTS `rights` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `description` text,
  `category` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=49 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `rights`
--

INSERT INTO `rights` (`id`, `name`, `description`, `category`) VALUES
(1, 'Create User', '', 'User Management'),
(2, 'Item List', '', 'Products'),
(3, 'Users List', '', 'User Management'),
(4, 'Add Item', '', 'Products'),
(5, 'View Taxes', '', 'Tax'),
(6, 'View Taxes', '', 'Tax'),
(7, 'Manage Categories', '', 'Products'),
(8, 'Create Customer', '', 'Customers'),
(9, 'Manage SubCategories', '', 'Products'),
(10, 'Create Taxes', '', 'Tax'),
(11, 'View Categories', '', 'Products'),
(12, 'Delete Items', '', 'Products'),
(13, 'Edit Items', '', 'Products'),
(14, 'Edit Taxes', '', 'Tax'),
(15, 'Add Expense', '', 'Expenses'),
(16, 'Add Purchase', '', 'Purchases'),
(17, 'Add Supplier', '', 'Vendors'),
(18, 'Assign Rights', '', 'User Rights'),
(19, 'Create Role', '', 'User Rights'),
(20, 'View Expense Accounts', '', 'Expenses'),
(21, 'Expense Categories', '', 'Expenses'),
(22, 'Expense List', '', 'Expenses'),
(23, 'Access POS', '', 'POS'),
(24, 'Sales Report', '', 'Reports'),
(25, 'Purchase Report', '', 'Reports'),
(26, 'Edit Sale Price in POS', 'Allows editing item prices during sale in POS', 'POS'),
(27, 'Daily Sales Report', 'View daily sales summary report', 'Reports'),
(28, 'Shift Report', 'View cashier shift reports', 'Reports'),
(29, 'Invoice Report', 'View detailed invoice reports', 'Reports'),
(30, 'Invoice Profit Report', 'View invoice profit analysis', 'Reports'),
(31, 'Itemwise Sales Report', 'View sales report by items', 'Reports'),
(32, 'Tax Wise Report', 'View tax summary reports', 'Reports'),
(33, 'Discount Report', 'View discount usage reports', 'Reports'),
(34, 'Void Orders Report', 'View voided orders report', 'Reports'),
(35, 'Sale Return Report', 'View sale returns report', 'Reports'),
(36, 'Purchase Return Report', 'View purchase returns report', 'Reports'),
(37, 'Order Taker Report', 'View order taker performance report', 'Reports'),
(38, 'Stock Balance Report', 'View current stock balance', 'Reports'),
(39, 'Stock Valuation Report', 'View stock valuation report', 'Reports'),
(40, 'Reorder Report', 'View items that need reordering', 'Reports'),
(41, 'Item Cost Report', 'View item cost analysis', 'Reports'),
(42, 'Item Ledger Report', 'View item transaction ledger', 'Reports'),
(43, 'Item Modifier Report', 'View item modifiers usage report', 'Reports'),
(44, 'KDS Order Report', 'View kitchen display orders report', 'Reports'),
(45, 'KPRA Sales Report', 'View KPRA integrated sales report', 'Reports'),
(46, 'Production Reports', 'View production and manufacturing reports', 'Reports'),
(47, 'Account Report', 'View account summary reports', 'Reports'),
(48, 'Financial Reports', 'View financial statements and reports', 'Reports');

-- --------------------------------------------------------

--
-- Table structure for table `roles`
--

CREATE TABLE IF NOT EXISTS `roles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`) VALUES
(1, 'Admin'),
(2, 'Cashier');

-- --------------------------------------------------------

--
-- Table structure for table `role_rights`
--

CREATE TABLE IF NOT EXISTS `role_rights` (
  `role_id` int NOT NULL,
  `right_id` int NOT NULL,
  PRIMARY KEY (`role_id`,`right_id`),
  KEY `right_id` (`right_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `role_rights`
--

INSERT INTO `role_rights` (`role_id`, `right_id`) VALUES
(1, 1),
(1, 2),
(1, 3),
(1, 4),
(1, 5),
(1, 6),
(1, 7),
(1, 8),
(1, 9),
(1, 10),
(1, 11),
(1, 12),
(1, 13),
(1, 14),
(1, 15),
(1, 16),
(1, 17),
(1, 18),
(1, 19),
(1, 20),
(1, 21),
(1, 22),
(1, 23),
(1, 24),
(1, 25),
(1, 26),
(1, 27),
(1, 28),
(1, 29),
(1, 30),
(1, 31),
(1, 32),
(1, 33),
(1, 34),
(1, 35),
(1, 36),
(1, 37),
(1, 38),
(1, 39),
(1, 40),
(1, 41),
(1, 42),
(1, 43),
(1, 44),
(1, 45),
(1, 46),
(1, 47),
(1, 48),
(2, 23);

-- --------------------------------------------------------

--
-- Table structure for table `sales`
--

CREATE TABLE IF NOT EXISTS `sales` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `branch_id` int NOT NULL DEFAULT '1',
  `invoice_number` varchar(50) NOT NULL,
  `sale_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `customer_name` varchar(100) DEFAULT NULL,
  `customer_id` int DEFAULT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `tax_amount` decimal(10,2) DEFAULT '0.00',
  `discount_amount` decimal(10,2) DEFAULT '0.00',
  `discount_id` int DEFAULT NULL,
  `net_amount` decimal(10,2) NOT NULL,
  `payment_method` varchar(50) DEFAULT 'cash',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `shift_id` int DEFAULT NULL,
  `is_fbr_enabled` tinyint(1) DEFAULT '0',
  `is_kpra_enabled` tinyint(1) DEFAULT '0',
  `fbr_invoice_number` varchar(100) DEFAULT NULL,
  `kpra_invoice_number` varchar(100) DEFAULT NULL,
  `fbr_qr_data` text,
  `kpra_qr_code_url` text,
  `table_id` int DEFAULT NULL,
  `order_mode` varchar(50) DEFAULT NULL,
  `discount_type` enum('percent','fixed') DEFAULT NULL,
  `discount_value` decimal(10,2) DEFAULT '0.00',
  `delivery_charges` decimal(10,2) DEFAULT '0.00',
  `tip_amount` decimal(10,2) DEFAULT '0.00',
  `order_taker_id` int DEFAULT NULL,
  `void_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `invoice_number` (`invoice_number`),
  KEY `idx_payment_method` (`payment_method`),
  KEY `idx_order_taker_id` (`order_taker_id`),
  KEY `idx_kpra_enabled` (`is_kpra_enabled`),
  KEY `idx_kpra_invoice` (`kpra_invoice_number`),
  KEY `idx_sales_store_id` (`store_id`),
  KEY `idx_customer_id` (`customer_id`),
  KEY `idx_sales_branch_id` (`branch_id`),
  KEY `idx_sales_branch_store` (`branch_id`,`store_id`),
  KEY `idx_discount_id` (`discount_id`),
  KEY `idx_tip_amount` (`tip_amount`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sale_items`
--

CREATE TABLE IF NOT EXISTS `sale_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `sale_id` int NOT NULL,
  `item_id` int NOT NULL,
  `item_name` varchar(100) NOT NULL,
  `quantity` int NOT NULL,
  `unit_price` decimal(10,2) NOT NULL,
  `total_price` decimal(10,2) NOT NULL,
  `tax_rate` decimal(5,2) DEFAULT '0.00',
  `remarks` text,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`),
  KEY `item_id` (`item_id`),
  KEY `idx_sale_items_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sale_item_modifiers`
--

CREATE TABLE IF NOT EXISTS `sale_item_modifiers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sale_item_id` int NOT NULL,
  `modifier_id` int NOT NULL,
  `modifier_group_id` int NOT NULL,
  `modifier_name` varchar(100) NOT NULL COMMENT 'Store name for historical records',
  `price_adjustment` decimal(10,2) DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `sale_item_id` (`sale_item_id`),
  KEY `modifier_id` (`modifier_id`),
  KEY `modifier_group_id` (`modifier_group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sale_returns`
--

CREATE TABLE IF NOT EXISTS `sale_returns` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `sale_id` int NOT NULL,
  `customer_id` int NOT NULL,
  `return_date` datetime DEFAULT CURRENT_TIMESTAMP,
  `total_amount` decimal(10,2) NOT NULL,
  `remarks` varchar(255) DEFAULT NULL,
  `customer_remarks` varchar(255) DEFAULT NULL,
  `created_by` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`),
  KEY `customer_id` (`customer_id`),
  KEY `idx_sale_returns_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sale_return_items`
--

CREATE TABLE IF NOT EXISTS `sale_return_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sale_return_id` int NOT NULL,
  `item_id` int NOT NULL,
  `quantity` int NOT NULL,
  `unit_price` decimal(10,2) NOT NULL,
  `total_price` decimal(10,2) NOT NULL,
  `tax_rate` decimal(5,2) DEFAULT '0.00',
  PRIMARY KEY (`id`),
  KEY `sale_return_id` (`sale_return_id`),
  KEY `item_id` (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `settings`
--

CREATE TABLE IF NOT EXISTS `settings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `category_id` int NOT NULL,
  `name` varchar(100) NOT NULL,
  `code` varchar(100) NOT NULL,
  `type` enum('boolean','text','number','select') DEFAULT NULL,
  `value` text,
  `default_value` text,
  `description` text,
  `is_active` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `category_id` (`category_id`),
  KEY `idx_settings_store_id` (`store_id`)
) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `store_id`, `category_id`, `name`, `code`, `type`, `value`, `default_value`, `description`, `is_active`) VALUES
(1, NULL, 1, 'Print Customer Name', 'print_cus_name', 'boolean', NULL, '1', 'Print Customer Name on Print', 1),
(2, NULL, 1, 'Print KOT', 'print_kot', 'boolean', '1', '1', 'Print Kitchen Order Ticket (KOT)', 1),
(3, NULL, 4, 'Dine In', 'dine_in', 'boolean', '0', '1', 'Enable Dine In for table Orders', 1),
(4, NULL, 4, 'Take Away', 'take_away', 'boolean', '0', '1', 'Enable Take Away orders', 1),
(5, NULL, 4, 'Delivery', 'delivery', 'boolean', '0', '1', 'Delivery Orders', 1),
(6, NULL, 1, 'Receipt Font Size', 'receipt_font_size', 'number', '16', '16', NULL, 1),
(7, NULL, 1, 'Receipt Logo Width', 'receipt_logo_width', 'number', '100', '100', 'Width of the branch logo on printed receipts (in pixels)', 1),
(8, NULL, 5, 'Barcode Logo Width', 'barcode_logo_width', 'number', '80', '80', 'Width of the branch logo on printed barcodes (in pixels)', 1),
(9, NULL, 5, 'Display Barcode Logo', 'barcode_logo_display', 'boolean', '1', '1', 'Show or hide the branch logo on printed barcodes', 1),
(10, NULL, 6, 'Show Material Items on POS', 'show_material_items_on_pos', 'boolean', '0', '0', 'Show material items on POS item list', 1),
(11, NULL, 7, 'System Timezone', 'system_timezone', 'select', 'Asia/Karachi', 'Asia/Karachi', 'Set the timezone for all date and time operations in the system. This affects reports, logs, and all time-sensitive operations.', 1),
(12, NULL, 7, 'Date Display Format', 'date_display_format', 'select', 'Y-m-d', 'Y-m-d', 'Choose how dates are displayed throughout the system (YYYY-MM-DD, DD/MM/YYYY, etc.)', 1),
(13, NULL, 6, 'Display Images on POS', 'display_images_on_pos', 'boolean', '1', '1', 'Show product images on POS item cards', 1),
(14, NULL, 6, 'Enable Kitchen Display System', 'enable_kds', 'boolean', '1', '1', 'Enable Kitchen Display System for order management', 1),
(15, NULL, 6, 'KDS Auto Refresh', 'kds_auto_refresh', 'boolean', '1', '1', 'Enable automatic refresh for KDS screens', 1),
(16, NULL, 6, 'KDS Sound Notifications', 'kds_sound_notifications', 'boolean', '1', '1', 'Enable sound notifications for new orders', 1),
(17, NULL, 9, 'Tax Calculation Method', 'tax_calculation_method', 'select', 'item_wise', 'item_wise', 'Choose how taxes are calculated: item-wise (per item) or payment method based (uniform rate per payment type)', 1),
(18, NULL, 9, 'Show Payment Method Tax Rates', 'show_payment_method_tax_rates', 'boolean', '1', '1', 'Display tax rates for different payment methods on POS interface', 1),
(19, NULL, 9, 'Enable Tax Preview on Payment Selection', 'enable_tax_preview_on_payment', 'boolean', '1', '1', 'Show updated tax amount when payment method is selected (for payment method tax mode)', 1),
(20, NULL, 10, 'KDS Record Retention Days', 'kds_record_retention_days', 'number', '7', '7', 'Number of days to keep KDS records before automatic cleanup (1-90 days)', 1),
(21, NULL, 10, 'Enable KDS Auto Cleanup', 'kds_auto_cleanup_enabled', 'boolean', '1', '1', 'Enable automatic cleanup of old KDS records', 1),
(22, NULL, 10, 'KDS Last Cleanup Date', 'kds_last_cleanup_date', 'text', '', '', 'Timestamp of last KDS cleanup operation (system managed)', 0),
(23, NULL, 1, 'Print Customer Number', 'print_cus_number', 'boolean', '1', '1', 'Print Customer Phone Number on Print', 1),
(24, NULL, 1, 'Print Customer Address', 'print_cus_address', 'boolean', '1', '1', 'Print Customer Address on Print', 1),
(25, NULL, 1, 'Dealer Branding', 'dealer_branding', 'text', 'IT Resources | 📞 0311-391-7777', 'IT Resources | 📞 0311-391-7777', 'Dealer company name and contact info for receipt footer', 1),
(26, NULL, 1, 'Print Date and Time', 'print_datetime', 'boolean', '1', '1', 'Display date and time on printed receipts', 1),
(27, NULL, 1, 'Print Remarks', 'print_remarks', 'boolean', '1', '1', 'Display remarks/notes on printed receipts', 1),
(28, NULL, 1, 'Print Method', 'print_method', 'select', 'popup', 'popup', 'Choose print method: Popup (browser dialog) or Direct (use configured devices)', 1),
(29, NULL, 1, 'Global Print Mode', 'global_print_mode', 'select', 'ask', 'ask', 'Global print behavior: Ask (prompt user), Auto (direct print), No (no print)', 1),
(30, NULL, 7, 'Default Language', 'default_language', 'select', 'en', 'en', 'Default system language', 1),
(31, NULL, 7, 'Language Switcher', 'language_switcher_enabled', 'boolean', '1', '1', 'Enable language switcher in header', 1),
(32, NULL, 7, 'RTL Support', 'rtl_support_enabled', 'boolean', '1', '1', 'Enable RTL (Right-to-Left) support', 1),
(33, NULL, 11, 'Enable Expense Approval', 'expense_approval_enabled', 'boolean', '0', '0', 'When enabled, all new expenses will require approval before being processed', 1);

-- --------------------------------------------------------

--
-- Table structure for table `setting_categories`
--

CREATE TABLE IF NOT EXISTS `setting_categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `code` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `setting_categories`
--

INSERT INTO `setting_categories` (`id`, `name`, `code`) VALUES
(1, 'Print Settings', 'print_settings'),
(2, 'FBR Integration', 'integration'),
(3, 'FBR Digital Integration', 'fbr_digital_integration'),
(4, 'Sales Orders', 'sales_orders'),
(5, 'Barcode Settings', 'barcode_settings'),
(6, 'POS', 'pos'),
(7, 'System Settings', 'system_settings'),
(8, 'KPRA Integration', 'kpra_integration'),
(9, 'Tax Settings', 'tax_settings'),
(10, 'KDS', 'kds'),
(11, 'Accounts', 'accounts');

-- --------------------------------------------------------

--
-- Table structure for table `setting_options`
--

CREATE TABLE IF NOT EXISTS `setting_options` (
  `id` int NOT NULL AUTO_INCREMENT,
  `setting_id` int NOT NULL,
  `option_label` varchar(100) DEFAULT NULL,
  `option_value` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `setting_id` (`setting_id`)
) ENGINE=MyISAM AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `setting_options`
--

INSERT INTO `setting_options` (`id`, `setting_id`, `option_label`, `option_value`) VALUES
(1, 11, 'Pakistan (Karachi)', 'Asia/Karachi'),
(2, 11, 'Pakistan (Lahore)', 'Asia/Karachi'),
(3, 11, 'Pakistan (Islamabad)', 'Asia/Karachi'),
(4, 11, 'India (Mumbai)', 'Asia/Kolkata'),
(5, 11, 'India (Delhi)', 'Asia/Kolkata'),
(6, 11, 'Bangladesh (Dhaka)', 'Asia/Dhaka'),
(7, 11, 'Sri Lanka (Colombo)', 'Asia/Colombo'),
(8, 11, 'Nepal (Kathmandu)', 'Asia/Kathmandu'),
(9, 11, 'UAE (Dubai)', 'Asia/Dubai'),
(10, 11, 'Saudi Arabia (Riyadh)', 'Asia/Riyadh'),
(11, 11, 'Qatar (Doha)', 'Asia/Qatar'),
(12, 11, 'Kuwait (Kuwait City)', 'Asia/Kuwait'),
(13, 11, 'Bahrain (Manama)', 'Asia/Bahrain'),
(14, 11, 'Oman (Muscat)', 'Asia/Muscat'),
(15, 11, 'UK (London)', 'Europe/London'),
(16, 11, 'USA (New York)', 'America/New_York'),
(17, 11, 'USA (Los Angeles)', 'America/Los_Angeles'),
(18, 11, 'Canada (Toronto)', 'America/Toronto'),
(19, 11, 'Australia (Sydney)', 'Australia/Sydney'),
(20, 11, 'UTC (Universal Time)', 'UTC'),
(21, 12, 'YYYY-MM-DD (ISO)', 'Y-m-d'),
(22, 12, 'DD/MM/YYYY', 'd/m/Y'),
(23, 12, 'MM/DD/YYYY', 'm/d/Y'),
(24, 12, 'DD-MM-YYYY', 'd-m-Y'),
(25, 12, 'MM-DD-YYYY', 'm-d-Y'),
(26, 12, 'DD.MM.YYYY', 'd.m.Y'),
(27, 12, 'MM.DD.YYYY', 'm.d.Y'),
(28, 17, 'Item-wise Tax (Current)', 'item_wise'),
(29, 17, 'Payment Method Tax', 'payment_method'),
(30, 28, 'Popup (Browser Dialog)', 'popup'),
(31, 28, 'Direct to Device', 'direct'),
(32, 29, 'Ask User', 'ask'),
(33, 29, 'Auto Print', 'auto'),
(34, 29, 'No Print', 'no');

-- --------------------------------------------------------

--
-- Table structure for table `shifts`
--

CREATE TABLE IF NOT EXISTS `shifts` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `branch_id` int NOT NULL DEFAULT '1',
  `user_id` int NOT NULL,
  `start_time` datetime NOT NULL,
  `end_time` datetime DEFAULT NULL,
  `opening_cash` decimal(10,2) DEFAULT '0.00',
  `closing_cash` decimal(10,2) DEFAULT '0.00',
  `expected_cash` decimal(10,2) DEFAULT '0.00',
  `actual_cash` decimal(10,2) DEFAULT '0.00',
  `discrepancy` decimal(10,2) DEFAULT '0.00',
  `status` enum('open','closed') DEFAULT 'open',
  PRIMARY KEY (`id`),
  KEY `idx_shifts_store_id` (`store_id`),
  KEY `fk_shifts_branch` (`branch_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `shift_logs`
--

CREATE TABLE IF NOT EXISTS `shift_logs` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `shift_id` int NOT NULL,
  `action_type` enum('cash_in','cash_out','note') NOT NULL,
  `amount` decimal(10,2) DEFAULT '0.00',
  `note` text,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_shift_logs_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stock_adjustments`
--

CREATE TABLE IF NOT EXISTS `stock_adjustments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `adjustment_number` varchar(50) NOT NULL,
  `store_id` int NOT NULL,
  `adjustment_date` datetime DEFAULT CURRENT_TIMESTAMP,
  `total_items` int DEFAULT '0',
  `total_adjustment_value` decimal(12,2) DEFAULT '0.00',
  `total_current_stock_value` decimal(12,2) DEFAULT '0.00',
  `total_new_stock_value` decimal(12,2) DEFAULT '0.00',
  `remarks` text,
  `created_by` int NOT NULL,
  `journal_entry_id` int DEFAULT NULL COMMENT 'Reference to journal_entries table for financial tracking',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `adjustment_number` (`adjustment_number`),
  KEY `store_id` (`store_id`),
  KEY `adjustment_date` (`adjustment_date`),
  KEY `created_by` (`created_by`),
  KEY `journal_entry_id` (`journal_entry_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stock_adjustment_items`
--

CREATE TABLE IF NOT EXISTS `stock_adjustment_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `adjustment_id` int NOT NULL,
  `item_id` int NOT NULL,
  `item_name` varchar(100) NOT NULL,
  `current_quantity` decimal(12,6) NOT NULL,
  `adjustment_quantity` decimal(12,6) NOT NULL,
  `new_quantity` decimal(12,6) NOT NULL,
  `cost_price` decimal(10,2) NOT NULL,
  `current_stock_value` decimal(12,2) NOT NULL,
  `adjustment_value` decimal(12,2) NOT NULL,
  `new_stock_value` decimal(12,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `adjustment_id` (`adjustment_id`),
  KEY `item_id` (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stock_transfers`
--

CREATE TABLE IF NOT EXISTS `stock_transfers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `transfer_number` varchar(50) NOT NULL,
  `from_store_id` int NOT NULL,
  `to_store_id` int NOT NULL,
  `transfer_date` datetime DEFAULT CURRENT_TIMESTAMP,
  `status` enum('pending','approved','in_transit','received','cancelled') DEFAULT 'pending',
  `total_items` int DEFAULT '0',
  `total_quantity` decimal(12,6) DEFAULT '0.000000',
  `notes` text,
  `requested_by` int DEFAULT NULL,
  `approved_by` int DEFAULT NULL,
  `received_by` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `transfer_number` (`transfer_number`),
  KEY `from_store_id` (`from_store_id`),
  KEY `to_store_id` (`to_store_id`),
  KEY `status` (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stock_transfer_items`
--

CREATE TABLE IF NOT EXISTS `stock_transfer_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `to_store_id` int DEFAULT NULL,
  `from_store_id` int DEFAULT NULL,
  `transfer_id` int NOT NULL,
  `item_id` int NOT NULL,
  `item_name` varchar(100) NOT NULL,
  `quantity` decimal(12,6) NOT NULL,
  `cost_price` decimal(10,2) DEFAULT NULL,
  `remarks` text,
  PRIMARY KEY (`id`),
  KEY `transfer_id` (`transfer_id`),
  KEY `item_id` (`item_id`),
  KEY `idx_stock_transfer_items_from_store_id` (`from_store_id`),
  KEY `idx_stock_transfer_items_to_store_id` (`to_store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stores`
--

CREATE TABLE IF NOT EXISTS `stores` (
  `id` int NOT NULL AUTO_INCREMENT,
  `branch_id` int NOT NULL DEFAULT '1',
  `store_name` varchar(100) NOT NULL,
  `store_code` varchar(20) NOT NULL,
  `address` text,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `manager_name` varchar(100) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `is_default` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `store_code` (`store_code`),
  KEY `idx_stores_branch_id` (`branch_id`),
  KEY `idx_stores_active` (`is_active`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `stores`
--

INSERT INTO `stores` (`id`, `branch_id`, `store_name`, `store_code`, `address`, `phone`, `email`, `manager_name`, `is_active`, `is_default`, `created_at`) VALUES
(1, 1, 'Main Store', 'MAIN', 'Main Store Address', '', '', 'Store Manager', 1, 1, '2025-11-05 17:16:15');

-- --------------------------------------------------------

--
-- Table structure for table `store_inventory`
--

CREATE TABLE IF NOT EXISTS `store_inventory` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int NOT NULL,
  `item_id` int NOT NULL,
  `quantity` decimal(12,6) DEFAULT '0.000000',
  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `store_item_unique` (`store_id`,`item_id`),
  KEY `store_id` (`store_id`),
  KEY `item_id` (`item_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sub_categories`
--

CREATE TABLE IF NOT EXISTS `sub_categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id` int NOT NULL,
  `name` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `category_id` (`category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sup_outstanding`
--

CREATE TABLE IF NOT EXISTS `sup_outstanding` (
  `id` int NOT NULL AUTO_INCREMENT,
  `purchase_id` int NOT NULL,
  `vendor_id` int NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `status` enum('unpaid','partial','paid') DEFAULT 'unpaid',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sup_payments`
--

CREATE TABLE IF NOT EXISTS `sup_payments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `vendor_id` int NOT NULL,
  `purchase_id` int DEFAULT NULL,
  `amount_paid` decimal(10,2) NOT NULL,
  `discount_amount` decimal(10,2) DEFAULT '0.00',
  `payment_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `remarks` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_sup_payments_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sync_settings`
--

CREATE TABLE IF NOT EXISTS `sync_settings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `sync_allow` tinyint(1) DEFAULT '0' COMMENT 'Enable/disable synchronization',
  `db_prefix` varchar(50) DEFAULT NULL COMMENT 'Branch database prefix',
  `sync_mode` enum('HO','RM') DEFAULT 'HO' COMMENT 'HO=Head Office, RM=Remote',
  `server_name` varchar(100) DEFAULT NULL COMMENT 'Head office server IP/hostname',
  `database_name` varchar(100) DEFAULT NULL COMMENT 'Head office database name',
  `username` varchar(100) DEFAULT NULL COMMENT 'Database username',
  `password` varchar(255) DEFAULT NULL COMMENT 'Database password (encrypted)',
  `last_sync_date` datetime DEFAULT NULL COMMENT 'Last successful sync',
  `sync_status` enum('success','failed','pending') DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `table_transfer_logs`
--

CREATE TABLE IF NOT EXISTS `table_transfer_logs` (
  `id` int NOT NULL AUTO_INCREMENT,
  `source_table_id` int DEFAULT NULL,
  `target_table_id` int DEFAULT NULL,
  `hold_order_id` int DEFAULT NULL,
  `transferred_by` int DEFAULT NULL,
  `transfer_type` enum('transfer','merge') NOT NULL DEFAULT 'transfer',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_source_table` (`source_table_id`),
  KEY `idx_target_table` (`target_table_id`),
  KEY `idx_hold_order` (`hold_order_id`),
  KEY `idx_transferred_by` (`transferred_by`),
  KEY `idx_transfer_type` (`transfer_type`),
  KEY `idx_created_at` (`created_at`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tax_rates`
--

CREATE TABLE IF NOT EXISTS `tax_rates` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `rate` decimal(5,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tax_rates`
--

INSERT INTO `tax_rates` (`id`, `name`, `rate`) VALUES
(1, 'GST', 18.00),
(2, 'VAT', 15.00);

-- --------------------------------------------------------

--
-- Table structure for table `translations`
--

CREATE TABLE IF NOT EXISTS `translations` (
  `id` int NOT NULL AUTO_INCREMENT,
  `language_code` varchar(5) NOT NULL,
  `key` varchar(255) NOT NULL,
  `value` text NOT NULL,
  `context` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_translation` (`language_code`,`key`),
  KEY `language_code` (`language_code`),
  KEY `key` (`key`)
) ENGINE=InnoDB AUTO_INCREMENT=859 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `translations`
--

INSERT INTO `translations` (`id`, `language_code`, `key`, `value`, `context`, `created_at`, `updated_at`) VALUES
(1, 'en', 'dashboard', 'Dashboard', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(2, 'en', 'sales', 'Sales', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(3, 'en', 'purchases', 'Purchases', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(4, 'en', 'inventory', 'Inventory', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(5, 'en', 'reports', 'Reports', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(6, 'en', 'settings', 'Settings', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(7, 'en', 'users', 'Users', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(8, 'en', 'customers', 'Customers', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(9, 'en', 'suppliers', 'Suppliers', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(10, 'en', 'items', 'Items', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(11, 'en', 'categories', 'Categories', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(12, 'en', 'language_management', 'Language Management', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(13, 'en', 'features', 'Features', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(14, 'en', 'license_info', 'License Info', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(15, 'en', 'new_features', 'New Features', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(16, 'en', 'check_updates', 'Check For Updates', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(17, 'en', 'apply_update', 'Apply Update', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(18, 'en', 'item_modifiers', 'Item Modifiers', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(19, 'en', 'void_reasons', 'Void Reasons', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(20, 'en', 'quotations', 'Quotations', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(21, 'en', 'tables', 'Tables', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(22, 'en', 'floors', 'Floors', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(23, 'en', 'unit_of_measurement', 'Unit Of Measurement', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(24, 'en', 'stock_transfer', 'Stock Transfer', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(25, 'en', 'new_transfer_request', 'New Transfer Request', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(26, 'en', 'transfer_approval', 'Transfer Approval', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(27, 'en', 'stock_adjustment', 'Stock Adjustment', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(28, 'en', 'new_adjustment', 'New Adjustment', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(29, 'en', 'production', 'Production', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(30, 'en', 'users_permissions', 'Users & Permissions', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(31, 'en', 'order_takers', 'Order Takers', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(32, 'en', 'riders', 'Riders', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(33, 'en', 'delivery_orders', 'Delivery Orders', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(34, 'en', 'expense_list', 'Expense List', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(35, 'en', 'general_settings', 'General Settings', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(36, 'en', 'branch_settings', 'Branch Settings', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(37, 'en', 'store_management', 'Store Management', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(38, 'en', 'tax_rate', 'Tax Rate', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(39, 'en', 'add_new', 'Add New', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(40, 'en', 'edit', 'Edit', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(41, 'en', 'delete', 'Delete', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(42, 'en', 'save', 'Save', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(43, 'en', 'cancel', 'Cancel', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(44, 'en', 'search', 'Search', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(45, 'en', 'filter', 'Filter', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(46, 'en', 'export', 'Export', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(47, 'en', 'import', 'Import', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(48, 'en', 'update_translation', 'Update Translation', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(49, 'en', 'add_translation', 'Add Translation', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(50, 'en', 'update', 'Update', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(51, 'en', 'skip', 'Skip', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(52, 'en', 'void_order', 'Void Order', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(53, 'en', 'confirm', 'Confirm', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(54, 'en', 'close', 'Close', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(55, 'en', 'submit', 'Submit', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(56, 'en', 'reset', 'Reset', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(57, 'en', 'back', 'Back', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(58, 'en', 'next', 'Next', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(59, 'en', 'previous', 'Previous', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(60, 'en', 'finish', 'Finish', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(61, 'en', 'current_language', 'Current Language', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(62, 'en', 'available_languages', 'Available Languages', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(63, 'en', 'translation_key', 'Translation Key', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(64, 'en', 'translation_value', 'Translation Value', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(65, 'en', 'rtl_support', 'RTL Support', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(66, 'en', 'language_switcher', 'Language Switcher', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(67, 'en', 'context', 'Context', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(68, 'en', 'name', 'Name', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(69, 'en', 'email', 'Email', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(70, 'en', 'phone', 'Phone', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(71, 'en', 'address', 'Address', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(72, 'en', 'status', 'Status', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(73, 'en', 'actions', 'Actions', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(74, 'en', 'price', 'Price', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(75, 'en', 'quantity', 'Quantity', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(76, 'en', 'total', 'Total', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(77, 'en', 'subtotal', 'Subtotal', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(78, 'en', 'tax', 'Tax', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(79, 'en', 'discount', 'Discount', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(80, 'en', 'grand_total', 'Grand Total', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(81, 'en', 'order_list', 'Order List', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(82, 'en', 'delivery_charges', 'Delivery Charges', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(83, 'en', 'notes', 'Notes', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(84, 'en', 'translation_updated', 'Translation updated successfully', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(85, 'en', 'translation_added', 'Translation added successfully', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(86, 'en', 'invalid_language', 'Invalid language selected', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(87, 'en', 'success', 'Success', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(88, 'en', 'error', 'Error', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(89, 'en', 'warning', 'Warning', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(90, 'en', 'info', 'Information', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(91, 'en', 'confirm_delete', 'Are you sure you want to delete this item?', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(92, 'en', 'confirm_void', 'Are you sure you want to void this order?', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(93, 'en', 'no_data_found', 'No data found', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(94, 'en', 'loading', 'Loading...', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(95, 'en', 'please_wait', 'Please wait...', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(96, 'en', 'search_product', 'Search product...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(97, 'en', 'enter_notes', 'Enter any additional notes...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(98, 'en', 'enter_name', 'Enter name...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(99, 'en', 'enter_email', 'Enter email...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(100, 'en', 'enter_phone', 'Enter phone...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(101, 'en', 'enter_address', 'Enter address...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(102, 'en', 'enter_price', 'Enter price...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(103, 'en', 'enter_quantity', 'Enter quantity...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(104, 'en', 'manage_customers', 'Manage your customers', 'page_titles', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(105, 'en', 'manage_system_languages', 'Manage system languages and translations', 'page_titles', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(106, 'en', 'click_category_settings', 'Click a category to load its settings', 'page_titles', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(107, 'en', 'expenses', 'Expenses', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(108, 'en', 'expense_accounts', 'Expense Accounts', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(109, 'en', 'expense_categories', 'Expense Categories', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(110, 'en', 'accounts', 'Accounts', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(111, 'en', 'bank_accounts', 'Bank Accounts', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(112, 'en', 'payments', 'Payments', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(113, 'en', 'customer_payments', 'Customer Payments', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(114, 'en', 'supplier_payments', 'Supplier Payments', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(115, 'en', 'payment_methods', 'Payment Methods', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(116, 'en', 'financials', 'Financials', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(117, 'en', 'chart_of_accounts', 'Chart of Accounts', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(118, 'en', 'account_mappings', 'Account Mappings', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(119, 'en', 'journal_entries', 'Journal Entries', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(120, 'en', 'financial_periods', 'Financial Periods', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(121, 'en', 'trial_balance', 'Trial Balance', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(122, 'en', 'general_ledger', 'General Ledger', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(123, 'en', 'profit_loss', 'Profit & Loss', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(124, 'en', 'financial_reports', 'Financial Reports', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(125, 'en', 'hardware_devices', 'Hardware & Devices', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(126, 'en', 'print_devices', 'Print Devices', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(127, 'en', 'kds', 'KOT/KDS', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:51'),
(128, 'en', 'tablet_orders', 'Tablet Orders', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(129, 'en', 'database_backup', 'Database Backup', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(130, 'en', 'backup_management', 'Backup Management', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(131, 'en', 'restore_database', 'Restore Database', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(132, 'en', 'all', 'All', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(133, 'en', 'clear', 'Clear', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(134, 'en', 'navigation', 'Navigation', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(135, 'en', 'buttons', 'Buttons', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(136, 'en', 'labels', 'Labels', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(137, 'en', 'messages', 'Messages', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(138, 'en', 'placeholders', 'Placeholders', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(139, 'en', 'page_titles', 'Page Titles', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(140, 'en', 'sales_report', 'Sales Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(141, 'en', 'invoice_report', 'Invoice Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(142, 'en', 'invoice_wise_profit_report', 'Invoice Wise Profit Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(143, 'en', 'sale_return_report', 'Sale Return Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(144, 'en', 'day_wise_sale_summary', 'Day Wise Sale Summary', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(145, 'en', 'item_wise_sales_report', 'Item Wise Sales Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(146, 'en', 'item_modifier_report', 'Item Modifier Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(147, 'en', 'cashier_shift_report', 'Cashier Shift Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(148, 'en', 'tax_wise_report', 'Tax Wise Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(149, 'en', 'order_taker_report', 'Order Taker Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(150, 'en', 'void_orders_report', 'Void Orders Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(151, 'en', 'purchase_report', 'Purchase Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(152, 'en', 'stock_balance_report', 'Stock Balance Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(153, 'en', 'stock_valuation_report', 'Stock Valuation Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(154, 'en', 'item_ledger_report', 'Item Ledger Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(155, 'en', 'production_report', 'Production Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(156, 'en', 'purchase_return_report', 'Purchase Return Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(157, 'en', 'customer_ledger', 'Customer Ledger', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(158, 'en', 'customer_statement', 'Customer Statement', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(159, 'en', 'supplier_ledger', 'Supplier Ledger', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(160, 'en', 'supplier_statement', 'Supplier Statement', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(161, 'en', 'profit_loss_report', 'Net Profit Analysis', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:45'),
(162, 'en', 'account_ledger', 'Account Ledger', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(163, 'en', 'accounts_report', 'Accounts Report', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(164, 'fa', 'dashboard', 'داشبورد', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(165, 'fa', 'sales', 'فروش', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(166, 'fa', 'purchases', 'خرید', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(167, 'fa', 'inventory', 'موجودی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(168, 'fa', 'reports', 'گزارشات', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(169, 'fa', 'settings', 'تنظیمات', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(170, 'fa', 'users', 'کاربران', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(171, 'fa', 'customers', 'مشتریان', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(172, 'fa', 'suppliers', 'تامین کنندگان', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(173, 'fa', 'items', 'اقلام', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(174, 'fa', 'categories', 'دسته بندی ها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(175, 'fa', 'language_management', 'مدیریت زبان', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(176, 'fa', 'features', 'ویژگی ها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(177, 'fa', 'license_info', 'اطلاعات مجوز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(178, 'fa', 'new_features', 'ویژگی های جدید', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(179, 'fa', 'check_updates', 'بررسی به روزرسانی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(180, 'fa', 'apply_update', 'اعمال به روزرسانی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(181, 'fa', 'item_modifiers', 'تغییرات اقلام', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(182, 'fa', 'void_reasons', 'دلایل لغو', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(183, 'fa', 'quotations', 'پیش فاکتورها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(184, 'fa', 'tables', 'جداول', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(185, 'fa', 'floors', 'طبقات', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(186, 'fa', 'unit_of_measurement', 'واحد اندازه گیری', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(187, 'fa', 'stock_transfer', 'انتقال موجودی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(188, 'fa', 'new_transfer_request', 'درخواست انتقال جدید', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(189, 'fa', 'transfer_approval', 'تایید انتقال', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(190, 'fa', 'stock_adjustment', 'تنظیم موجودی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(191, 'fa', 'new_adjustment', 'تنظیم جدید', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(192, 'fa', 'production', 'تولید', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(193, 'fa', 'users_permissions', 'کاربران و مجوزها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(194, 'fa', 'order_takers', 'گیرندگان سفارش', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(195, 'fa', 'riders', 'رانندگان', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(196, 'fa', 'delivery_orders', 'سفارشات تحویل', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(197, 'fa', 'expense_list', 'لیست هزینه ها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(198, 'fa', 'general_settings', 'تنظیمات عمومی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(199, 'fa', 'branch_settings', 'تنظیمات شعبه', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(200, 'fa', 'store_management', 'مدیریت فروشگاه', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(201, 'fa', 'tax_rate', 'نرخ مالیات', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(202, 'fa', 'add_new', 'افزودن جدید', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(203, 'fa', 'edit', 'ویرایش', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(204, 'fa', 'delete', 'حذف', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(205, 'fa', 'save', 'ذخیره', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(206, 'fa', 'cancel', 'لغو', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(207, 'fa', 'search', 'جستجو', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(208, 'fa', 'filter', 'فیلتر', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(209, 'fa', 'export', 'صادرات', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(210, 'fa', 'import', 'واردات', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(211, 'fa', 'update_translation', 'به روزرسانی ترجمه', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(212, 'fa', 'add_translation', 'افزودن ترجمه', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(213, 'fa', 'update', 'به روزرسانی', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(214, 'fa', 'skip', 'رد کردن', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(215, 'fa', 'void_order', 'لغو سفارش', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(216, 'fa', 'confirm', 'تایید', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(217, 'fa', 'close', 'بستن', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(218, 'fa', 'submit', 'ارسال', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(219, 'fa', 'reset', 'بازنشانی', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(220, 'fa', 'back', 'بازگشت', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(221, 'fa', 'next', 'بعدی', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(222, 'fa', 'previous', 'قبلی', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(223, 'fa', 'finish', 'پایان', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(224, 'fa', 'current_language', 'زبان فعلی', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(225, 'fa', 'available_languages', 'زبان های موجود', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(226, 'fa', 'translation_key', 'کلید ترجمه', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(227, 'fa', 'translation_value', 'مقدار ترجمه', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(228, 'fa', 'rtl_support', 'پشتیبانی راست به چپ', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(229, 'fa', 'language_switcher', 'تعویض زبان', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(230, 'fa', 'context', 'متن', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(231, 'fa', 'name', 'نام', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(232, 'fa', 'email', 'ایمیل', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(233, 'fa', 'phone', 'تلفن', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(234, 'fa', 'address', 'آدرس', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(235, 'fa', 'status', 'وضعیت', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(236, 'fa', 'actions', 'اقدامات', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(237, 'fa', 'price', 'قیمت', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(238, 'fa', 'quantity', 'تعداد', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(239, 'fa', 'total', 'مجموع', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(240, 'fa', 'subtotal', 'زیرمجموع', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(241, 'fa', 'tax', 'مالیات', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(242, 'fa', 'discount', 'تخفیف', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(243, 'fa', 'grand_total', 'مجموع کل', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(244, 'fa', 'order_list', 'لیست سفارشات', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(245, 'fa', 'delivery_charges', 'هزینه تحویل', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(246, 'fa', 'notes', 'یادداشت ها', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(247, 'fa', 'translation_updated', 'ترجمه با موفقیت به روزرسانی شد', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(248, 'fa', 'translation_added', 'ترجمه با موفقیت افزوده شد', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(249, 'fa', 'invalid_language', 'زبان انتخاب شده نامعتبر است', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(250, 'fa', 'success', 'موفقیت', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(251, 'fa', 'error', 'خطا', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(252, 'fa', 'warning', 'هشدار', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(253, 'fa', 'info', 'اطلاعات', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(254, 'fa', 'confirm_delete', 'آیا مطمئن هستید که می خواهید این مورد را حذف کنید؟', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(255, 'fa', 'confirm_void', 'آیا مطمئن هستید که می خواهید این سفارش را لغو کنید؟', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(256, 'fa', 'no_data_found', 'داده ای یافت نشد', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(257, 'fa', 'loading', 'در حال بارگذاری...', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(258, 'fa', 'please_wait', 'لطفا صبر کنید...', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(259, 'fa', 'search_product', 'جستجوی محصول...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(260, 'fa', 'enter_notes', 'یادداشت های اضافی وارد کنید...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(261, 'fa', 'enter_name', 'نام وارد کنید...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(262, 'fa', 'enter_email', 'ایمیل وارد کنید...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(263, 'fa', 'enter_phone', 'تلفن وارد کنید...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(264, 'fa', 'enter_address', 'آدرس وارد کنید...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(265, 'fa', 'enter_price', 'قیمت وارد کنید...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(266, 'fa', 'enter_quantity', 'تعداد وارد کنید...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(267, 'fa', 'manage_customers', 'مدیریت مشتریان خود', 'page_titles', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(268, 'fa', 'manage_system_languages', 'مدیریت زبان های سیستم و ترجمه ها', 'page_titles', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(269, 'fa', 'click_category_settings', 'برای بارگذاری تنظیمات روی دسته کلیک کنید', 'page_titles', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(270, 'fa', 'expenses', 'هزینه ها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(271, 'fa', 'expense_accounts', 'حساب های هزینه', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(272, 'fa', 'expense_categories', 'دسته بندی های هزینه', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(273, 'fa', 'accounts', 'حساب ها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(274, 'fa', 'bank_accounts', 'حساب های بانکی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(275, 'fa', 'payments', 'پرداخت ها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(276, 'fa', 'customer_payments', 'پرداخت های مشتری', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(277, 'fa', 'supplier_payments', 'پرداخت های تامین کننده', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(278, 'fa', 'payment_methods', 'روش های پرداخت', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(279, 'fa', 'financials', 'مالی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(280, 'fa', 'chart_of_accounts', 'نمودار حساب ها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(281, 'fa', 'account_mappings', 'نگاشت حساب ها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(282, 'fa', 'journal_entries', 'ورودی های دفتر روزنامه', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(283, 'fa', 'financial_periods', 'دوره های مالی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(284, 'fa', 'trial_balance', 'تراز آزمایشی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(285, 'fa', 'general_ledger', 'دفتر کل عمومی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(286, 'fa', 'profit_loss', 'سود و زیان', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(287, 'fa', 'financial_reports', 'گزارشات مالی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(288, 'fa', 'hardware_devices', 'سخت‌افزار و دستگاه‌ها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:45'),
(289, 'fa', 'print_devices', 'دستگاه های چاپ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(290, 'fa', 'kds', 'KOT/KDS', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:51'),
(291, 'fa', 'tablet_orders', 'سفارشات تبلت', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(292, 'fa', 'database_backup', 'پشتیبان گیری پایگاه داده', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(293, 'fa', 'backup_management', 'مدیریت پشتیبان گیری', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(294, 'fa', 'restore_database', 'بازیابی پایگاه داده', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(295, 'fa', 'all', 'همه', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(296, 'fa', 'clear', 'پاک کردن', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(297, 'fa', 'navigation', 'ناوبری', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(298, 'fa', 'buttons', 'دکمه ها', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(299, 'fa', 'labels', 'برچسب ها', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(300, 'fa', 'messages', 'پیام ها', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(301, 'fa', 'placeholders', 'متن های راهنما', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(302, 'fa', 'page_titles', 'عنوان های صفحه', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(303, 'fa', 'sales_report', 'گزارش فروش', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(304, 'fa', 'invoice_report', 'گزارش فاکتور', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(305, 'fa', 'invoice_wise_profit_report', 'گزارش سود بر اساس فاکتور', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(306, 'fa', 'sale_return_report', 'گزارش برگشت فروش', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(307, 'fa', 'day_wise_sale_summary', 'خلاصه فروش روزانه', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(308, 'fa', 'item_wise_sales_report', 'گزارش فروش بر اساس آیتم', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(309, 'fa', 'item_modifier_report', 'گزارش اصلاحات آیتم', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(310, 'fa', 'cashier_shift_report', 'گزارش شیفت صندوق دار', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(311, 'fa', 'tax_wise_report', 'گزارش بر اساس مالیات', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(312, 'fa', 'order_taker_report', 'گزارش دریافت کننده سفارش', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(313, 'fa', 'void_orders_report', 'گزارش سفارشات لغو شده', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(314, 'fa', 'purchase_report', 'گزارش خرید', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(315, 'fa', 'stock_balance_report', 'گزارش موجودی انبار', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(316, 'fa', 'stock_valuation_report', 'گزارش ارزش گذاری موجودی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(317, 'fa', 'item_ledger_report', 'گزارش دفتر آیتم', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(318, 'fa', 'production_report', 'گزارش تولید', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(319, 'fa', 'purchase_return_report', 'گزارش برگشت خرید', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(320, 'fa', 'customer_ledger', 'دفتر مشتری', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(321, 'fa', 'customer_statement', 'صورت حساب مشتری', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(322, 'fa', 'supplier_ledger', 'دفتر تامین کننده', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(323, 'fa', 'supplier_statement', 'صورت حساب تامین کننده', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(324, 'fa', 'profit_loss_report', 'تحلیل سود خالص', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:45'),
(325, 'fa', 'account_ledger', 'دفتر حساب', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(326, 'fa', 'accounts_report', 'گزارش حساب ها', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(327, 'ur', 'dashboard', 'ڈیش بورڈ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(328, 'ur', 'sales', 'سیلز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(329, 'ur', 'purchases', 'خریداری', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(330, 'ur', 'inventory', 'انوینٹری', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(331, 'ur', 'reports', 'رپورٹس', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(332, 'ur', 'settings', 'سیٹنگز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(333, 'ur', 'users', 'صارفین', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(334, 'ur', 'customers', 'کسٹمرز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(335, 'ur', 'suppliers', 'سپلائرز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(336, 'ur', 'items', 'آئٹمز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(337, 'ur', 'categories', 'کیٹگریز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(338, 'ur', 'language_management', 'زبان کا انتظام', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(339, 'ur', 'features', 'فیچرز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(340, 'ur', 'license_info', 'لائسنس کی معلومات', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(341, 'ur', 'new_features', 'نئے فیچرز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(342, 'ur', 'check_updates', 'اپڈیٹ چیک کریں', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(343, 'ur', 'apply_update', 'اپڈیٹ لاگو کریں', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(344, 'ur', 'item_modifiers', 'آئٹم موڈیفائرز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(345, 'ur', 'void_reasons', 'کینسل کرنے کی وجوہات', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(346, 'ur', 'quotations', 'کوٹیشنز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(347, 'ur', 'tables', 'ٹیبلز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(348, 'ur', 'floors', 'فلورز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(349, 'ur', 'unit_of_measurement', 'پیمائش کی اکائی', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(350, 'ur', 'stock_transfer', 'اسٹاک ٹرانسفر', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(351, 'ur', 'new_transfer_request', 'نیا ٹرانسفر درخواست', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(352, 'ur', 'transfer_approval', 'ٹرانسفر کی منظوری', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(353, 'ur', 'stock_adjustment', 'اسٹاک ایڈجسٹمنٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(354, 'ur', 'new_adjustment', 'نیا ایڈجسٹمنٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(355, 'ur', 'production', 'پروڈکشن', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(356, 'ur', 'users_permissions', 'صارفین اور اجازتیں', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(357, 'ur', 'order_takers', 'آرڈر لینے والے', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(358, 'ur', 'riders', 'رائیڈرز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(359, 'ur', 'delivery_orders', 'ڈیلیوری آرڈرز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(360, 'ur', 'expense_list', 'خرچوں کی فہرست', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(361, 'ur', 'general_settings', 'جنرل سیٹنگز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(362, 'ur', 'branch_settings', 'برانچ سیٹنگز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(363, 'ur', 'store_management', 'اسٹور مینجمنٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(364, 'ur', 'tax_rate', 'ٹیکس کی شرح', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(365, 'ur', 'add_new', 'نیا شامل کریں', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(366, 'ur', 'edit', 'ایڈٹ', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(367, 'ur', 'delete', 'ڈیلیٹ', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(368, 'ur', 'save', 'سیو', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(369, 'ur', 'cancel', 'کینسل', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(370, 'ur', 'search', 'سرچ', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(371, 'ur', 'filter', 'فلٹر', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(372, 'ur', 'export', 'ایکسپورٹ', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(373, 'ur', 'import', 'امپورٹ', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(374, 'ur', 'update_translation', 'ترجمہ اپڈیٹ کریں', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(375, 'ur', 'add_translation', 'ترجمہ شامل کریں', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(376, 'ur', 'update', 'اپڈیٹ', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(377, 'ur', 'skip', 'سکیپ', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(378, 'ur', 'void_order', 'آرڈر کینسل کریں', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(379, 'ur', 'confirm', 'کنفرم', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(380, 'ur', 'close', 'بند کریں', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(381, 'ur', 'submit', 'سبمٹ', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(382, 'ur', 'reset', 'ری سیٹ', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(383, 'ur', 'back', 'واپس', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(384, 'ur', 'next', 'اگلا', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(385, 'ur', 'previous', 'پچھلا', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(386, 'ur', 'finish', 'ختم', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(387, 'ur', 'current_language', 'موجودہ زبان', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(388, 'ur', 'available_languages', 'دستیاب زبانیں', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(389, 'ur', 'translation_key', 'ترجمہ کی کلید', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(390, 'ur', 'translation_value', 'ترجمہ کی قیمت', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(391, 'ur', 'rtl_support', 'RTL سپورٹ', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(392, 'ur', 'language_switcher', 'زبان سوئچر', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(393, 'ur', 'context', 'سیاق و سباق', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(394, 'ur', 'name', 'نام', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(395, 'ur', 'email', 'ای میل', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(396, 'ur', 'phone', 'فون', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(397, 'ur', 'address', 'پتہ', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(398, 'ur', 'status', 'حالت', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(399, 'ur', 'actions', 'اعمال', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(400, 'ur', 'price', 'قیمت', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(401, 'ur', 'quantity', 'مقدار', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(402, 'ur', 'total', 'کل', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(403, 'ur', 'subtotal', 'ذیلی کل', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(404, 'ur', 'tax', 'ٹیکس', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(405, 'ur', 'discount', 'ڈسکاؤنٹ', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(406, 'ur', 'grand_total', 'گرینڈ ٹوٹل', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(407, 'ur', 'order_list', 'آرڈر کی فہرست', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(408, 'ur', 'delivery_charges', 'ڈیلیوری چارجز', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(409, 'ur', 'notes', 'نوٹس', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(410, 'ur', 'translation_updated', 'ترجمہ کامیابی سے اپڈیٹ ہو گیا', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(411, 'ur', 'translation_added', 'ترجمہ کامیابی سے شامل ہو گیا', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(412, 'ur', 'invalid_language', 'غلط زبان منتخب کی گئی', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(413, 'ur', 'success', 'کامیابی', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(414, 'ur', 'error', 'خرابی', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(415, 'ur', 'warning', 'انتباہ', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(416, 'ur', 'info', 'معلومات', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(417, 'ur', 'confirm_delete', 'کیا آپ واقعی اس آئٹم کو ڈیلیٹ کرنا چاہتے ہیں؟', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(418, 'ur', 'confirm_void', 'کیا آپ واقعی اس آرڈر کو کینسل کرنا چاہتے ہیں؟', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(419, 'ur', 'no_data_found', 'کوئی ڈیٹا نہیں ملا', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(420, 'ur', 'loading', 'لوڈ ہو رہا ہے...', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(421, 'ur', 'please_wait', 'براہ کرم انتظار کریں...', 'messages', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(422, 'ur', 'search_product', 'پروڈکٹ تلاش کریں...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(423, 'ur', 'enter_notes', 'اضافی نوٹس درج کریں...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(424, 'ur', 'enter_name', 'نام درج کریں...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(425, 'ur', 'enter_email', 'ای میل درج کریں...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(426, 'ur', 'enter_phone', 'فون درج کریں...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(427, 'ur', 'enter_address', 'پتہ درج کریں...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(428, 'ur', 'enter_price', 'قیمت درج کریں...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(429, 'ur', 'enter_quantity', 'مقدار درج کریں...', 'placeholders', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(430, 'ur', 'manage_customers', 'اپنے کسٹمرز کا انتظام کریں', 'page_titles', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(431, 'ur', 'manage_system_languages', 'سسٹم کی زبانیں اور تراجم کا انتظام کریں', 'page_titles', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(432, 'ur', 'click_category_settings', 'سیٹنگز لوڈ کرنے کے لیے کیٹگری پر کلک کریں', 'page_titles', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(433, 'ur', 'expenses', 'خرچے', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(434, 'ur', 'expense_accounts', 'خرچے کے اکاؤنٹس', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(435, 'ur', 'expense_categories', 'خرچے کی کیٹگریز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(436, 'ur', 'accounts', 'اکاؤنٹس', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(437, 'ur', 'bank_accounts', 'بینک اکاؤنٹس', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(438, 'ur', 'payments', 'پیمنٹس', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(439, 'ur', 'customer_payments', 'کسٹمر پیمنٹس', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(440, 'ur', 'supplier_payments', 'سپلائر پیمنٹس', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(441, 'ur', 'payment_methods', 'پیمنٹ کے طریقے', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(442, 'ur', 'financials', 'مالیات', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:45'),
(443, 'ur', 'chart_of_accounts', 'اکاؤنٹس کا چارٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(444, 'ur', 'account_mappings', 'اکاؤنٹ میپنگ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(445, 'ur', 'journal_entries', 'جرنل انٹریز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(446, 'ur', 'financial_periods', 'مالی ادوار', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(447, 'ur', 'trial_balance', 'ٹرائل بیلنس', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(448, 'ur', 'general_ledger', 'جنرل لیجر', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(449, 'ur', 'profit_loss', 'منافع اور نقصان', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(450, 'ur', 'financial_reports', 'مالی رپورٹس', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(451, 'ur', 'hardware_devices', 'ہارڈویئر اور ڈیوائسز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(452, 'ur', 'print_devices', 'پرنٹ ڈیوائسز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(453, 'ur', 'kds', 'کچن آرڈر ٹکٹ/کچن ڈسپلے', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:51'),
(454, 'ur', 'tablet_orders', 'ٹیبلٹ آرڈرز', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(455, 'ur', 'database_backup', 'ڈیٹابیس بیک اپ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(456, 'ur', 'backup_management', 'بیک اپ مینجمنٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(457, 'ur', 'restore_database', 'ڈیٹابیس ریسٹور', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(458, 'ur', 'all', 'سب', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(459, 'ur', 'clear', 'صاف کریں', 'buttons', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(460, 'ur', 'navigation', 'نیویگیشن', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(461, 'ur', 'buttons', 'بٹنز', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(462, 'ur', 'labels', 'لیبلز', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(463, 'ur', 'messages', 'پیغامات', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(464, 'ur', 'placeholders', 'پلیس ہولڈرز', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(465, 'ur', 'page_titles', 'صفحہ کے عنوانات', 'labels', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(466, 'ur', 'sales_report', 'سیلز رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(467, 'ur', 'invoice_report', 'انوائس رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(468, 'ur', 'invoice_wise_profit_report', 'انوائس وائز پرافٹ رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(469, 'ur', 'sale_return_report', 'سیل ریٹرن رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(470, 'ur', 'day_wise_sale_summary', 'ڈے وائز سیل سمیری', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(471, 'ur', 'item_wise_sales_report', 'آئٹم وائز سیلز رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(472, 'ur', 'item_modifier_report', 'آئٹم موڈیفائر رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(473, 'ur', 'cashier_shift_report', 'کیشئیر شفٹ رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(474, 'ur', 'tax_wise_report', 'ٹیکس وائز رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(475, 'ur', 'order_taker_report', 'آرڈر ٹیکر رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(476, 'ur', 'void_orders_report', 'وائڈ آرڈرز رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(477, 'ur', 'purchase_report', 'پچیز رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(478, 'ur', 'stock_balance_report', 'اسٹاک بیلنس رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(479, 'ur', 'stock_valuation_report', 'اسٹاک ویلیوایشن رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(480, 'ur', 'item_ledger_report', 'آئٹم لیجر رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(481, 'ur', 'production_report', 'پروڈکشن رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(482, 'ur', 'purchase_return_report', 'پچیز ریٹرن رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(483, 'ur', 'customer_ledger', 'کسٹمر لیجر', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(484, 'ur', 'customer_statement', 'کسٹمر سٹیٹمنٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(485, 'ur', 'supplier_ledger', 'سپلائر لیجر', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(486, 'ur', 'supplier_statement', 'سپلائر سٹیٹمنٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(487, 'ur', 'profit_loss_report', 'نیٹ پرافٹ تجزیہ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:45'),
(488, 'ur', 'account_ledger', 'اکاؤنٹ لیجر', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29'),
(489, 'ur', 'accounts_report', 'اکاؤنٹس رپورٹ', 'navigation', '2025-11-05 17:16:29', '2025-11-05 17:16:29');
INSERT INTO `translations` (`id`, `language_code`, `key`, `value`, `context`, `created_at`, `updated_at`) VALUES
(490, 'ar', 'dashboard', 'لوحة التحكم', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(491, 'ar', 'sales', 'المبيعات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(492, 'ar', 'purchases', 'المشتريات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(493, 'ar', 'inventory', 'المخزون', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(494, 'ar', 'reports', 'التقارير', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(495, 'ar', 'settings', 'الإعدادات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(496, 'ar', 'users', 'المستخدمون', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(497, 'ar', 'customers', 'العملاء', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(498, 'ar', 'suppliers', 'الموردون', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(499, 'ar', 'items', 'الأصناف', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(500, 'ar', 'categories', 'الفئات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(501, 'ar', 'language_management', 'إدارة اللغات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(502, 'ar', 'features', 'الميزات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(503, 'ar', 'license_info', 'معلومات الترخيص', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(504, 'ar', 'new_features', 'الميزات الجديدة', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(505, 'ar', 'check_updates', 'فحص التحديثات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(506, 'ar', 'apply_update', 'تطبيق التحديث', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(507, 'ar', 'item_modifiers', 'معدلات الأصناف', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(508, 'ar', 'void_reasons', 'أسباب الإلغاء', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(509, 'ar', 'quotations', 'عروض الأسعار', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(510, 'ar', 'tables', 'الطاولات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(511, 'ar', 'floors', 'الطوابق', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(512, 'ar', 'unit_of_measurement', 'وحدة القياس', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(513, 'ar', 'stock_transfer', 'نقل المخزون', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(514, 'ar', 'new_transfer_request', 'طلب نقل جديد', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(515, 'ar', 'transfer_approval', 'موافقة النقل', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(516, 'ar', 'stock_adjustment', 'تعديل المخزون', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(517, 'ar', 'new_adjustment', 'تعديل جديد', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(518, 'ar', 'production', 'الإنتاج', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(519, 'ar', 'users_permissions', 'المستخدمون والصلاحيات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(520, 'ar', 'order_takers', 'أخذ الطلبات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(521, 'ar', 'riders', 'الراكبون', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(522, 'ar', 'delivery_orders', 'طلبات التوصيل', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(523, 'ar', 'expense_list', 'قائمة المصروفات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(524, 'ar', 'general_settings', 'الإعدادات العامة', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(525, 'ar', 'branch_settings', 'إعدادات الفرع', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(526, 'ar', 'store_management', 'إدارة المتجر', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(527, 'ar', 'tax_rate', 'معدل الضريبة', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(528, 'ar', 'add_new', 'إضافة جديد', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(529, 'ar', 'edit', 'تعديل', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(530, 'ar', 'delete', 'حذف', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(531, 'ar', 'save', 'حفظ', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(532, 'ar', 'cancel', 'إلغاء', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(533, 'ar', 'search', 'بحث', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(534, 'ar', 'filter', 'تصفية', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(535, 'ar', 'export', 'تصدير', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(536, 'ar', 'import', 'استيراد', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(537, 'ar', 'update_translation', 'تحديث الترجمة', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(538, 'ar', 'add_translation', 'إضافة ترجمة', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(539, 'ar', 'update', 'تحديث', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(540, 'ar', 'skip', 'تخطي', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(541, 'ar', 'void_order', 'إلغاء الطلب', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(542, 'ar', 'confirm', 'تأكيد', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(543, 'ar', 'close', 'إغلاق', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(544, 'ar', 'submit', 'إرسال', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(545, 'ar', 'reset', 'إعادة تعيين', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(546, 'ar', 'back', 'رجوع', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(547, 'ar', 'next', 'التالي', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(548, 'ar', 'previous', 'السابق', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(549, 'ar', 'finish', 'إنهاء', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(550, 'ar', 'clear', 'مسح', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(551, 'ar', 'current_language', 'اللغة الحالية', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(552, 'ar', 'available_languages', 'اللغات المتاحة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(553, 'ar', 'translation_key', 'مفتاح الترجمة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(554, 'ar', 'translation_value', 'قيمة الترجمة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(555, 'ar', 'rtl_support', 'دعم الكتابة من اليمين إلى اليسار', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(556, 'ar', 'language_switcher', 'مبدل اللغة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(557, 'ar', 'context', 'السياق', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(558, 'ar', 'name', 'الاسم', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(559, 'ar', 'email', 'البريد الإلكتروني', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(560, 'ar', 'phone', 'الهاتف', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(561, 'ar', 'address', 'العنوان', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(562, 'ar', 'status', 'الحالة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(563, 'ar', 'actions', 'الإجراءات', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(564, 'ar', 'price', 'السعر', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(565, 'ar', 'quantity', 'الكمية', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(566, 'ar', 'total', 'المجموع', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(567, 'ar', 'subtotal', 'المجموع الفرعي', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(568, 'ar', 'tax', 'الضريبة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(569, 'ar', 'discount', 'الخصم', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(570, 'ar', 'grand_total', 'المجموع الكلي', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(571, 'ar', 'order_list', 'قائمة الطلبات', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(572, 'ar', 'delivery_charges', 'رسوم التوصيل', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(573, 'ar', 'notes', 'ملاحظات', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(574, 'ar', 'all', 'الكل', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(575, 'ar', 'navigation', 'التنقل', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(576, 'ar', 'buttons', 'الأزرار', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(577, 'ar', 'labels', 'التسميات', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(578, 'ar', 'messages', 'الرسائل', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(579, 'ar', 'placeholders', 'النصوص التوضيحية', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(580, 'ar', 'page_titles', 'عناوين الصفحات', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(581, 'ar', 'translation_updated', 'تم تحديث الترجمة بنجاح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(582, 'ar', 'translation_added', 'تم إضافة الترجمة بنجاح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(583, 'ar', 'invalid_language', 'اللغة المحددة غير صحيحة', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(584, 'ar', 'success', 'نجح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(585, 'ar', 'error', 'خطأ', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(586, 'ar', 'warning', 'تحذير', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(587, 'ar', 'info', 'معلومات', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(588, 'ar', 'confirm_delete', 'هل أنت متأكد من أنك تريد حذف هذا العنصر؟', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(589, 'ar', 'confirm_void', 'هل أنت متأكد من أنك تريد إلغاء هذا الطلب؟', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(590, 'ar', 'no_data_found', 'لم يتم العثور على بيانات', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(591, 'ar', 'loading', 'جاري التحميل...', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(592, 'ar', 'please_wait', 'يرجى الانتظار...', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(593, 'ar', 'search_product', 'البحث عن المنتج...', 'placeholders', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(594, 'ar', 'enter_notes', 'أدخل أي ملاحظات إضافية...', 'placeholders', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(595, 'ar', 'enter_name', 'أدخل الاسم...', 'placeholders', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(596, 'ar', 'enter_email', 'أدخل البريد الإلكتروني...', 'placeholders', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(597, 'ar', 'enter_phone', 'أدخل رقم الهاتف...', 'placeholders', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(598, 'ar', 'enter_address', 'أدخل العنوان...', 'placeholders', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(599, 'ar', 'enter_price', 'أدخل السعر...', 'placeholders', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(600, 'ar', 'enter_quantity', 'أدخل الكمية...', 'placeholders', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(601, 'ar', 'manage_customers', 'إدارة عملائك', 'page_titles', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(602, 'ar', 'manage_system_languages', 'إدارة لغات النظام والترجمات', 'page_titles', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(603, 'ar', 'click_category_settings', 'انقر على فئة لتحميل إعداداتها', 'page_titles', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(604, 'ar', 'expenses', 'المصروفات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(605, 'ar', 'expense_accounts', 'حسابات المصروفات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(606, 'ar', 'expense_categories', 'فئات المصروفات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(607, 'ar', 'accounts', 'الحسابات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(608, 'ar', 'bank_accounts', 'الحسابات البنكية', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(609, 'ar', 'payments', 'المدفوعات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(610, 'ar', 'customer_payments', 'مدفوعات العملاء', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(611, 'ar', 'supplier_payments', 'مدفوعات الموردين', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(612, 'ar', 'payment_methods', 'طرق الدفع', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(613, 'ar', 'financials', 'المالية', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(614, 'ar', 'chart_of_accounts', 'دليل الحسابات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(615, 'ar', 'account_mappings', 'ربط الحسابات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(616, 'ar', 'journal_entries', 'قيود اليومية', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(617, 'ar', 'financial_periods', 'الفترات المالية', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(618, 'ar', 'trial_balance', 'ميزان المراجعة', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(619, 'ar', 'general_ledger', 'دفتر الأستاذ العام', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(620, 'ar', 'profit_loss', 'الأرباح والخسائر', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(621, 'ar', 'financial_reports', 'التقارير المالية', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(622, 'ar', 'hardware_devices', 'الأجهزة والمعدات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(623, 'ar', 'print_devices', 'أجهزة الطباعة', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(624, 'ar', 'kds', 'طلب المطبخ/شاشة المطبخ', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:51'),
(625, 'ar', 'tablet_orders', 'طلبات الأجهزة اللوحية', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(626, 'ar', 'database_backup', 'نسخ احتياطي لقاعدة البيانات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(627, 'ar', 'backup_management', 'إدارة النسخ الاحتياطية', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(628, 'ar', 'restore_database', 'استعادة قاعدة البيانات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(629, 'ar', 'sales_report', 'تقرير المبيعات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(630, 'ar', 'invoice_report', 'تقرير الفواتير', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(631, 'ar', 'invoice_wise_profit_report', 'تقرير الأرباح حسب الفاتورة', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(632, 'ar', 'sale_return_report', 'تقرير مرتجع المبيعات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(633, 'ar', 'day_wise_sale_summary', 'ملخص المبيعات اليومية', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(634, 'ar', 'item_wise_sales_report', 'تقرير المبيعات حسب الصنف', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(635, 'ar', 'item_modifier_report', 'تقرير معدلات الأصناف', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(636, 'ar', 'cashier_shift_report', 'تقرير نوبة الصندوق', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(637, 'ar', 'tax_wise_report', 'تقرير الضرائب', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(638, 'ar', 'order_taker_report', 'تقرير أخذ الطلبات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(639, 'ar', 'void_orders_report', 'تقرير الطلبات الملغاة', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(640, 'ar', 'purchase_report', 'تقرير المشتريات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(641, 'ar', 'stock_balance_report', 'تقرير رصيد المخزون', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(642, 'ar', 'stock_valuation_report', 'تقرير تقييم المخزون', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(643, 'ar', 'item_ledger_report', 'تقرير دفتر الأصناف', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(644, 'ar', 'production_report', 'تقرير الإنتاج', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(645, 'ar', 'purchase_return_report', 'تقرير مرتجع المشتريات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(646, 'ar', 'customer_ledger', 'دفتر العملاء', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(647, 'ar', 'customer_statement', 'كشف حساب العميل', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(648, 'ar', 'supplier_ledger', 'دفتر الموردين', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(649, 'ar', 'supplier_statement', 'كشف حساب المورد', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(650, 'ar', 'profit_loss_report', 'تحليل صافي الربح', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:45'),
(651, 'ar', 'account_ledger', 'دفتر الحسابات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(652, 'ar', 'accounts_report', 'تقرير الحسابات', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(653, 'ar', 'item_cost_report', 'تقرير تكلفة الأصناف', 'navigation', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(654, 'ar', 'cost_method', 'طريقة التكلفة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(655, 'ar', 'average_cost', 'متوسط التكلفة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(656, 'ar', 'fifo_cost', 'تكلفة FIFO', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(657, 'ar', 'current_cost', 'التكلفة الحالية', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(658, 'ar', 'retail_price', 'سعر البيع', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(659, 'ar', 'cost_price', 'سعر التكلفة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(660, 'ar', 'margin', 'الهامش', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(661, 'ar', 'stock_value', 'قيمة المخزون', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(662, 'ar', 'profit_amount', 'مبلغ الربح', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(663, 'ar', 'profit_percentage', 'نسبة الربح', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(664, 'ar', 'margin_percentage', 'نسبة الهامش', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(665, 'ar', 'current_stock', 'المخزون الحالي', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(666, 'ar', 'last_movement', 'آخر حركة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(667, 'ar', 'show_zero_cost', 'إظهار التكلفة الصفرية', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(668, 'ar', 'from_date', 'من تاريخ', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(669, 'ar', 'to_date', 'إلى تاريخ', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(670, 'ar', 'pos', 'نقطة البيع', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(671, 'ar', 'cart', 'السلة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(672, 'ar', 'checkout', 'الدفع', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(673, 'ar', 'receipt', 'الإيصال', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(674, 'ar', 'invoice', 'الفاتورة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(675, 'ar', 'customer', 'العميل', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(676, 'ar', 'supplier', 'المورد', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(677, 'ar', 'item', 'الصنف', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(678, 'ar', 'category', 'الفئة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(679, 'ar', 'sub_category', 'الفئة الفرعية', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(680, 'ar', 'barcode', 'الباركود', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(681, 'ar', 'sku', 'رمز المنتج', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(682, 'ar', 'stock', 'المخزون', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(683, 'ar', 'material', 'المواد', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(684, 'ar', 'non_stock', 'غير مخزني', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(685, 'ar', 'bulk', 'الكميات الكبيرة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(686, 'ar', 'loose', 'مفكوك', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(687, 'ar', 'reorder_level', 'مستوى إعادة الطلب', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(688, 'ar', 'reorder_quantity', 'كمية إعادة الطلب', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(689, 'ar', 'tax_type', 'نوع الضريبة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(690, 'ar', 'included', 'مشمول', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(691, 'ar', 'excluded', 'غير مشمول', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(692, 'ar', 'nil', 'صفر', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(693, 'ar', 'add_item', 'إضافة صنف', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(694, 'ar', 'edit_item', 'تعديل الصنف', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(695, 'ar', 'delete_item', 'حذف الصنف', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(696, 'ar', 'view_item', 'عرض الصنف', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(697, 'ar', 'print_barcode', 'طباعة الباركود', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(698, 'ar', 'import_items', 'استيراد الأصناف', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(699, 'ar', 'export_items', 'تصدير الأصناف', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(700, 'ar', 'bulk_edit', 'تعديل جماعي', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(701, 'ar', 'bulk_delete', 'حذف جماعي', 'buttons', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(702, 'ar', 'required_field', 'هذا الحقل مطلوب', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(703, 'ar', 'invalid_email', 'البريد الإلكتروني غير صحيح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(704, 'ar', 'invalid_phone', 'رقم الهاتف غير صحيح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(705, 'ar', 'invalid_price', 'السعر غير صحيح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(706, 'ar', 'invalid_quantity', 'الكمية غير صحيحة', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(707, 'ar', 'duplicate_code', 'الكود موجود بالفعل', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(708, 'ar', 'item_not_found', 'الصنف غير موجود', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(709, 'ar', 'insufficient_stock', 'المخزون غير كافي', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(710, 'ar', 'item_added_successfully', 'تم إضافة الصنف بنجاح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(711, 'ar', 'item_updated_successfully', 'تم تحديث الصنف بنجاح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(712, 'ar', 'item_deleted_successfully', 'تم حذف الصنف بنجاح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(713, 'ar', 'items_imported_successfully', 'تم استيراد الأصناف بنجاح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(714, 'ar', 'items_exported_successfully', 'تم تصدير الأصناف بنجاح', 'messages', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(715, 'ar', 'item_code', 'كود الصنف', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(716, 'ar', 'sku_number', 'رقم SKU', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(717, 'ar', 'item_name', 'اسم الصنف', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(718, 'ar', 'item_role', 'دور الصنف', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(719, 'ar', 'stock_item', 'صنف مخزني', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(720, 'ar', 'material_item', 'صنف مواد', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(721, 'ar', 'non_stock_item', 'صنف غير مخزني', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(722, 'ar', 'item_type', 'نوع الصنف', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(723, 'ar', 'bulk_qty', 'كمية الكمية الكبيرة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(724, 'ar', 'bulk_price', 'سعر الكمية الكبيرة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(725, 'ar', 'pkg_qty', 'كمية العبوة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(726, 'ar', 'product_image', 'صورة المنتج', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(727, 'ar', 'uom', 'وحدة القياس', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(728, 'ar', 'id', 'المعرف', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(729, 'ar', 'code', 'الكود', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(730, 'ar', 'image', 'الصورة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(731, 'ar', 'type', 'النوع', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(732, 'ar', 'role', 'الدور', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(733, 'ar', 'cost', 'التكلفة', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(734, 'ar', 'retail', 'البيع', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(735, 'ar', 'profit', 'الربح', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(736, 'ar', 'stock_qty', 'كمية المخزون', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(737, 'ar', 'created_date', 'تاريخ الإنشاء', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(738, 'ar', 'updated_date', 'تاريخ التحديث', 'labels', '2025-11-05 17:16:38', '2025-11-05 17:16:38'),
(739, 'en', 'updates', 'Updates', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(740, 'en', 'users_access', 'Users & Access', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(741, 'en', 'help', 'Help', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(742, 'en', 'card_types', 'Card Types', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(743, 'en', 'discount_management', 'Discount Management', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(744, 'en', 'database_operation', 'Database Operation', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(745, 'en', 'sync_settings', 'Sync Settings', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(746, 'en', 'contact_support', 'Contact Support', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(747, 'ur', 'updates', 'اپڈیٹس', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(748, 'ur', 'users_access', 'صارفین اور رسائی', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(749, 'ur', 'help', 'مدد', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(750, 'ur', 'card_types', 'کارڈ اقسام', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(751, 'ur', 'discount_management', 'ڈسکاؤنٹ مینجمنٹ', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(752, 'ur', 'database_operation', 'ڈیٹا بیس آپریشن', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(753, 'ur', 'sync_settings', 'سنگ سیٹنگز', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(754, 'ur', 'contact_support', 'سپورٹ سے رابطہ کریں', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(755, 'fa', 'updates', 'به‌روزرسانی‌ها', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(756, 'fa', 'users_access', 'کاربران و دسترسی', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(757, 'fa', 'help', 'راهنما', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(758, 'fa', 'card_types', 'انواع کارت', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(759, 'fa', 'discount_management', 'مدیریت تخفیف', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(760, 'fa', 'database_operation', 'عملیات پایگاه داده', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(761, 'fa', 'sync_settings', 'تنظیمات همگام‌سازی', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(762, 'fa', 'contact_support', 'تماس با پشتیبانی', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(772, 'en', 'welcome_to', 'Welcome to', 'page_titles', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(773, 'en', 'itr_pos_by_it_resources', 'ITR POS by IT Resources', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(774, 'en', 'todays_gross_sales', 'Today\'s Gross Sales', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(775, 'en', 'todays_purchase', 'Today\'s Purchase', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(776, 'en', 'total_gross_sales', 'Total Gross Sales', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(777, 'en', 'total_expense_amount', 'Total Expense Amount', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(778, 'en', 'customer_outstanding', 'Customer Outstanding', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(779, 'en', 'supplier_outstanding', 'Supplier Outstanding', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(780, 'en', 'purchase_invoice', 'Purchase Invoice', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(781, 'en', 'sales_invoice', 'Sales Invoice', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(782, 'en', 'todays_deliveries', 'Today\'s Deliveries', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(783, 'en', 'pending_deliveries', 'Pending Deliveries', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(784, 'en', 'out_for_delivery', 'Out for Delivery', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(785, 'en', 'completed_deliveries', 'Completed Deliveries', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(786, 'en', 'top_selling_products', 'Top Selling Products', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(787, 'en', 'purchase_and_sales', 'Purchase & Sales', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(788, 'en', 'no_sales_data', 'No sales data available.', 'messages', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(789, 'en', 'cash_balance', 'Cash Balance', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(790, 'ur', 'welcome_to', 'خوش آمدید', 'page_titles', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(791, 'ur', 'itr_pos_by_it_resources', 'آئی ٹی ریسورسز کا آئی ٹی آر پی او ایس', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(792, 'ur', 'todays_gross_sales', 'آج کی مجموعی سیلز', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(793, 'ur', 'todays_purchase', 'آج کی خریداری', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(794, 'ur', 'total_gross_sales', 'مجموعی سیلز', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(795, 'ur', 'total_expense_amount', 'کل اخراجات', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(796, 'ur', 'customer_outstanding', 'کسٹمر واجبات', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(797, 'ur', 'supplier_outstanding', 'سپلائر واجبات', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(798, 'ur', 'purchase_invoice', 'خریداری کی رسید', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(799, 'ur', 'sales_invoice', 'فروخت کی رسید', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(800, 'ur', 'todays_deliveries', 'آج کی ڈلیوریز', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(801, 'ur', 'pending_deliveries', 'زیر التواء ڈلیوریز', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(802, 'ur', 'out_for_delivery', 'ڈلیوری کے لیے روانہ', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(803, 'ur', 'completed_deliveries', 'مکمل شدہ ڈلیوریز', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(804, 'ur', 'top_selling_products', 'سب سے زیادہ فروخت ہونے والی اشیاء', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(805, 'ur', 'purchase_and_sales', 'خرید و فروخت', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(806, 'ur', 'no_sales_data', 'کوئی سیلز ڈیٹا دستیاب نہیں۔', 'messages', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(807, 'ur', 'cash_balance', 'نقد بیلنس', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(808, 'fa', 'welcome_to', 'خوش آمدید به', 'page_titles', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(809, 'fa', 'itr_pos_by_it_resources', 'آی‌تی‌آر پی‌او‌اس توسط آی‌تی ریسورسز', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(810, 'fa', 'todays_gross_sales', 'فروش ناخالص امروز', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(811, 'fa', 'todays_purchase', 'خرید امروز', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(812, 'fa', 'total_gross_sales', 'کل فروش ناخالص', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(813, 'fa', 'total_expense_amount', 'مجموع هزینه‌ها', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(814, 'fa', 'customer_outstanding', 'مطالبات مشتری', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(815, 'fa', 'supplier_outstanding', 'بدهی به تامین‌کننده', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(816, 'fa', 'purchase_invoice', 'فاکتور خرید', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(817, 'fa', 'sales_invoice', 'فاکتور فروش', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(818, 'fa', 'todays_deliveries', 'تحویل‌های امروز', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(819, 'fa', 'pending_deliveries', 'تحویل‌های در انتظار', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(820, 'fa', 'out_for_delivery', 'ارسال برای تحویل', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(821, 'fa', 'completed_deliveries', 'تحویل‌های تکمیل‌شده', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(822, 'fa', 'top_selling_products', 'پرفروش‌ترین محصولات', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(823, 'fa', 'purchase_and_sales', 'خرید و فروش', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(824, 'fa', 'no_sales_data', 'داده‌ای برای فروش موجود نیست.', 'messages', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(825, 'fa', 'cash_balance', 'موجودی نقد', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(826, 'ar', 'updates', 'التحديثات', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(827, 'ar', 'users_access', 'المستخدمون والصلاحيات', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(828, 'ar', 'help', 'مساعدة', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(829, 'ar', 'card_types', 'أنواع البطاقات', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(830, 'ar', 'discount_management', 'إدارة الخصومات', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(831, 'ar', 'database_operation', 'عمليات قاعدة البيانات', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(832, 'ar', 'sync_settings', 'إعدادات المزامنة', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(833, 'ar', 'contact_support', 'اتصل بالدعم', 'navigation', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(837, 'ar', 'welcome_to', 'مرحبًا بك في', 'page_titles', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(838, 'ar', 'itr_pos_by_it_resources', 'نظام نقاط البيع ITR بواسطة IT Resources', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(839, 'ar', 'todays_gross_sales', 'إجمالي مبيعات اليوم', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(840, 'ar', 'todays_purchase', 'مشتريات اليوم', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(841, 'ar', 'total_gross_sales', 'إجمالي المبيعات', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(842, 'ar', 'total_expense_amount', 'إجمالي المصروفات', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(843, 'ar', 'customer_outstanding', 'مستحقات العملاء', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(844, 'ar', 'supplier_outstanding', 'مستحقات الموردين', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(845, 'ar', 'purchase_invoice', 'فواتير الشراء', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(846, 'ar', 'sales_invoice', 'فواتير البيع', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(847, 'ar', 'todays_deliveries', 'طلبات اليوم المُسلمة', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(848, 'ar', 'pending_deliveries', 'طلبات قيد التسليم', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(849, 'ar', 'out_for_delivery', 'خارج للتسليم', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(850, 'ar', 'completed_deliveries', 'طلبات مكتملة التسليم', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(851, 'ar', 'top_selling_products', 'المنتجات الأكثر مبيعًا', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(852, 'ar', 'purchase_and_sales', 'المشتريات والمبيعات', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(853, 'ar', 'no_sales_data', 'لا توجد بيانات مبيعات.', 'messages', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(854, 'ar', 'cash_balance', 'رصيد النقد', 'labels', '2025-11-05 17:16:45', '2025-11-05 17:16:45'),
(855, 'en', 'opening_balances', 'Opening Balances', 'navigation', '2025-11-05 17:16:46', '2025-11-05 17:16:46'),
(856, 'ar', 'opening_balances', 'الأرصدة الافتتاحية', 'navigation', '2025-11-05 17:16:46', '2025-11-05 17:16:46'),
(857, 'ur', 'opening_balances', 'ابتدائی بیلنس', 'navigation', '2025-11-05 17:16:46', '2025-11-05 17:16:46'),
(858, 'fa', 'opening_balances', 'موجودی اولیه', 'navigation', '2025-11-05 17:16:46', '2025-11-05 17:16:46');

-- --------------------------------------------------------

--
-- Table structure for table `uoms`
--

CREATE TABLE IF NOT EXISTS `uoms` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `symbol` varchar(10) NOT NULL,
  `group_id` int NOT NULL,
  `base_quantity` decimal(10,4) DEFAULT '1.0000',
  `is_base` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `group_id` (`group_id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `uoms`
--

INSERT INTO `uoms` (`id`, `name`, `symbol`, `group_id`, `base_quantity`, `is_base`) VALUES
(1, 'Piece', 'pc', 1, 1.0000, 1),
(2, 'Dozen', 'dz', 1, 12.0000, 0),
(3, 'Gram', 'g', 2, 1.0000, 1),
(4, 'Kilogram', 'kg', 2, 1000.0000, 0),
(5, 'Milligram', 'mg', 2, 0.0010, 0),
(6, 'Liter', 'l', 3, 1.0000, 1),
(7, 'Milliliter', 'ml', 3, 0.0010, 0),
(8, 'Centimeter', 'cm', 4, 1.0000, 1),
(9, 'Meter', 'm', 4, 100.0000, 0);

-- --------------------------------------------------------

--
-- Table structure for table `uom_groups`
--

CREATE TABLE IF NOT EXISTS `uom_groups` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` varchar(10) NOT NULL,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `uom_groups`
--

INSERT INTO `uom_groups` (`id`, `code`, `name`) VALUES
(1, 'CNT', 'Count'),
(2, 'WGT', 'Weight'),
(3, 'VLM', 'Volume'),
(4, 'LGT', 'Length');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `assigned_store_id` int DEFAULT NULL,
  `username` varchar(100) NOT NULL,
  `email` varchar(100) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `role_id` int DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `last_login` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `pin` varchar(10) DEFAULT NULL,
  `profile_picture` varchar(255) DEFAULT NULL,
  `pin_required_for_void` tinyint(1) DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `role_id` (`role_id`),
  KEY `idx_username` (`username`),
  KEY `idx_email` (`email`),
  KEY `idx_is_active` (`is_active`),
  KEY `idx_users_store_id` (`assigned_store_id`),
  KEY `idx_profile_picture` (`profile_picture`(250))
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `assigned_store_id`, `username`, `email`, `password`, `role_id`, `is_active`, `last_login`, `created_at`, `updated_at`, `pin`, `profile_picture`, `pin_required_for_void`) VALUES
(1, 1, 'admin', 'admin@gmail.com', '$2y$10$15ETnDm2P5EVQfWBIpLTauhZ5wkJ7lFxYnYyvLnMHlcBrbK0vSXru', 1, 1, '2025-11-05 22:14:35', '2025-08-17 14:35:17', '2025-11-05 17:16:17', NULL, NULL, 1),
(2, 1, 'cashier', 'test@gmail.com', '$2y$10$f69Cdnnry75QlkKk.x2AjOdIIxBFPpWttQjVtec9uqhSbpMx7E7Gy', 2, 1, NULL, '2025-08-17 14:35:17', '2025-11-05 17:16:17', NULL, NULL, 1);

-- --------------------------------------------------------

--
-- Table structure for table `user_language_preferences`
--

CREATE TABLE IF NOT EXISTS `user_language_preferences` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `language_code` varchar(5) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`),
  KEY `language_code` (`language_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `vendors`
--

CREATE TABLE IF NOT EXISTS `vendors` (
  `id` int NOT NULL AUTO_INCREMENT,
  `primary_store_id` int DEFAULT NULL,
  `name` varchar(100) NOT NULL,
  `contact_number` varchar(20) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `address` text,
  `is_active` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=Active, 0=Inactive',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_vendors_store_id` (`primary_store_id`),
  KEY `idx_vendors_active` (`is_active`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `video_help`
--

CREATE TABLE IF NOT EXISTS `video_help` (
  `id` int NOT NULL AUTO_INCREMENT,
  `page_name` varchar(100) NOT NULL,
  `page_title` varchar(255) NOT NULL,
  `video_url` text NOT NULL,
  `video_title` varchar(255) NOT NULL,
  `description` text,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `page_name` (`page_name`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `video_help`
--

INSERT INTO `video_help` (`id`, `page_name`, `page_title`, `video_url`, `video_title`, `description`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'item_list', 'Item List', 'https://www.youtube.com/watch?v=9RousDb6aLE', 'How to Add/Manage Products', 'Learn how to add new products, edit existing ones, and manage your product inventory.', 1, '2025-08-17 14:35:17', '2025-08-17 14:35:17'),
(2, 'pos', 'POS System', 'https://www.youtube.com/watch?v=example2', 'How to Use POS System', 'Complete guide on using the Point of Sale system for sales transactions.', 1, '2025-08-17 14:35:17', '2025-08-17 14:35:17'),
(3, 'customer_list', 'Customer List', 'https://www.youtube.com/watch?v=example3', 'Customer Management', 'How to add, edit, and manage customer information.', 1, '2025-08-17 14:35:17', '2025-08-17 14:35:17'),
(4, 'supplier_list', 'Supplier List', 'https://www.youtube.com/watch?v=example4', 'Supplier Management', 'Learn how to manage your suppliers and their information.', 1, '2025-08-17 14:35:17', '2025-08-17 14:35:17'),
(5, 'sales_report', 'Sales Report', 'https://www.youtube.com/watch?v=example5', 'Understanding Sales Reports', 'How to read and analyze your sales reports.', 1, '2025-08-17 14:35:17', '2025-08-17 14:35:17'),
(6, 'purchase_list', 'Purchase List', 'https://www.youtube.com/watch?v=example6', 'Purchase Management', 'How to manage purchases and purchase orders.', 1, '2025-08-17 14:35:17', '2025-08-17 14:35:17'),
(7, 'inventory_report', 'Inventory Report', 'https://www.youtube.com/watch?v=example7', 'Inventory Management', 'Understanding your inventory levels and stock reports.', 1, '2025-08-17 14:35:17', '2025-08-17 14:35:17'),
(8, 'settings', 'System Settings', 'https://www.youtube.com/watch?v=example8', 'System Configuration', 'How to configure your system settings and preferences.', 1, '2025-08-17 14:35:17', '2025-08-17 14:35:17'),
(9, 'expense_list', 'Expense List', 'https://youtu.be/HWp9z6GPpZs?si=spRqItxMw67hMZ7X', 'Expense Module ', 'How to Add & Manage Expenses Easily', 1, '2025-07-26 17:59:57', '2025-07-26 17:59:57'),
(10, 'stock_balance_report', 'Stock Balance Report', 'https://www.youtube.com/watch?v=QsARFJimbjc', 'ITR POS Stock Balance Report', 'Track Stock In, Out & Quantity Easily', 1, '2025-07-26 17:59:57', '2025-07-26 17:59:57');

-- --------------------------------------------------------

--
-- Table structure for table `void_items`
--

CREATE TABLE IF NOT EXISTS `void_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `source_type` enum('hold','sale') NOT NULL,
  `source_id` int NOT NULL,
  `hold_item_id` int DEFAULT NULL,
  `sale_item_id` int DEFAULT NULL,
  `item_id` int NOT NULL,
  `item_name` varchar(255) NOT NULL,
  `quantity` int NOT NULL,
  `unit_price` decimal(10,2) NOT NULL,
  `tax_rate` decimal(6,2) DEFAULT NULL,
  `modifiers` json DEFAULT NULL,
  `remarks` varchar(500) DEFAULT NULL,
  `void_reason_id` int NOT NULL,
  `voided_by` int NOT NULL,
  `voided_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_source` (`source_type`,`source_id`),
  KEY `idx_item_id` (`item_id`),
  KEY `idx_voided_at` (`voided_at`),
  KEY `idx_voided_by` (`voided_by`),
  KEY `idx_void_reason` (`void_reason_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `void_orders`
--

CREATE TABLE IF NOT EXISTS `void_orders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `store_id` int DEFAULT NULL,
  `sale_id` int NOT NULL,
  `void_reason_id` int NOT NULL,
  `voided_by` int NOT NULL,
  `voided_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `notes` text,
  `original_amount` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`),
  KEY `void_reason_id` (`void_reason_id`),
  KEY `voided_by` (`voided_by`),
  KEY `idx_void_orders_store_id` (`store_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `void_reasons`
--

CREATE TABLE IF NOT EXISTS `void_reasons` (
  `id` int NOT NULL AUTO_INCREMENT,
  `reason_name` varchar(100) NOT NULL,
  `description` text,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `warranties`
--

CREATE TABLE IF NOT EXISTS `warranties` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `months` int UNSIGNED NOT NULL DEFAULT '0',
  `days` int UNSIGNED NOT NULL DEFAULT '0',
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_warranty_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `warranties`
--

INSERT INTO `warranties` (`id`, `name`, `months`, `days`, `is_active`, `created_at`) VALUES
(1, 'No Warranty', 0, 0, 1, '2025-11-05 22:16:45'),
(2, '3 Months', 3, 0, 1, '2025-11-05 22:16:45'),
(3, '6 Months', 6, 0, 1, '2025-11-05 22:16:45'),
(4, '1 Year', 12, 0, 1, '2025-11-05 22:16:45'),
(5, '2 Years', 24, 0, 1, '2025-11-05 22:16:45');

-- --------------------------------------------------------

--
-- Structure for view `order_taker_summary`
--

DROP VIEW IF EXISTS `order_taker_summary`;
CREATE ALGORITHM=UNDEFINED DEFINER=`itresources`@`localhost` SQL SECURITY DEFINER VIEW `order_taker_summary`  AS SELECT `ot`.`id` AS `id`, `ot`.`name` AS `name`, `ot`.`employee_id` AS `employee_id`, `ot`.`commission_rate` AS `commission_rate`, count(distinct `ho`.`id`) AS `total_hold_orders`, count(distinct `s`.`id`) AS `total_completed_orders`, sum(coalesce(`ho`.`total_amount`,0)) AS `total_hold_amount`, sum(coalesce(`s`.`total_amount`,0)) AS `total_completed_amount`, avg(coalesce(`ho`.`total_amount`,0)) AS `avg_hold_order`, avg(coalesce(`s`.`total_amount`,0)) AS `avg_completed_order`, sum(((coalesce(`s`.`total_amount`,0) * `ot`.`commission_rate`) / 100)) AS `total_commission` FROM ((`order_takers` `ot` left join `hold_orders` `ho` on((`ot`.`id` = `ho`.`order_taker_id`))) left join `sales` `s` on((`ot`.`id` = `s`.`order_taker_id`))) WHERE (`ot`.`is_active` = 1) GROUP BY `ot`.`id`, `ot`.`name`, `ot`.`employee_id`, `ot`.`commission_rate` ;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `item_serial_transactions`
--
ALTER TABLE `item_serial_transactions`
  ADD CONSTRAINT `fk_serial_trans_serial` FOREIGN KEY (`serial_id`) REFERENCES `item_serials` (`id`) ON DELETE CASCADE;
COMMIT;

