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

START TRANSACTION;



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

--
-- Table structure for table `ospos_attribute_definitions`
--

CREATE TABLE `ospos_attribute_definitions` (
  `definition_id` int(10) NOT NULL,
  `definition_name` varchar(255) NOT NULL,
  `definition_type` varchar(45) NOT NULL,
  `definition_unit` varchar(16) DEFAULT NULL,
  `definition_flags` tinyint(1) NOT NULL,
  `definition_fk` int(10) DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_attribute_definitions`
--

INSERT INTO `ospos_attribute_definitions` (`definition_id`, `definition_name`, `definition_type`, `definition_unit`, `definition_flags`, `definition_fk`, `deleted`) VALUES
(-1, 'ospos_category', 'DROPDOWN', NULL, 0, NULL, 1),
(1, 'Something', 'DROPDOWN', NULL, 7, NULL, 1),
(2, 'Something', 'DROPDOWN', NULL, 7, NULL, 1),
(3, 'Something', 'TEXT', NULL, 7, NULL, 1),
(4, 'Something', 'GROUP', NULL, 7, NULL, 1),
(5, 'Something 2', 'GROUP', NULL, 7, 4, 1),
(6, 'asd', 'DECIMAL', 'asd', 7, NULL, 1),
(7, 'asd', 'CHECKBOX', NULL, 7, 4, 1),
(10, 'Something', 'DROPDOWN', NULL, 1, 4, 1),
(11, 'Shafy', 'DROPDOWN', NULL, 1, NULL, 0),
(12, 'Shirts', 'DROPDOWN', NULL, 7, NULL, 0),
(13, 'Shirts', 'GROUP', NULL, 7, NULL, 0),
(14, 'Red', 'DROPDOWN', NULL, 7, 13, 0),
(15, 'asd', 'GROUP', NULL, 7, NULL, 1),
(16, 'gsd', 'GROUP', NULL, 7, NULL, 1),
(17, 'csd', 'GROUP', NULL, 7, NULL, 1),
(18, 'chsd', 'CHECKBOX', NULL, 7, NULL, 1),
(19, 'chgd', 'GROUP', NULL, 7, NULL, 1),
(20, 'chgd', 'CHECKBOX', NULL, 7, NULL, 1),
(21, 'chgd', 'CHECKBOX', NULL, 7, 13, 1),
(22, 'chsd', 'CHECKBOX', NULL, 7, 15, 1),
(23, 'Batch', 'GROUP', NULL, 7, NULL, 1),
(24, 'Batch', 'TEXT', NULL, 7, NULL, 0);

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

--
-- Table structure for table `ospos_attribute_links`
--

CREATE TABLE `ospos_attribute_links` (
  `attribute_id` int(11) DEFAULT NULL,
  `definition_id` int(11) NOT NULL,
  `item_id` int(11) DEFAULT NULL,
  `sale_id` int(11) DEFAULT NULL,
  `receiving_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_attribute_links`
--

INSERT INTO `ospos_attribute_links` (`attribute_id`, `definition_id`, `item_id`, `sale_id`, `receiving_id`) VALUES
(1, -1, NULL, NULL, NULL),
(1, 2, NULL, NULL, NULL),
(2, -1, NULL, NULL, NULL),
(2, 2, NULL, NULL, NULL),
(3, 10, NULL, NULL, NULL),
(4, -1, NULL, NULL, NULL),
(5, 14, NULL, NULL, NULL),
(6, 14, NULL, NULL, NULL),
(7, 14, NULL, NULL, NULL),
(8, 14, NULL, NULL, NULL),
(9, 22, 30, NULL, NULL),
(9, 22, 30, NULL, 4),
(9, 22, 30, NULL, 5),
(9, 22, 30, NULL, 6),
(9, 22, 30, NULL, 7),
(9, 22, 30, NULL, 8),
(9, 22, 30, NULL, 9),
(10, 24, 37, NULL, NULL),
(11, 24, 38, NULL, NULL),
(12, 24, 39, NULL, NULL);

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

--
-- Table structure for table `ospos_attribute_values`
--

CREATE TABLE `ospos_attribute_values` (
  `attribute_id` int(11) NOT NULL,
  `attribute_value` varchar(255) DEFAULT NULL,
  `attribute_date` date DEFAULT NULL,
  `attribute_decimal` decimal(7,3) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_attribute_values`
--

INSERT INTO `ospos_attribute_values` (`attribute_id`, `attribute_value`, `attribute_date`, `attribute_decimal`) VALUES
(1, 'A', NULL, NULL),
(2, 'B', NULL, NULL),
(3, '1 SM', NULL, NULL),
(4, 'C', NULL, NULL),
(5, 'SM', NULL, NULL),
(6, 'MD', NULL, NULL),
(7, 'LG', NULL, NULL),
(8, 'XXL', NULL, NULL),
(9, '1', NULL, NULL),
(10, '04-14', NULL, NULL),
(11, '05-16', NULL, NULL),
(12, '', NULL, NULL);

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

--
-- Table structure for table `ospos_bookings`
--

CREATE TABLE `ospos_bookings` (
  `booking_id` int(11) NOT NULL,
  `marqueeName` varchar(255) DEFAULT NULL,
  `hallNo` varchar(255) DEFAULT NULL,
  `bookingDate` varchar(255) DEFAULT NULL,
  `guestsNo` varchar(255) DEFAULT NULL,
  `clientName` varchar(255) DEFAULT NULL,
  `clientAddress` varchar(255) DEFAULT NULL,
  `clientContact` varchar(255) DEFAULT NULL,
  `services` text DEFAULT NULL,
  `amount` varchar(255) DEFAULT NULL,
  `packageName` varchar(255) DEFAULT NULL,
  `advance` varchar(255) DEFAULT NULL,
  `comments` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `ospos_bookings`
--

INSERT INTO `ospos_bookings` (`booking_id`, `marqueeName`, `hallNo`, `bookingDate`, `guestsNo`, `clientName`, `clientAddress`, `clientContact`, `services`, `amount`, `packageName`, `advance`, `comments`) VALUES
(12, 'sfdgsr', '5', '15-1-25', '12', 'ali', '234 dsfagrgfva', '36525452421', '', '', '', '', '');

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

--
-- Table structure for table `ospos_cash_up`
--

CREATE TABLE `ospos_cash_up` (
  `cashup_id` int(10) NOT NULL,
  `open_date` timestamp NULL DEFAULT current_timestamp(),
  `close_date` timestamp NULL DEFAULT NULL,
  `open_amount_cash` decimal(15,2) NOT NULL,
  `transfer_amount_cash` decimal(15,2) NOT NULL,
  `note` int(1) NOT NULL,
  `closed_amount_cash` decimal(15,2) NOT NULL,
  `closed_amount_card` decimal(15,2) NOT NULL,
  `closed_amount_check` decimal(15,2) NOT NULL,
  `closed_amount_total` decimal(15,2) NOT NULL,
  `description` varchar(255) NOT NULL,
  `open_employee_id` int(10) NOT NULL,
  `close_employee_id` int(10) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT 0,
  `closed_amount_due` decimal(15,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_categories`
--

CREATE TABLE `ospos_categories` (
  `category_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `previous_level` int(11) NOT NULL DEFAULT 0,
  `level` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `ospos_categories`
--

INSERT INTO `ospos_categories` (`category_id`, `name`, `previous_level`, `level`, `created_at`) VALUES
(1, 'Shirts', 0, 1, '2024-05-08 09:09:28'),
(2, 'Red', 1, 2, '2024-05-08 09:10:23'),
(3, 'Large', 2, 3, '2024-05-08 09:10:29'),
(5, 'Clothing', 0, 1, '2024-05-09 08:35:36'),
(6, 'Shirts', 5, 2, '2024-05-09 08:35:44'),
(7, 'Formal', 5, 2, '2024-05-09 08:35:49'),
(8, 'Red', 6, 3, '2024-05-09 08:36:22');

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

--
-- Table structure for table `ospos_customers`
--

CREATE TABLE `ospos_customers` (
  `person_id` int(10) NOT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `account_number` varchar(255) DEFAULT NULL,
  `taxable` tinyint(1) NOT NULL DEFAULT 1,
  `tax_id` varchar(32) NOT NULL DEFAULT '',
  `sales_tax_code_id` int(11) DEFAULT NULL,
  `discount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `discount_type` tinyint(1) NOT NULL DEFAULT 0,
  `package_id` int(11) DEFAULT NULL,
  `points` int(11) DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT 0,
  `date` timestamp NOT NULL DEFAULT current_timestamp(),
  `employee_id` int(10) NOT NULL,
  `consent` int(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_customers`
--

INSERT INTO `ospos_customers` (`person_id`, `company_name`, `account_number`, `taxable`, `tax_id`, `sales_tax_code_id`, `discount`, `discount_type`, `package_id`, `points`, `deleted`, `date`, `employee_id`, `consent`) VALUES
(2, NULL, NULL, 1, '', NULL, '0.00', 0, NULL, NULL, 0, '2024-05-06 02:43:33', 1, 1),
(4, NULL, NULL, 1, '', NULL, '0.00', 0, NULL, NULL, 0, '2024-05-10 03:06:36', 1, 1),
(7, NULL, NULL, 1, '', NULL, '0.00', 0, NULL, NULL, 0, '2024-06-06 03:17:33', 1, 1);

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

--
-- Table structure for table `ospos_customers_packages`
--

CREATE TABLE `ospos_customers_packages` (
  `package_id` int(11) NOT NULL,
  `package_name` varchar(255) DEFAULT NULL,
  `points_percent` float NOT NULL DEFAULT 0,
  `deleted` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_customers_packages`
--

INSERT INTO `ospos_customers_packages` (`package_id`, `package_name`, `points_percent`, `deleted`) VALUES
(1, 'Default', 0, 0),
(2, 'Bronze', 10, 0),
(3, 'Silver', 20, 0),
(4, 'Gold', 30, 0),
(5, 'Premium', 50, 0);

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

--
-- Table structure for table `ospos_customers_points`
--

CREATE TABLE `ospos_customers_points` (
  `id` int(11) NOT NULL,
  `person_id` int(11) NOT NULL,
  `package_id` int(11) NOT NULL,
  `sale_id` int(11) NOT NULL,
  `points_earned` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_dinner_tables`
--

CREATE TABLE `ospos_dinner_tables` (
  `dinner_table_id` int(11) NOT NULL,
  `name` varchar(30) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 0,
  `deleted` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_dinner_tables`
--

INSERT INTO `ospos_dinner_tables` (`dinner_table_id`, `name`, `status`, `deleted`) VALUES
(1, 'Delivery', 0, 0),
(2, 'Take Away', 0, 0);

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

--
-- Table structure for table `ospos_expenses`
--

CREATE TABLE `ospos_expenses` (
  `expense_id` int(10) NOT NULL,
  `date` timestamp NULL DEFAULT current_timestamp(),
  `amount` decimal(15,2) NOT NULL,
  `payment_type` varchar(40) NOT NULL,
  `expense_category_id` int(11) NOT NULL,
  `description` varchar(255) NOT NULL,
  `employee_id` int(10) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT 0,
  `supplier_tax_code` varchar(255) DEFAULT NULL,
  `tax_amount` decimal(15,2) DEFAULT NULL,
  `supplier_id` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_expenses`
--

INSERT INTO `ospos_expenses` (`expense_id`, `date`, `amount`, `payment_type`, `expense_category_id`, `description`, `employee_id`, `deleted`, `supplier_tax_code`, `tax_amount`, `supplier_id`) VALUES
(2, '2024-05-09 04:45:07', '500.00', 'Cash', 1, '', 1, 0, 'entertainment', '0.00', NULL),
(3, '2024-05-09 04:45:43', '700.00', 'Cash', 1, '', 1, 0, 'entertainment', '0.00', NULL);

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

--
-- Table structure for table `ospos_expense_categories`
--

CREATE TABLE `ospos_expense_categories` (
  `expense_category_id` int(10) NOT NULL,
  `category_name` varchar(255) DEFAULT NULL,
  `category_description` varchar(255) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_expense_categories`
--

INSERT INTO `ospos_expense_categories` (`expense_category_id`, `category_name`, `category_description`, `deleted`) VALUES
(1, 'AAA', 'AAA', 0),
(2, 'AAAdsdsds', 'dsddsdd', 0);

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

--
-- Table structure for table `ospos_giftcards`
--

CREATE TABLE `ospos_giftcards` (
  `record_time` timestamp NOT NULL DEFAULT current_timestamp(),
  `giftcard_id` int(11) NOT NULL,
  `giftcard_number` varchar(255) DEFAULT NULL,
  `value` decimal(15,2) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT 0,
  `person_id` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_grants`
--

CREATE TABLE `ospos_grants` (
  `permission_id` varchar(255) NOT NULL,
  `person_id` int(10) NOT NULL,
  `menu_group` varchar(32) DEFAULT 'home'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_grants`
--

INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
('attributes', 1, 'office'),
('attributes', 3, 'home'),
('bookings', 1, 'home'),
('cashups', 1, 'office'),
('categories', 1, 'office'),
('categories', 3, 'home'),
('config', 1, 'office'),
('customers', 1, 'home'),
('customers', 3, 'home'),
('employees', 1, 'office'),
('employees', 3, 'home'),
('expenses', 1, 'home'),
('expenses', 3, 'home'),
('expenses_categories', 1, 'office'),
('expenses_categories', 3, 'home'),
('giftcards', 1, 'home'),
('home', 1, 'office'),
('items', 1, 'home'),
('items', 3, 'both'),
('items_st2', 1, 'home'),
('items_st3', 1, 'home'),
('items_stock', 1, '--'),
('items_Store_1', 1, 'home'),
('items_Store_1', 3, '--'),
('items_Store_2', 1, 'home'),
('items_Store_2', 3, '--'),
('items_Store_3', 1, 'home'),
('item_kits', 1, 'home'),
('item_kits', 3, 'home'),
('messages', 1, 'home'),
('office', 1, 'home'),
('receivings', 1, 'home'),
('receivings', 3, 'home'),
('receivings_st2', 1, 'home'),
('receivings_st3', 1, 'home'),
('receivings_stock', 1, '--'),
('receivings_Store_1', 1, 'home'),
('receivings_Store_1', 3, '--'),
('receivings_Store_2', 1, 'home'),
('receivings_Store_3', 1, 'home'),
('reports', 1, 'home'),
('reports', 3, 'home'),
('reports_categories', 1, '--'),
('reports_categories', 3, '--'),
('reports_customers', 1, '--'),
('reports_discounts', 1, '--'),
('reports_employees', 1, '--'),
('reports_expenses_categories', 1, '--'),
('reports_inventory', 1, '--'),
('reports_items', 1, '--'),
('reports_payments', 1, '--'),
('reports_receivings', 1, '--'),
('reports_sales', 1, '--'),
('reports_sales_taxes', 1, '--'),
('reports_suppliers', 1, '--'),
('reports_taxes', 1, '--'),
('sales', 1, 'home'),
('sales', 3, 'home'),
('sales_change_price', 1, '--'),
('sales_delete', 1, '--'),
('sales_st2', 1, 'home'),
('sales_st3', 1, 'home'),
('sales_stock', 1, '--'),
('sales_Store_1', 1, 'home'),
('sales_Store_1', 3, '--'),
('sales_Store_2', 1, 'home'),
('sales_Store_2', 3, '--'),
('sales_Store_3', 1, 'home'),
('suppliers', 1, 'home'),
('suppliers', 3, 'home'),
('taxes', 1, 'office'),
('taxes', 3, 'home');

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

--
-- Table structure for table `ospos_inventory`
--

CREATE TABLE `ospos_inventory` (
  `trans_id` int(11) NOT NULL,
  `trans_items` int(11) NOT NULL DEFAULT 0,
  `trans_user` int(11) NOT NULL DEFAULT 0,
  `trans_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `trans_comment` text NOT NULL,
  `trans_location` int(11) NOT NULL,
  `trans_inventory` decimal(15,3) NOT NULL DEFAULT 0.000
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_inventory`
--

INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
(1, 1, 1, '2024-04-27 03:52:42', 'Manual Edit of Quantity', 1, '15.000'),
(2, 1, 1, '2024-04-27 03:52:57', 'Manual Edit of Quantity', 1, '-7.000'),
(3, 2, 1, '2024-04-27 05:56:11', 'Manual Edit of Quantity', 1, '15.000'),
(4, 3, 1, '2024-04-30 01:09:20', 'Manual Edit of Quantity', 1, '45.000'),
(5, 1, 1, '2024-05-02 06:38:03', 'Deleted', 1, '-8.000'),
(6, 2, 1, '2024-05-02 06:38:03', 'Deleted', 1, '-15.000'),
(7, 3, 1, '2024-05-02 08:27:44', 'Deleted', 1, '-45.000'),
(8, 4, 1, '2024-05-02 00:51:33', 'Manual Edit of Quantity', 1, '0.000'),
(9, 5, 1, '2024-05-02 00:58:01', 'Manual Edit of Quantity', 1, '0.000'),
(10, 6, 1, '2024-05-02 23:34:53', 'Manual Edit of Quantity', 2, '10.000'),
(11, 6, 1, '2024-05-02 23:34:54', 'Manual Edit of Quantity', 1, '52.000'),
(12, 7, 1, '2024-05-03 03:32:53', 'Manual Edit of Quantity', 1, '0.000'),
(13, 7, 1, '2024-05-03 03:32:53', 'Manual Edit of Quantity', 2, '0.000'),
(14, 7, 1, '2024-05-03 03:32:53', 'Manual Edit of Quantity', 3, '0.000'),
(15, 6, 1, '2024-05-06 22:06:06', 'POS 1', 1, '-1.000'),
(16, 6, 1, '2024-05-06 22:11:13', 'RECV 1', 1, '50.000'),
(17, 8, 1, '2024-05-06 22:13:14', 'Manual Edit of Quantity', 1, '10.000'),
(18, 8, 1, '2024-05-06 22:13:14', 'Manual Edit of Quantity', 2, '10.000'),
(19, 8, 1, '2024-05-06 22:13:14', 'Manual Edit of Quantity', 3, '10.000'),
(20, 8, 1, '2024-05-06 22:16:00', 'RECV 2', 1, '40.000'),
(21, 8, 1, '2024-05-06 22:17:13', 'RECV 3', 1, '20.000'),
(22, 8, 1, '2024-05-06 22:19:37', 'POS 2', 1, '-50.000'),
(23, 9, 1, '2024-05-07 20:46:00', 'Manual Edit of Quantity', 1, '0.000'),
(24, 9, 1, '2024-05-07 20:46:00', 'Manual Edit of Quantity', 2, '0.000'),
(25, 9, 1, '2024-05-07 20:46:00', 'Manual Edit of Quantity', 3, '0.000'),
(26, 10, 1, '2024-05-07 20:46:07', 'Manual Edit of Quantity', 1, '0.000'),
(27, 10, 1, '2024-05-07 20:46:07', 'Manual Edit of Quantity', 2, '0.000'),
(28, 10, 1, '2024-05-07 20:46:07', 'Manual Edit of Quantity', 3, '0.000'),
(29, 11, 1, '2024-05-07 20:46:11', 'Manual Edit of Quantity', 1, '0.000'),
(30, 11, 1, '2024-05-07 20:46:11', 'Manual Edit of Quantity', 2, '0.000'),
(31, 11, 1, '2024-05-07 20:46:11', 'Manual Edit of Quantity', 3, '0.000'),
(32, 12, 1, '2024-05-07 20:46:15', 'Manual Edit of Quantity', 1, '0.000'),
(33, 12, 1, '2024-05-07 20:46:15', 'Manual Edit of Quantity', 2, '0.000'),
(34, 12, 1, '2024-05-07 20:46:15', 'Manual Edit of Quantity', 3, '0.000'),
(35, 13, 1, '2024-05-07 20:46:18', 'Manual Edit of Quantity', 1, '0.000'),
(36, 13, 1, '2024-05-07 20:46:18', 'Manual Edit of Quantity', 2, '0.000'),
(37, 13, 1, '2024-05-07 20:46:18', 'Manual Edit of Quantity', 3, '0.000'),
(38, 14, 1, '2024-05-07 20:46:22', 'Manual Edit of Quantity', 1, '0.000'),
(39, 14, 1, '2024-05-07 20:46:22', 'Manual Edit of Quantity', 2, '0.000'),
(40, 14, 1, '2024-05-07 20:46:22', 'Manual Edit of Quantity', 3, '0.000'),
(41, 15, 1, '2024-05-07 20:46:26', 'Manual Edit of Quantity', 1, '0.000'),
(42, 15, 1, '2024-05-07 20:46:26', 'Manual Edit of Quantity', 2, '0.000'),
(43, 15, 1, '2024-05-07 20:46:26', 'Manual Edit of Quantity', 3, '0.000'),
(44, 16, 1, '2024-05-07 20:46:30', 'Manual Edit of Quantity', 1, '0.000'),
(45, 16, 1, '2024-05-07 20:46:30', 'Manual Edit of Quantity', 2, '0.000'),
(46, 16, 1, '2024-05-07 20:46:30', 'Manual Edit of Quantity', 3, '0.000'),
(47, 17, 1, '2024-05-07 20:46:34', 'Manual Edit of Quantity', 1, '0.000'),
(48, 17, 1, '2024-05-07 20:46:34', 'Manual Edit of Quantity', 2, '0.000'),
(49, 17, 1, '2024-05-07 20:46:34', 'Manual Edit of Quantity', 3, '0.000'),
(50, 18, 1, '2024-05-07 20:46:38', 'Manual Edit of Quantity', 1, '0.000'),
(51, 18, 1, '2024-05-07 20:46:38', 'Manual Edit of Quantity', 2, '0.000'),
(52, 18, 1, '2024-05-07 20:46:38', 'Manual Edit of Quantity', 3, '0.000'),
(53, 19, 1, '2024-05-08 02:11:32', 'Manual Edit of Quantity', 1, '0.000'),
(54, 19, 1, '2024-05-08 02:11:32', 'Manual Edit of Quantity', 2, '0.000'),
(55, 19, 1, '2024-05-08 02:11:32', 'Manual Edit of Quantity', 3, '0.000'),
(56, 6, 1, '2024-05-08 11:11:56', 'Deleted', 1, '-101.000'),
(57, 8, 1, '2024-05-08 11:11:56', 'Deleted', 1, '-20.000'),
(58, 20, 1, '2024-05-08 02:12:16', 'Manual Edit of Quantity', 1, '0.000'),
(59, 20, 1, '2024-05-08 02:12:16', 'Manual Edit of Quantity', 2, '0.000'),
(60, 20, 1, '2024-05-08 02:12:16', 'Manual Edit of Quantity', 3, '0.000'),
(61, 21, 1, '2024-05-08 03:53:04', 'Manual Edit of Quantity', 1, '0.000'),
(62, 21, 1, '2024-05-08 03:53:04', 'Manual Edit of Quantity', 2, '0.000'),
(63, 21, 1, '2024-05-08 03:53:04', 'Manual Edit of Quantity', 3, '0.000'),
(64, 22, 1, '2024-05-08 03:55:09', 'Manual Edit of Quantity', 1, '0.000'),
(65, 22, 1, '2024-05-08 03:55:09', 'Manual Edit of Quantity', 2, '0.000'),
(66, 22, 1, '2024-05-08 03:55:09', 'Manual Edit of Quantity', 3, '0.000'),
(67, 23, 1, '2024-05-08 03:59:08', 'Manual Edit of Quantity', 1, '0.000'),
(68, 23, 1, '2024-05-08 03:59:08', 'Manual Edit of Quantity', 2, '0.000'),
(69, 23, 1, '2024-05-08 03:59:08', 'Manual Edit of Quantity', 3, '0.000'),
(70, 24, 1, '2024-05-08 23:00:54', 'Manual Edit of Quantity', 1, '0.000'),
(71, 24, 1, '2024-05-08 23:00:54', 'Manual Edit of Quantity', 2, '0.000'),
(72, 24, 1, '2024-05-08 23:00:54', 'Manual Edit of Quantity', 3, '0.000'),
(73, 25, 1, '2024-05-08 23:06:56', 'Manual Edit of Quantity', 1, '0.000'),
(74, 25, 1, '2024-05-08 23:06:56', 'Manual Edit of Quantity', 2, '0.000'),
(75, 25, 1, '2024-05-08 23:06:57', 'Manual Edit of Quantity', 3, '0.000'),
(76, 26, 1, '2024-05-08 23:28:57', 'Manual Edit of Quantity', 1, '0.000'),
(77, 26, 1, '2024-05-08 23:28:57', 'Manual Edit of Quantity', 2, '0.000'),
(78, 26, 1, '2024-05-08 23:28:57', 'Manual Edit of Quantity', 3, '0.000'),
(79, 27, 1, '2024-05-08 23:29:43', 'Manual Edit of Quantity', 1, '0.000'),
(80, 27, 1, '2024-05-08 23:29:43', 'Manual Edit of Quantity', 2, '0.000'),
(81, 27, 1, '2024-05-08 23:29:43', 'Manual Edit of Quantity', 3, '0.000'),
(82, 28, 3, '2024-05-09 00:21:00', 'Manual Edit of Quantity', 1, '5.000'),
(83, 28, 3, '2024-05-09 00:21:42', 'POS 3', 1, '-5.000'),
(84, 29, 3, '2024-05-09 00:36:15', 'Manual Edit of Quantity', 1, '5.000'),
(85, 29, 3, '2024-05-09 00:36:15', 'Manual Edit of Quantity', 2, '10.000'),
(86, 29, 3, '2024-05-09 00:37:20', 'POS 4', 1, '-5.000'),
(87, 30, 1, '2024-05-09 00:58:52', 'Manual Edit of Quantity', 1, '0.000'),
(88, 30, 1, '2024-05-09 00:58:52', 'Manual Edit of Quantity', 2, '0.000'),
(89, 30, 1, '2024-05-09 00:58:52', 'Manual Edit of Quantity', 3, '0.000'),
(90, 30, 1, '2024-05-09 00:59:47', 'RECV 4', 1, '1.000'),
(91, 30, 1, '2024-05-09 01:00:19', 'RECV 5', 1, '20.000'),
(92, 30, 1, '2024-05-09 01:58:40', 'RECV 6', 1, '150.000'),
(93, 30, 1, '2024-05-09 01:59:23', 'RECV 7', 1, '330.000'),
(94, 30, 1, '2024-05-09 02:03:31', 'RECV 8', 2, '10.000'),
(95, 30, 1, '2024-05-09 02:35:14', 'RECV 9', 2, '100.000'),
(96, 31, 1, '2024-05-09 02:41:20', 'Manual Edit of Quantity', 1, '100.000'),
(97, 31, 1, '2024-05-09 02:41:20', 'Manual Edit of Quantity', 2, '0.000'),
(98, 31, 1, '2024-05-09 02:41:20', 'Manual Edit of Quantity', 3, '0.000'),
(99, 31, 1, '2024-05-09 02:43:08', 'RECV 10', 1, '2000.000'),
(100, 29, 1, '2024-05-09 11:46:04', 'Deleted', 2, '-10.000'),
(101, 30, 1, '2024-05-09 11:46:04', 'Deleted', 1, '-501.000'),
(102, 31, 1, '2024-05-09 11:46:04', 'Deleted', 1, '-2100.000'),
(103, 32, 1, '2024-05-09 02:47:08', 'Manual Edit of Quantity', 1, '0.000'),
(104, 32, 1, '2024-05-09 02:47:08', 'Manual Edit of Quantity', 2, '0.000'),
(105, 32, 1, '2024-05-09 02:47:08', 'Manual Edit of Quantity', 3, '0.000'),
(106, 32, 1, '2024-05-09 02:48:53', 'RECV 11', 1, '20.000'),
(107, 32, 1, '2024-05-09 02:51:58', 'RECV 12', 1, '100.000'),
(108, 33, 1, '2024-05-09 02:53:19', 'Manual Edit of Quantity', 1, '100.000'),
(109, 33, 1, '2024-05-09 02:53:19', 'Manual Edit of Quantity', 2, '0.000'),
(110, 33, 1, '2024-05-09 02:53:19', 'Manual Edit of Quantity', 3, '0.000'),
(111, 33, 1, '2024-05-09 02:53:49', 'RECV 13', 1, '20.000'),
(112, 33, 1, '2024-05-09 02:55:44', 'POS 5', 1, '-30.000'),
(113, 33, 1, '2024-05-09 02:57:25', 'RECV 14', 1, '60.000'),
(114, 33, 1, '2024-05-09 03:03:03', 'Deleting sale 5', 1, '30.000'),
(115, 33, 1, '2024-05-09 03:04:05', 'POS 6', 1, '-30.000'),
(116, 34, 1, '2024-05-10 01:34:02', 'Manual Edit of Quantity', 1, '0.000'),
(117, 34, 1, '2024-05-10 01:34:02', 'Manual Edit of Quantity', 2, '0.000'),
(118, 34, 1, '2024-05-10 01:34:02', 'Manual Edit of Quantity', 3, '0.000'),
(119, 35, 1, '2024-05-10 01:40:08', 'Manual Edit of Quantity', 1, '0.000'),
(120, 35, 1, '2024-05-10 01:40:08', 'Manual Edit of Quantity', 2, '0.000'),
(121, 35, 1, '2024-05-10 01:40:08', 'Manual Edit of Quantity', 3, '0.000'),
(122, 35, 1, '2024-05-10 01:40:47', 'POS 7', 1, '-1.000'),
(123, 34, 1, '2024-05-10 04:48:45', 'POS 8', 1, '-1.000'),
(124, 32, 1, '2024-05-29 23:36:22', 'POS 9', 1, '-3.000'),
(125, 33, 1, '2024-05-29 23:54:07', 'POS 10', 1, '-1.000'),
(126, 32, 1, '2024-05-30 00:41:03', 'POS 11', 1, '-1.000'),
(127, 32, 1, '2024-05-30 01:29:24', 'RECV 15', 1, '100.000'),
(128, 32, 1, '2024-06-05 04:02:52', 'POS 12', 1, '0.000'),
(129, 32, 1, '2024-06-05 04:28:35', 'RECV 16', 1, '-100.000'),
(130, 33, 1, '2024-06-05 04:28:35', 'RECV 16', 1, '-1.000'),
(131, 33, 1, '2024-06-06 02:32:41', 'POS 13', 1, '-1.000'),
(132, 33, 1, '2024-06-06 02:48:46', 'POS 14', 1, '-1.000'),
(133, 33, 1, '2024-06-06 02:49:20', 'POS 15', 1, '-1.000'),
(134, 33, 1, '2024-06-06 03:07:16', 'Deleting sale 15', 1, '1.000'),
(135, 33, 1, '2024-06-06 03:08:20', 'POS 16', 1, '1.000'),
(136, 34, 1, '2024-06-06 03:12:24', 'RECV 17', 1, '5.000'),
(137, 32, 1, '2024-06-06 03:13:08', 'POS 17', 1, '-3.000'),
(138, 33, 1, '2024-06-06 03:13:08', 'POS 17', 1, '-1.000'),
(139, 34, 1, '2024-06-06 03:13:08', 'POS 17', 1, '-1.000'),
(140, 33, 1, '2024-06-06 03:16:11', 'POS 19', 1, '-1.000'),
(141, 22, 1, '2024-06-06 04:06:05', 'Manual Edit of Quantity', 1, '3.000'),
(142, 22, 1, '2024-06-06 04:06:05', 'Manual Edit of Quantity', 2, '1.000'),
(143, 36, 1, '2024-06-06 04:14:31', 'Manual Edit of Quantity', 1, '10.000'),
(144, 36, 1, '2024-06-06 04:14:31', 'Manual Edit of Quantity', 2, '0.000'),
(145, 36, 1, '2024-06-06 04:14:31', 'Manual Edit of Quantity', 3, '0.000'),
(146, 22, 1, '2024-06-06 05:13:25', 'Manual Edit of Quantity', 2, '14.000'),
(147, 32, 1, '2024-06-06 05:31:19', 'RECV 18', 1, '100.000'),
(148, 33, 1, '2024-06-06 05:31:19', 'RECV 18', 1, '1.000'),
(149, 37, 1, '2024-06-06 05:51:59', 'Manual Edit of Quantity', 1, '150.000'),
(150, 37, 1, '2024-06-06 05:51:59', 'Manual Edit of Quantity', 2, '0.000'),
(151, 37, 1, '2024-06-06 05:51:59', 'Manual Edit of Quantity', 3, '0.000'),
(152, 38, 1, '2024-06-06 05:52:49', 'Manual Edit of Quantity', 1, '189.000'),
(153, 38, 1, '2024-06-06 05:52:49', 'Manual Edit of Quantity', 2, '0.000'),
(154, 38, 1, '2024-06-06 05:52:49', 'Manual Edit of Quantity', 3, '0.000'),
(155, 38, 1, '2024-06-06 14:53:48', 'Deleted', 1, '-189.000'),
(156, 22, 1, '2024-06-11 23:05:06', 'Manual Edit of Quantity', 1, '-3.000'),
(157, 22, 1, '2024-06-11 23:05:06', 'Manual Edit of Quantity', 2, '-15.000'),
(158, 36, 1, '2024-06-11 23:17:15', 'RECV 19', 1, '100.000'),
(159, 36, 1, '2024-06-11 23:17:34', 'POS 20', 1, '-1.000'),
(160, 39, 1, '2024-06-12 03:12:48', 'Manual Edit of Quantity', 1, '50.000'),
(161, 39, 1, '2024-06-12 03:12:48', 'Manual Edit of Quantity', 2, '60.000'),
(162, 39, 1, '2024-06-12 03:12:48', 'Manual Edit of Quantity', 3, '40.000'),
(163, 22, 1, '2024-06-12 20:25:15', 'Manual Edit of Quantity', 1, '2.000'),
(164, 22, 1, '2024-06-12 20:25:15', 'Manual Edit of Quantity', 2, '2.000'),
(165, 22, 1, '2024-06-12 20:25:15', 'Manual Edit of Quantity', 3, '2.000'),
(166, 22, 1, '2024-06-12 20:25:37', 'Manual Edit of Quantity', 1, '8.000'),
(167, 33, 1, '2024-06-12 23:30:38', 'Manual Edit of Quantity', 1, '-106.000');

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

--
-- Table structure for table `ospos_items`
--

CREATE TABLE `ospos_items` (
  `name` varchar(255) NOT NULL,
  `category` varchar(255) NOT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `item_number` varchar(255) DEFAULT NULL,
  `description` varchar(255) NOT NULL,
  `cost_price` decimal(15,2) NOT NULL,
  `unit_price` decimal(15,2) NOT NULL,
  `reorder_level` decimal(15,3) NOT NULL DEFAULT 0.000,
  `receiving_quantity` decimal(15,3) NOT NULL DEFAULT 1.000,
  `item_id` int(10) NOT NULL,
  `pic_filename` varchar(255) DEFAULT NULL,
  `allow_alt_description` tinyint(1) NOT NULL,
  `is_serialized` tinyint(1) NOT NULL,
  `stock_type` tinyint(1) NOT NULL DEFAULT 0,
  `item_type` tinyint(1) NOT NULL DEFAULT 0,
  `deleted` tinyint(1) NOT NULL DEFAULT 0,
  `tax_category_id` int(10) DEFAULT NULL,
  `qty_per_pack` decimal(15,3) NOT NULL DEFAULT 1.000,
  `pack_name` varchar(8) DEFAULT 'Each',
  `low_sell_item_id` int(10) DEFAULT 0,
  `hsn_code` varchar(32) NOT NULL DEFAULT '',
  `category_id` int(255) NOT NULL,
  `category_name` varchar(255) NOT NULL,
  `pieces_in_making` int(11) DEFAULT NULL,
  `registered_no` varchar(255) DEFAULT NULL,
  `vendor_class` varchar(255) DEFAULT NULL,
  `generic_name` varchar(255) DEFAULT NULL,
  `max_sale_discount` decimal(5,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_items`
--

INSERT INTO `ospos_items` (`name`, `category`, `supplier_id`, `item_number`, `description`, `cost_price`, `unit_price`, `reorder_level`, `receiving_quantity`, `item_id`, `pic_filename`, `allow_alt_description`, `is_serialized`, `stock_type`, `item_type`, `deleted`, `tax_category_id`, `qty_per_pack`, `pack_name`, `low_sell_item_id`, `hsn_code`, `category_id`, `category_name`, `pieces_in_making`, `regitered_no`, `vendor_class`, `generic_name`, `max_sale_discount`) VALUES
('first test', 'inventory', NULL, NULL, '', '600.00', '700.00', '10.000', '15.000', 1, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 1, '', 0, '', NULL, NULL, NULL, NULL, NULL),
('pen', 'staitionary', NULL, NULL, '', '25.00', '30.00', '10.000', '15.000', 2, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 2, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('first test', 'sgsgs', NULL, NULL, '', '25.00', '45.00', '45.000', '45.000', 3, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 3, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'asd', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 4, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 4, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'asd', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 5, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 5, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('AAAAAAAAAAAAAAAAAAA', 'B', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 6, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('AAAAAAAAAAAAAAAAAAA', 'A', NULL, '323243557351', '', '0.00', '0.00', '1.000', '1.000', 7, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('coke', 'A', NULL, NULL, '', '100.00', '140.00', '1.000', '40.000', 8, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 9, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 10, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'B', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 11, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'B', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 12, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'B', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 13, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 14, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 15, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'B', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 16, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'B', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 17, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'C', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 18, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asd', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 19, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '0', NULL, NULL, NULL, NULL, NULL),
('asdasd', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 20, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, 'red', NULL, NULL, NULL, NULL, NULL),
('dsfsdf', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 21, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '', NULL, NULL, NULL, NULL, NULL),
('1.5 ltr', 'A', NULL, NULL, '', '0.00', '0.00', '5.000', '1.000', 22, NULL, 0, 0, 0, 0, 0, 0, '1.000', 'Each', 22, '', 0, '', 2577, '1122', 'lays', '', '0.00'),
('asdasdasdsad', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 23, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 3, '', NULL, NULL, NULL, NULL, NULL),
('vzdfg zfgg', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 24, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 3, '', NULL, NULL, NULL, NULL, NULL),
('newr', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 25, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 3, '', NULL, NULL, NULL, NULL, NULL),
('test', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 26, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 3, 'Large', NULL, NULL, NULL, NULL, NULL),
('test', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 27, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 2, 'Red', NULL, NULL, NULL, NULL, NULL),
('Mark David', 'B', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 28, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 2, 'Red', NULL, NULL, NULL, NULL, NULL),
('Mark David', 'A', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 29, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 2, 'Red', NULL, NULL, NULL, NULL, NULL),
('Panadol', 'A', NULL, '123', '', '46.55', '15.00', '1.000', '10.000', 30, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '', NULL, NULL, NULL, NULL, NULL),
('clothing', 'A', NULL, NULL, '', '136.19', '60.00', '50.000', '100.000', 31, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 2, 'Red', NULL, NULL, NULL, NULL, NULL),
('clothing', 'A', NULL, NULL, '', '73.33', '60.00', '50.000', '100.000', 32, NULL, 0, 0, 0, 0, 0, 0, '1.000', 'Each', 0, '', 0, '', NULL, NULL, NULL, NULL, NULL),
('coke', 'A', NULL, NULL, '', '74.00', '60.00', '50.000', '1.000', 33, NULL, 0, 0, 0, 0, 0, 0, '1.000', 'Each', 33, '', 0, '', 0, '', '', '', '0.00'),
('Mark David', 'B', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 34, NULL, 0, 0, 0, 0, 0, 0, '1.000', 'Each', 0, '', 3, 'Large', NULL, NULL, NULL, NULL, NULL),
('1.5 ltr', 'lahore', NULL, NULL, '', '0.00', '0.00', '1.000', '1.000', 35, NULL, 0, 0, 0, 0, 1, 0, '1.000', 'Each', 0, '', 0, '', NULL, NULL, NULL, NULL, NULL),
('Shafy Test', 'Rack AB', 5, NULL, '', '120.00', '150.00', '1.000', '1.000', 36, NULL, 0, 0, 0, 0, 0, 0, '1.000', '', 0, '', 3, 'Large', NULL, NULL, NULL, NULL, NULL),
('Panadol', 'Rack 1', 8, NULL, '', '150.00', '200.00', '1.000', '100.000', 37, NULL, 0, 1, 0, 0, 0, 0, '10.000', 'Blister', 0, 'Alias', 8, 'Red', NULL, NULL, NULL, NULL, NULL),
('Panadol', 'Rack 1', 8, NULL, '', '150.00', '200.00', '10.000', '140.000', 38, NULL, 0, 1, 0, 0, 1, 0, '1.000', 'Each', 0, 'Alias', 0, '', NULL, NULL, NULL, NULL, NULL),
('lays', 'Rack 1', NULL, NULL, '', '140.00', '150.00', '5.000', '200.000', 39, NULL, 0, 0, 0, 0, 0, 0, '1.000', 'Each', 39, '', 0, '', 25, '1122', 'wavy', 'lays', '1.00');

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

--
-- Table structure for table `ospos_items_taxes`
--

CREATE TABLE `ospos_items_taxes` (
  `item_id` int(10) NOT NULL,
  `name` varchar(255) NOT NULL,
  `percent` decimal(15,3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_item_kits`
--

CREATE TABLE `ospos_item_kits` (
  `item_kit_id` int(11) NOT NULL,
  `item_kit_number` varchar(255) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `item_id` int(10) NOT NULL DEFAULT 0,
  `kit_discount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `kit_discount_type` tinyint(1) NOT NULL DEFAULT 0,
  `price_option` tinyint(1) NOT NULL DEFAULT 0,
  `print_option` tinyint(1) NOT NULL DEFAULT 0,
  `description` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_item_kits`
--

INSERT INTO `ospos_item_kits` (`item_kit_id`, `item_kit_number`, `name`, `item_id`, `kit_discount`, `kit_discount_type`, `price_option`, `print_option`, `description`) VALUES
(1, '', 'Mark David', 0, '0.00', 0, 0, 0, '');

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

--
-- Table structure for table `ospos_item_kit_items`
--

CREATE TABLE `ospos_item_kit_items` (
  `item_kit_id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `quantity` decimal(15,3) NOT NULL,
  `kit_sequence` int(3) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_item_quantities`
--

CREATE TABLE `ospos_item_quantities` (
  `item_id` int(11) NOT NULL,
  `location_id` int(11) NOT NULL,
  `quantity` decimal(15,3) NOT NULL DEFAULT 0.000
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_item_quantities`
--

INSERT INTO `ospos_item_quantities` (`item_id`, `location_id`, `quantity`) VALUES
(1, 1, '0.000'),
(2, 1, '0.000'),
(3, 1, '0.000'),
(4, 1, '0.000'),
(5, 1, '0.000'),
(6, 1, '0.000'),
(6, 2, '0.000'),
(6, 3, '0.000'),
(7, 1, '0.000'),
(7, 2, '0.000'),
(7, 3, '0.000'),
(8, 1, '0.000'),
(8, 2, '0.000'),
(8, 3, '0.000'),
(9, 1, '0.000'),
(9, 2, '0.000'),
(9, 3, '0.000'),
(10, 1, '0.000'),
(10, 2, '0.000'),
(10, 3, '0.000'),
(11, 1, '0.000'),
(11, 2, '0.000'),
(11, 3, '0.000'),
(12, 1, '0.000'),
(12, 2, '0.000'),
(12, 3, '0.000'),
(13, 1, '0.000'),
(13, 2, '0.000'),
(13, 3, '0.000'),
(14, 1, '0.000'),
(14, 2, '0.000'),
(14, 3, '0.000'),
(15, 1, '0.000'),
(15, 2, '0.000'),
(15, 3, '0.000'),
(16, 1, '0.000'),
(16, 2, '0.000'),
(16, 3, '0.000'),
(17, 1, '0.000'),
(17, 2, '0.000'),
(17, 3, '0.000'),
(18, 1, '0.000'),
(18, 2, '0.000'),
(18, 3, '0.000'),
(19, 1, '0.000'),
(19, 2, '0.000'),
(19, 3, '0.000'),
(20, 1, '0.000'),
(20, 2, '0.000'),
(20, 3, '0.000'),
(21, 1, '0.000'),
(21, 2, '0.000'),
(21, 3, '0.000'),
(22, 1, '10.000'),
(22, 2, '2.000'),
(22, 3, '2.000'),
(23, 1, '0.000'),
(23, 2, '0.000'),
(23, 3, '0.000'),
(24, 1, '0.000'),
(24, 2, '0.000'),
(24, 3, '0.000'),
(25, 1, '0.000'),
(25, 2, '0.000'),
(25, 3, '0.000'),
(26, 1, '0.000'),
(26, 2, '0.000'),
(26, 3, '0.000'),
(27, 1, '0.000'),
(27, 2, '0.000'),
(27, 3, '0.000'),
(28, 1, '0.000'),
(29, 1, '0.000'),
(29, 2, '0.000'),
(30, 1, '0.000'),
(30, 2, '0.000'),
(30, 3, '0.000'),
(31, 1, '0.000'),
(31, 2, '0.000'),
(31, 3, '0.000'),
(32, 1, '213.000'),
(32, 2, '0.000'),
(32, 3, '0.000'),
(33, 1, '40.000'),
(33, 2, '0.000'),
(33, 3, '0.000'),
(34, 1, '3.000'),
(34, 2, '0.000'),
(34, 3, '0.000'),
(35, 1, '-1.000'),
(35, 2, '0.000'),
(35, 3, '0.000'),
(36, 1, '109.000'),
(36, 2, '0.000'),
(36, 3, '0.000'),
(37, 1, '150.000'),
(37, 2, '0.000'),
(37, 3, '0.000'),
(38, 1, '0.000'),
(38, 2, '0.000'),
(38, 3, '0.000'),
(39, 1, '50.000'),
(39, 2, '60.000'),
(39, 3, '40.000');

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

--
-- Table structure for table `ospos_migrations`
--

CREATE TABLE `ospos_migrations` (
  `version` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_migrations`
--

INSERT INTO `ospos_migrations` (`version`) VALUES
(20210714140000);

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

--
-- Table structure for table `ospos_modules`
--

CREATE TABLE `ospos_modules` (
  `name_lang_key` varchar(255) NOT NULL,
  `desc_lang_key` varchar(255) NOT NULL,
  `sort` int(10) NOT NULL,
  `module_id` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_modules`
--

INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
('module_attributes', 'module_attributes_desc', 107, 'attributes'),
('module_bookings', 'module_booking_desc', 107, 'bookings'),
('module_cashups', 'module_cashups_desc', 110, 'cashups'),
('module_categories', 'module_categories_desc', 105, 'categories'),
('module_config', 'module_config_desc', 900, 'config'),
('module_customers', 'module_customers_desc', 10, 'customers'),
('module_employees', 'module_employees_desc', 80, 'employees'),
('module_expenses', 'module_expenses_desc', 108, 'expenses'),
('module_expenses_categories', 'module_expenses_categories_desc', 109, 'expenses_categories'),
('module_giftcards', 'module_giftcards_desc', 90, 'giftcards'),
('module_home', 'module_home_desc', 1, 'home'),
('module_items', 'module_items_desc', 20, 'items'),
('module_item_kits', 'module_item_kits_desc', 30, 'item_kits'),
('module_messages', 'module_messages_desc', 98, 'messages'),
('module_office', 'module_office_desc', 999, 'office'),
('module_receivings', 'module_receivings_desc', 60, 'receivings'),
('module_reports', 'module_reports_desc', 50, 'reports'),
('module_sales', 'module_sales_desc', 70, 'sales'),
('module_suppliers', 'module_suppliers_desc', 40, 'suppliers'),
('module_taxes', 'module_taxes_desc', 105, 'taxes');

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

--
-- Table structure for table `ospos_people`
--

CREATE TABLE `ospos_people` (
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  `gender` int(1) DEFAULT NULL,
  `phone_number` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `address_1` varchar(255) NOT NULL,
  `address_2` varchar(255) NOT NULL,
  `city` varchar(255) NOT NULL,
  `state` varchar(255) NOT NULL,
  `zip` varchar(255) NOT NULL,
  `country` varchar(255) NOT NULL,
  `comments` text NOT NULL,
  `person_id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_people`
--

INSERT INTO `ospos_people` (`first_name`, `last_name`, `gender`, `phone_number`, `email`, `address_1`, `address_2`, `city`, `state`, `zip`, `country`, `comments`, `person_id`) VALUES
('John', 'Doe', NULL, '555-555-5555', 'changeme@example.com', 'Address 1', '', '', '', '', '', '', 1),
('Vzdfg', 'Zfgg', 1, '', '', '', '', '', '', '', '', '', 2),
('Mark', 'David', 1, '', 'mark@gmail.com', '', '', '', '', '', '', '', 3),
('Vzdfg', 'Zfgg', NULL, '', '', '', '', '', '', '', '', '', 4),
('Asd', 'Asd', NULL, '', '', '', '', '', '', '', '', '', 5),
('Goods', 'Goods', NULL, '', '', '', '', '', '', '', '', '', 6),
('Walk', 'In', 1, '', '', '', '', '', '', '', '', '', 7),
('Hammad ', 'Aslam', 1, '', '', '', '', '', '', '', '', '', 8),
('Mark', 'David', 1, '03001111111', 'mark@gmail.com', 'street#12', 'area#43', 'Abbottabad', '', '54000', '', 'good\r\n', 9),
('Mark', 'David', 1, '03001111111', 'mark@gmail.com', 'street#12', 'area#43', 'Abbottabad', '', '54000', '', '', 10);

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

--
-- Table structure for table `ospos_permissions`
--

CREATE TABLE `ospos_permissions` (
  `permission_id` varchar(255) NOT NULL,
  `module_id` varchar(255) NOT NULL,
  `location_id` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_permissions`
--

INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
('attributes', 'attributes', NULL),
('bookings', 'bookings', NULL),
('cashups', 'cashups', NULL),
('categories', 'categories', NULL),
('config', 'config', NULL),
('customers', 'customers', NULL),
('employees', 'employees', NULL),
('expenses', 'expenses', NULL),
('expenses_categories', 'expenses_categories', NULL),
('giftcards', 'giftcards', NULL),
('home', 'home', NULL),
('items', 'items', NULL),
('items_Store_1', 'items', 1),
('items_Store_2', 'items', 2),
('items_Store_3', 'items', 3),
('item_kits', 'item_kits', NULL),
('messages', 'messages', NULL),
('office', 'office', NULL),
('receivings', 'receivings', NULL),
('receivings_Store_1', 'receivings', 1),
('receivings_Store_2', 'receivings', 2),
('receivings_Store_3', 'receivings', 3),
('reports', 'reports', NULL),
('reports_categories', 'reports', NULL),
('reports_customers', 'reports', NULL),
('reports_discounts', 'reports', NULL),
('reports_employees', 'reports', NULL),
('reports_expenses_categories', 'reports', NULL),
('reports_inventory', 'reports', NULL),
('reports_items', 'reports', NULL),
('reports_payments', 'reports', NULL),
('reports_receivings', 'reports', NULL),
('reports_sales', 'reports', NULL),
('reports_sales_taxes', 'reports', NULL),
('reports_suppliers', 'reports', NULL),
('reports_taxes', 'reports', NULL),
('sales', 'sales', NULL),
('sales_change_price', 'sales', NULL),
('sales_delete', 'sales', NULL),
('sales_Store_1', 'sales', 1),
('sales_Store_2', 'sales', 2),
('sales_Store_3', 'sales', 3),
('suppliers', 'suppliers', NULL),
('taxes', 'taxes', NULL);

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

--
-- Table structure for table `ospos_receivings`
--

CREATE TABLE `ospos_receivings` (
  `receiving_time` timestamp NOT NULL DEFAULT current_timestamp(),
  `supplier_id` int(10) DEFAULT NULL,
  `employee_id` int(10) NOT NULL DEFAULT 0,
  `comment` text DEFAULT NULL,
  `receiving_id` int(10) NOT NULL,
  `payment_type` varchar(20) DEFAULT NULL,
  `reference` varchar(32) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_receivings`
--

INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
('2024-05-06 22:11:13', NULL, 1, '', 1, 'Cash', NULL),
('2024-05-06 22:16:00', NULL, 1, '', 2, 'Cash', NULL),
('2024-05-06 22:17:13', NULL, 1, '', 3, 'Cash', NULL),
('2024-05-09 00:59:47', NULL, 1, '', 4, 'Cash', NULL),
('2024-05-09 01:00:19', NULL, 1, '', 5, 'Cash', NULL),
('2024-05-09 01:58:40', NULL, 1, '', 6, 'Cash', NULL),
('2024-05-09 01:59:23', NULL, 1, '', 7, 'Cash', NULL),
('2024-05-09 02:03:31', NULL, 1, '', 8, 'Cash', NULL),
('2024-05-09 02:35:14', NULL, 1, '', 9, 'Cash', NULL),
('2024-05-09 02:43:08', NULL, 1, '', 10, 'Cash', NULL),
('2024-05-09 02:48:53', NULL, 1, '', 11, 'Cash', NULL),
('2024-05-09 02:51:58', NULL, 1, '', 12, 'Cash', NULL),
('2024-05-09 02:53:49', NULL, 1, '', 13, 'Cash', NULL),
('2024-05-09 02:57:25', NULL, 1, '', 14, 'Cash', NULL),
('2024-05-30 01:29:24', 5, 1, '', 15, 'Cash', NULL),
('2024-06-05 04:28:35', 5, 1, '', 16, 'Cash', NULL),
('2024-06-06 03:12:24', NULL, 1, '', 17, 'Cash', NULL),
('2024-06-06 05:31:19', 8, 1, '', 18, 'Cash', NULL),
('2024-06-11 23:17:15', 8, 1, '', 19, 'Cash', NULL);

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

--
-- Table structure for table `ospos_receivings_items`
--

CREATE TABLE `ospos_receivings_items` (
  `receiving_id` int(10) NOT NULL DEFAULT 0,
  `item_id` int(10) NOT NULL DEFAULT 0,
  `description` varchar(30) DEFAULT NULL,
  `serialnumber` varchar(30) DEFAULT NULL,
  `line` int(3) NOT NULL,
  `quantity_purchased` decimal(15,3) NOT NULL DEFAULT 0.000,
  `item_cost_price` decimal(15,2) NOT NULL,
  `item_unit_price` decimal(15,2) NOT NULL,
  `discount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `discount_type` tinyint(1) NOT NULL DEFAULT 0,
  `item_location` int(11) NOT NULL,
  `receiving_quantity` decimal(15,3) NOT NULL DEFAULT 1.000
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_receivings_items`
--

INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount`, `discount_type`, `item_location`, `receiving_quantity`) VALUES
(1, 6, '', NULL, 1, '50.000', '0.00', '100.00', '0.00', 0, 1, '1.000'),
(2, 8, '', NULL, 1, '40.000', '100.00', '100.00', '0.00', 0, 1, '1.000'),
(3, 8, '', NULL, 1, '20.000', '100.00', '120.00', '0.00', 0, 1, '1.000'),
(4, 30, '', NULL, 2, '1.000', '12.00', '13.00', '0.00', 0, 1, '1.000'),
(5, 30, '', NULL, 1, '20.000', '12.00', '14.00', '0.00', 0, 1, '1.000'),
(6, 30, '', NULL, 1, '15.000', '12.00', '12.00', '0.00', 0, 1, '10.000'),
(7, 30, '', NULL, 1, '33.000', '12.00', '100.00', '0.00', 0, 1, '10.000'),
(8, 30, '', '', 1, '1.000', '12.00', '12.00', '0.00', 0, 2, '10.000'),
(9, 30, '', NULL, 1, '10.000', '12.00', '50.00', '0.00', 0, 2, '10.000'),
(10, 31, '', NULL, 1, '20.000', '60.00', '140.00', '0.00', 0, 1, '100.000'),
(11, 32, '', NULL, 1, '20.000', '60.00', '140.00', '0.00', 0, 1, '1.000'),
(12, 32, '', NULL, 1, '100.000', '140.00', '60.00', '0.00', 0, 1, '1.000'),
(13, 33, '', NULL, 1, '20.000', '60.00', '140.00', '0.00', 0, 1, '1.000'),
(14, 33, '', NULL, 1, '60.000', '73.33', '75.00', '0.00', 0, 1, '1.000'),
(15, 32, '', '', 1, '1.000', '73.33', '73.33', '0.00', 0, 1, '100.000'),
(16, 32, '', '', 1, '-1.000', '73.33', '73.33', '0.00', 0, 1, '100.000'),
(16, 33, '', '', 2, '-1.000', '74.00', '74.00', '0.00', 0, 1, '1.000'),
(17, 34, '', NULL, 1, '5.000', '0.00', '0.00', '0.00', 0, 1, '1.000'),
(18, 32, '', '', 1, '1.000', '73.33', '73.33', '0.00', 0, 1, '100.000'),
(18, 33, '', '', 2, '1.000', '74.00', '74.00', '0.00', 0, 1, '1.000'),
(19, 36, '', NULL, 1, '100.000', '120.00', '120.00', '0.00', 0, 1, '1.000');

--
-- Triggers `ospos_receivings_items`
--
DELIMITER $$
CREATE TRIGGER `update_cost_price` AFTER INSERT ON `ospos_receivings_items` FOR EACH ROW BEGIN
    -- Declare a variable to store the new cost price
    DECLARE new_cost_price DECIMAL(10, 2);

    -- Calculate the new cost price for the item
    SELECT
        (oiq.quantity * oi.cost_price + (NEW.quantity_purchased * NEW.receiving_quantity * NEW.item_unit_price)) / (oiq.quantity + (NEW.quantity_purchased * NEW.receiving_quantity))
    INTO new_cost_price
    FROM ospos_items oi 
    INNER JOIN ospos_item_quantities oiq ON oi.item_id = oiq.item_id
    WHERE oi.item_id = NEW.item_id AND oiq.location_id = NEW.item_location;

    -- Update the cost price in the ospos_items table
    UPDATE ospos_items
    SET cost_price = new_cost_price
    WHERE item_id = NEW.item_id;
END
$$
DELIMITER ;

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

--
-- Table structure for table `ospos_sales`
--

CREATE TABLE `ospos_sales` (
  `sale_time` timestamp NOT NULL DEFAULT current_timestamp(),
  `customer_id` int(10) DEFAULT NULL,
  `employee_id` int(10) NOT NULL DEFAULT 0,
  `comment` text DEFAULT NULL,
  `invoice_number` varchar(32) DEFAULT NULL,
  `quote_number` varchar(32) DEFAULT NULL,
  `sale_id` int(10) NOT NULL,
  `sale_status` tinyint(1) NOT NULL DEFAULT 0,
  `dinner_table_id` int(11) DEFAULT NULL,
  `work_order_number` varchar(32) DEFAULT NULL,
  `sale_type` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_sales`
--

INSERT INTO `ospos_sales` (`sale_time`, `customer_id`, `employee_id`, `comment`, `invoice_number`, `quote_number`, `sale_id`, `sale_status`, `dinner_table_id`, `work_order_number`, `sale_type`) VALUES
('2024-05-06 22:06:06', NULL, 1, '', NULL, NULL, 1, 0, NULL, NULL, 0),
('2024-05-06 22:19:37', NULL, 1, '', NULL, NULL, 2, 0, NULL, NULL, 0),
('2024-05-09 00:21:42', NULL, 3, '', NULL, NULL, 3, 0, NULL, NULL, 0),
('2024-05-09 00:37:20', NULL, 3, '', NULL, NULL, 4, 0, NULL, NULL, 0),
('2024-05-09 02:55:44', NULL, 1, '', NULL, NULL, 5, 2, NULL, NULL, 0),
('2024-05-09 03:04:05', NULL, 1, '', NULL, NULL, 6, 0, NULL, NULL, 0),
('2024-05-10 01:40:47', NULL, 1, '', NULL, NULL, 7, 0, NULL, NULL, 0),
('2024-05-10 04:48:45', NULL, 1, '', NULL, NULL, 8, 0, NULL, NULL, 0),
('2024-05-29 23:36:22', 2, 1, '', NULL, NULL, 9, 0, NULL, NULL, 0),
('2024-05-29 23:54:07', 2, 1, '', NULL, NULL, 10, 0, NULL, NULL, 0),
('2024-05-30 00:41:03', NULL, 1, '', NULL, NULL, 11, 0, NULL, NULL, 0),
('2024-06-05 04:02:52', NULL, 1, '', NULL, NULL, 12, 0, NULL, NULL, 4),
('2024-06-06 02:32:41', NULL, 1, '', NULL, NULL, 13, 0, NULL, NULL, 0),
('2024-06-06 02:48:46', 2, 1, '', '0', NULL, 14, 0, NULL, NULL, 1),
('2024-06-06 02:49:20', 2, 1, '', '1', NULL, 15, 2, NULL, NULL, 1),
('2024-06-06 03:08:20', 2, 1, '', NULL, NULL, 16, 0, NULL, NULL, 4),
('2024-06-06 03:13:08', 2, 1, '', '2', NULL, 17, 0, NULL, NULL, 1),
('2024-06-06 03:15:54', NULL, 1, '', NULL, NULL, 18, 1, NULL, NULL, 1),
('2024-06-06 03:16:11', 2, 1, '', '3', NULL, 19, 0, NULL, NULL, 1),
('2024-06-11 23:17:34', 2, 1, '', NULL, NULL, 20, 0, NULL, NULL, 0);

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

--
-- Table structure for table `ospos_sales_items`
--

CREATE TABLE `ospos_sales_items` (
  `sale_id` int(10) NOT NULL DEFAULT 0,
  `item_id` int(10) NOT NULL DEFAULT 0,
  `description` varchar(255) DEFAULT NULL,
  `serialnumber` varchar(30) DEFAULT NULL,
  `line` int(3) NOT NULL DEFAULT 0,
  `quantity_purchased` decimal(15,3) NOT NULL DEFAULT 0.000,
  `item_cost_price` decimal(15,2) NOT NULL,
  `item_unit_price` decimal(15,2) NOT NULL,
  `discount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `discount_type` tinyint(1) NOT NULL DEFAULT 0,
  `item_location` int(11) NOT NULL,
  `print_option` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_sales_items`
--

INSERT INTO `ospos_sales_items` (`sale_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount`, `discount_type`, `item_location`, `print_option`) VALUES
(1, 6, '', '', 1, '1.000', '0.00', '0.00', '0.00', 0, 1, 0),
(2, 8, '', '', 1, '50.000', '100.00', '140.00', '0.00', 0, 1, 0),
(3, 28, '', '', 1, '5.000', '0.00', '0.00', '0.00', 0, 1, 0),
(4, 29, '', '', 2, '5.000', '0.00', '0.00', '0.00', 0, 1, 0),
(5, 33, '', '', 1, '30.000', '73.33', '60.00', '0.00', 0, 1, 0),
(6, 33, '', '', 1, '30.000', '74.00', '200.00', '0.00', 0, 1, 0),
(7, 35, '', '', 1, '1.000', '0.00', '0.00', '0.00', 0, 1, 0),
(8, 34, '', '', 1, '1.000', '0.00', '0.00', '0.00', 0, 1, 0),
(9, 32, '', '', 1, '3.000', '73.33', '60.00', '0.00', 0, 1, 0),
(10, 33, '', '', 1, '1.000', '74.00', '60.00', '0.00', 0, 1, 0),
(11, 32, '', '', 1, '1.000', '73.33', '60.00', '0.00', 0, 1, 0),
(12, 32, '', '', 1, '0.000', '73.33', '60.00', '0.00', 0, 1, 0),
(13, 33, '', '', 1, '1.000', '74.00', '60.00', '0.00', 0, 1, 0),
(14, 33, '', '', 1, '1.000', '74.00', '60.00', '0.00', 0, 1, 0),
(15, 33, '', '', 1, '1.000', '74.00', '60.00', '0.00', 0, 1, 0),
(16, 33, '', '', 1, '-1.000', '74.00', '60.00', '0.00', 0, 1, 0),
(17, 32, '', '', 1, '3.000', '73.33', '80.00', '10.00', 0, 1, 0),
(17, 33, '', '', 2, '1.000', '74.00', '60.00', '0.00', 0, 1, 0),
(17, 34, '', '', 3, '1.000', '0.00', '0.00', '0.00', 0, 1, 0),
(18, 32, '', '', 1, '-2.000', '73.33', '80.00', '10.00', 0, 1, 0),
(19, 33, '', '', 1, '1.000', '74.00', '60.00', '0.00', 0, 1, 0),
(20, 36, '', '', 1, '1.000', '120.00', '150.00', '0.00', 0, 1, 0);

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

--
-- Table structure for table `ospos_sales_items_taxes`
--

CREATE TABLE `ospos_sales_items_taxes` (
  `sale_id` int(10) NOT NULL,
  `item_id` int(10) NOT NULL,
  `line` int(3) NOT NULL DEFAULT 0,
  `name` varchar(255) NOT NULL,
  `percent` decimal(15,4) NOT NULL DEFAULT 0.0000,
  `tax_type` tinyint(1) NOT NULL DEFAULT 0,
  `rounding_code` tinyint(1) NOT NULL DEFAULT 0,
  `cascade_sequence` tinyint(1) NOT NULL DEFAULT 0,
  `item_tax_amount` decimal(15,4) NOT NULL DEFAULT 0.0000,
  `sales_tax_code_id` int(11) DEFAULT NULL,
  `jurisdiction_id` int(11) DEFAULT NULL,
  `tax_category_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_sales_payments`
--

CREATE TABLE `ospos_sales_payments` (
  `payment_id` int(11) NOT NULL,
  `sale_id` int(10) NOT NULL,
  `payment_type` varchar(40) NOT NULL,
  `payment_amount` decimal(15,2) NOT NULL,
  `cash_refund` decimal(15,2) NOT NULL DEFAULT 0.00,
  `cash_adjustment` tinyint(4) NOT NULL DEFAULT 0,
  `employee_id` int(11) DEFAULT NULL,
  `payment_time` timestamp NOT NULL DEFAULT current_timestamp(),
  `reference_code` varchar(40) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_sales_payments`
--

INSERT INTO `ospos_sales_payments` (`payment_id`, `sale_id`, `payment_type`, `payment_amount`, `cash_refund`, `cash_adjustment`, `employee_id`, `payment_time`, `reference_code`) VALUES
(1, 2, 'Cash', '7000.00', '0.00', 0, 1, '2024-05-07 07:19:37', ''),
(2, 5, 'Cash', '1800.00', '0.00', 0, 1, '2024-05-09 11:55:44', ''),
(3, 6, 'Cash', '6000.00', '0.00', 0, 1, '2024-05-09 12:04:05', ''),
(4, 9, 'Cash', '180.00', '0.00', 0, 1, '2024-05-30 08:36:22', ''),
(5, 10, 'Cash', '60.00', '0.00', 0, 1, '2024-05-30 08:54:07', ''),
(6, 11, 'Cash', '60.00', '0.00', 0, 1, '2024-05-30 09:41:03', ''),
(7, 13, 'Cash', '60.00', '0.00', 0, 1, '2024-06-06 11:32:41', ''),
(8, 14, 'Cash', '100.00', '40.00', 0, 1, '2024-06-06 11:48:46', ''),
(9, 16, 'Cash', '-60.00', '0.00', 0, 1, '2024-06-06 12:08:20', ''),
(10, 17, 'Cash', '276.00', '0.00', 0, 1, '2024-06-06 12:13:08', ''),
(11, 19, 'Cash', '60.00', '0.00', 0, 1, '2024-06-06 12:16:11', ''),
(12, 20, 'Cash', '150.00', '0.00', 0, 1, '2024-06-12 08:17:34', '');

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

--
-- Table structure for table `ospos_sales_reward_points`
--

CREATE TABLE `ospos_sales_reward_points` (
  `id` int(11) NOT NULL,
  `sale_id` int(11) NOT NULL,
  `earned` float NOT NULL,
  `used` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_sales_taxes`
--

CREATE TABLE `ospos_sales_taxes` (
  `sales_taxes_id` int(11) NOT NULL,
  `sale_id` int(10) NOT NULL,
  `jurisdiction_id` int(11) DEFAULT NULL,
  `tax_category_id` int(11) DEFAULT NULL,
  `tax_type` smallint(2) NOT NULL,
  `tax_group` varchar(32) NOT NULL,
  `sale_tax_basis` decimal(15,4) NOT NULL,
  `sale_tax_amount` decimal(15,4) NOT NULL,
  `print_sequence` tinyint(1) NOT NULL DEFAULT 0,
  `name` varchar(255) NOT NULL,
  `tax_rate` decimal(15,4) NOT NULL,
  `sales_tax_code_id` int(11) DEFAULT NULL,
  `rounding_code` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_sessions`
--

CREATE TABLE `ospos_sessions` (
  `id` varchar(40) NOT NULL,
  `ip_address` varchar(45) NOT NULL,
  `timestamp` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `data` mediumblob NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_sessions`
--

INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
('rh5kcahlvngsgonssqcjtoknqv90dpqh', '::1', 1718191887, 0x[BLOB]),
('mud9ag9c9qi55h4mkaabmdl74hhpf07i', '::1', 1718192263, 0x[BLOB]),
('od769u7jqb2rmoqknu3n3hrfp8hv7j99', '::1', 1718192791, 0x[BLOB]),
('rs2080t5v42ddbs82ohlmf80a78r4akh', '::1', 1718193725, 0x[BLOB]),
('apbvo651q39365g60bk7pmjcvptl6nfp', '::1', 1718194210, 0x[BLOB]),
('kmge847sk8rd7nmd35us2r8e21bb8jn8', '::1', 1718195038, 0x[BLOB]),
('rh2k9do3g8gsfrpf7osbum4hj3g7vc6g', '::1', 1718195460, 0x[BLOB]),
('ca147mhr3innltc7g28h0ut28r0ofp78', '::1', 1718195761, 0x[BLOB]),
('kraavvvjr80ovs42tt06mp93ochnnkbr', '::1', 1718196239, 0x[BLOB]),
('aio7j3srdg8tsp03n97e14t5ho36s578', '::1', 1718197663, 0x[BLOB]),
('91llt1qvsshrmrandkhu3udpfltd4rjh', '::1', 1718198094, 0x[BLOB]),
('r2mc4f1nquc0sgub539lla1srjs3ln7l', '::1', 1718198570, 0x[BLOB]),
('h7s56upcb8d5rnf9j851qphkj31pb95a', '::1', 1718198887, 0x[BLOB]),
('en4b0e4bgacje23pefq0muva562ucqtp', '::1', 1718199343, 0x[BLOB]),
('ka4s7m153cg5n00jtr4lb28gsvlt14nj', '::1', 1718200560, 0x[BLOB]),
('5ehti5vi5qvj6c0dtefb9vgmu1r4k5cl', '::1', 1718201091, 0x[BLOB]),
('vjle3oo2nls053qn1ismamm4u0u8h0ro', '::1', 1718202419, 0x[BLOB]),
('r8bd3vhk74q2ovqrlq9i9u8hnl6pe1lf', '::1', 1718203381, 0x[BLOB]),
('m2j89ihv55n6b7uk5r2dietq7jtq8132', '::1', 1718203721, 0x[BLOB]),
('npqoqhmfnpvtk5ls2mmlr2ca2ml3n8am', '::1', 1718204418, 0x[BLOB]),
('11a0uhcrhrcad1k4g23msbppg322fnce', '::1', 1718205054, 0x[BLOB]),
('ptms1tt0r2hf276dcg1pshidagnd4po6', '::1', 1718205179, 0x[BLOB]),
('eii4tp3mrmflq79od2hfuji7po8u4b7o', '::1', 1718255420, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383235353432303b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b),
('qftrp83dn05agb69qt0u643s7d2k1kae', '::1', 1718255954, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383235353935343b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('pomctv3gm7fn3hbasqdomnnv5gkq70h3', '::1', 1718256342, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383235363334323b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('h7r3bbkcrovfgc22dtghnhabulj026ni', '::1', 1718256787, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383235363738373b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('nqsml7p6najnano2m2gth53arcqrej9f', '::1', 1718257303, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383235373330333b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('hin1iv5qiag1sjtg8lfsdur3e3mbh059', '::1', 1718257634, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383235373633343b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('5d5i4k8mi9i4apdtttdau585pp2o18fb', '::1', 1718257936, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383235373933363b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('nqjq1csbboba8fb36ud2srkci2jokba4', '::1', 1718258490, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383235383439303b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('nuc5nuove5aal7jbfn47rh4ee0albfgh', '::1', 1718260119, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236303131393b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('egqe7vi9kna8eblju8jup5h8cieo3550', '::1', 1718260677, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236303637373b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('c7if70hdajuhqn5sti639fhlkq8kboi8', '::1', 1718260993, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236303939333b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('dp296htsft8vlb9ekegr9fo3lnuh9tdl', '::1', 1718261337, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236313333373b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('bul70ogcrsen1q75rbd6klk7k1m4i0ij', '::1', 1718261922, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236313932323b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('omq6tlm3fncabg0s6592v9emsjviks6p', '::1', 1718262223, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236323232333b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('42gi2v3mrfgqch6cqt2t5atot3fo9hms', '::1', 1718262793, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236323739333b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('s10f4ks7td8hrdsgqa3d76ahbviguav4', '::1', 1718263098, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236333039383b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('en9oj5pm7aah3ou6te246i8ekodbmsov', '::1', 1718263481, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236333438313b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('bhh3n4cegllfgookmr12injbf089qo2t', '::1', 1718263891, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236333839313b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('3aru1uei8mp33dsq8pqem97mneiif0uq', '::1', 1718264580, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236343538303b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('564mvfio4ovgpfu8rupmhe1j7r3btrdf', '::1', 1718265098, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236353039383b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('2a833mj01jq0ru60ajv9cuk1e8nokrhi', '::1', 1718265981, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236353938313b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('n70riuioseerroptbhlao5id6phfs9m7', '::1', 1718266339, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236363333393b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('qt3gpc2f3b5j5tsnl0aern9fgl3qkid5', '::1', 1718266641, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236363634313b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('hp7eoks4brp2qf98c84lbjv2nrlb5ifr', '::1', 1718266969, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236363936393b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('46jq5dt509a4fj8vl1nse5pmc3q3010o', '::1', 1718267456, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236373435363b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('bk69hejknrus0df5ro9bfkdt3aigc94f', '::1', 1718267934, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236373933343b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('slf089mv4lstpa8simaalg00tuhpi00i', '::1', 1718268239, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383236383233393b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('eiodj228tp372iltu64q8k29p5pq5rmg', '::1', 1718271907, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237313930373b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('67h5ie5r0r2tsg8pqh0h78sbg5mspuhu', '::1', 1718270995, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237303939333b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('74v2vsa510he3sgnj4o8nb7654e2ov0t', '::1', 1718272408, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237323430383b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('qmfahht7514bc75pshu93b5mbm3elrke', '::1', 1718273243, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237333234333b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('q5g4iehhdbj1t3hmr7ov69nadqb3mbeu', '::1', 1718273826, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237333832363b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('a30g3rnfj69lme5cb6lj6i464fatekoi', '::1', 1718274514, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237343531343b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('vc5h7ovarlcpn1isi7hbiaqbree77hbc', '::1', 1718274821, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237343832313b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('afirhcltfn7l8g40ks53u4d2mr32f2eu', '::1', 1718275192, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237353139323b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('oodkitcsk4v2ep4dsui9ao60f0s5fhiv', '::1', 1718275627, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237353632373b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('rlrpcd61rb2i0d3tq7lt3dns1kg36vab', '::1', 1718276082, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237363038323b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('4ea56d357uuj4k0rdl75uv6hsvjk03os', '::1', 1718276541, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237363534313b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('f1qv9pfi69dnd3on9al7viaiasiid4ic', '192.168.18.32', 1718276462, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237363436323b),
('3mr7vmefij235b6kmhrr8kr85j49b118', '192.168.18.191', 1718277052, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237373035323b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('g0o18hafbekrjer4mhpvbvfmuraahm7u', '::1', 1718276975, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237363937353b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('qbrap8gjtd1ljksbksa2epcjkr83r14p', '::1', 1718277317, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237373331373b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('fbkmjqs44l8s44r4ka5ju9ivv0g8qcll', '192.168.18.191', 1718278224, 0x[BLOB]),
('001ceu700p3mcihls89gmkc1lqeh85pi', '::1', 1718277622, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237373632323b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('v4vqjd4pgu0ncnvh78vtius859c38av0', '::1', 1718278291, 0x5f5f63695f6c6173745f726567656e65726174657c693a313731383237373632323b706572736f6e5f69647c733a313a2231223b6d656e755f67726f75707c733a343a22686f6d65223b616c6c6f775f74656d705f6974656d737c693a303b6974656d5f6c6f636174696f6e7c733a313a2231223b),
('rih6f41fns4k5r68c0qirujhp3r5kngt', '192.168.18.191', 1718278627, 0x[BLOB]),
('703nq3mtgegge9kqpo5646envnrhmq3j', '192.168.18.191', 1718278641, 0x[BLOB]);

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

--
-- Table structure for table `ospos_stock_locations`
--

CREATE TABLE `ospos_stock_locations` (
  `location_id` int(11) NOT NULL,
  `location_name` varchar(255) DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_stock_locations`
--

INSERT INTO `ospos_stock_locations` (`location_id`, `location_name`, `deleted`) VALUES
(1, 'Store 1', 0),
(2, 'Store 2', 0),
(3, 'Store 3', 0);

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

--
-- Table structure for table `ospos_suppliers`
--

CREATE TABLE `ospos_suppliers` (
  `person_id` int(10) NOT NULL,
  `company_name` varchar(255) NOT NULL,
  `agency_name` varchar(255) NOT NULL,
  `account_number` varchar(255) DEFAULT NULL,
  `tax_id` varchar(32) NOT NULL DEFAULT '',
  `deleted` tinyint(1) NOT NULL DEFAULT 0,
  `category` tinyint(1) NOT NULL,
  `class_name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ospos_suppliers`
--

INSERT INTO `ospos_suppliers` (`person_id`, `company_name`, `agency_name`, `account_number`, `tax_id`, `deleted`, `category`, `class_name`) VALUES
(5, 'expense', 'expense agency', NULL, '', 0, 0, 'hico dairy products'),
(6, 'goods', '', NULL, '', 0, 1, 'hico dairy products'),
(8, 'Phyzer', 'Phyzer', NULL, '', 0, 1, 'hico dairy products'),
(9, 'hico', 'dairy', NULL, '', 1, 1, 'hico dairy products'),
(10, 'hico', 'dairy', NULL, '', 0, 1, 'hico dairy products');

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

--
-- Table structure for table `ospos_tax_categories`
--

CREATE TABLE `ospos_tax_categories` (
  `tax_category_id` int(10) NOT NULL,
  `tax_category` varchar(32) NOT NULL,
  `tax_group_sequence` tinyint(1) NOT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_tax_codes`
--

CREATE TABLE `ospos_tax_codes` (
  `tax_code_id` int(11) NOT NULL,
  `tax_code` varchar(32) NOT NULL,
  `tax_code_name` varchar(255) NOT NULL DEFAULT '',
  `city` varchar(255) NOT NULL DEFAULT '',
  `state` varchar(255) NOT NULL DEFAULT '',
  `deleted` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_tax_jurisdictions`
--

CREATE TABLE `ospos_tax_jurisdictions` (
  `jurisdiction_id` int(11) NOT NULL,
  `jurisdiction_name` varchar(255) DEFAULT NULL,
  `tax_group` varchar(32) NOT NULL,
  `tax_type` smallint(2) NOT NULL,
  `reporting_authority` varchar(255) DEFAULT NULL,
  `tax_group_sequence` tinyint(1) NOT NULL DEFAULT 0,
  `cascade_sequence` tinyint(1) NOT NULL DEFAULT 0,
  `deleted` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ospos_tax_rates`
--

CREATE TABLE `ospos_tax_rates` (
  `tax_rate_id` int(11) NOT NULL,
  `rate_tax_code_id` int(11) NOT NULL,
  `rate_tax_category_id` int(10) NOT NULL,
  `rate_jurisdiction_id` int(11) NOT NULL,
  `tax_rate` decimal(15,4) NOT NULL DEFAULT 0.0000,
  `tax_rounding_code` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for table `ospos_attribute_definitions`
--
ALTER TABLE `ospos_attribute_definitions`
  ADD PRIMARY KEY (`definition_id`),
  ADD KEY `definition_fk` (`definition_fk`),
  ADD KEY `definition_name` (`definition_name`),
  ADD KEY `definition_type` (`definition_type`),
  ADD KEY `definition_name_2` (`definition_name`),
  ADD KEY `definition_type_2` (`definition_type`),
  ADD KEY `definition_name_3` (`definition_name`),
  ADD KEY `definition_type_3` (`definition_type`),
  ADD KEY `definition_name_4` (`definition_name`),
  ADD KEY `definition_type_4` (`definition_type`),
  ADD KEY `definition_name_5` (`definition_name`),
  ADD KEY `definition_name_6` (`definition_name`),
  ADD KEY `definition_type_5` (`definition_type`),
  ADD KEY `definition_type_6` (`definition_type`),
  ADD KEY `definition_name_7` (`definition_name`),
  ADD KEY `definition_type_7` (`definition_type`);

--
-- Indexes for table `ospos_attribute_links`
--
ALTER TABLE `ospos_attribute_links`
  ADD UNIQUE KEY `attribute_links_uq1` (`attribute_id`,`definition_id`,`item_id`,`sale_id`,`receiving_id`),
  ADD UNIQUE KEY `attribute_links_uq2` (`item_id`,`sale_id`,`receiving_id`,`definition_id`,`attribute_id`),
  ADD KEY `attribute_id` (`attribute_id`),
  ADD KEY `definition_id` (`definition_id`),
  ADD KEY `item_id` (`item_id`),
  ADD KEY `sale_id` (`sale_id`),
  ADD KEY `receiving_id` (`receiving_id`);

--
-- Indexes for table `ospos_attribute_values`
--
ALTER TABLE `ospos_attribute_values`
  ADD PRIMARY KEY (`attribute_id`),
  ADD UNIQUE KEY `attribute_value` (`attribute_value`),
  ADD UNIQUE KEY `attribute_date` (`attribute_date`),
  ADD UNIQUE KEY `attribute_decimal` (`attribute_decimal`),
  ADD UNIQUE KEY `attribute_date_2` (`attribute_date`),
  ADD UNIQUE KEY `attribute_decimal_2` (`attribute_decimal`),
  ADD UNIQUE KEY `attribute_date_3` (`attribute_date`),
  ADD UNIQUE KEY `attribute_decimal_3` (`attribute_decimal`),
  ADD UNIQUE KEY `attribute_date_4` (`attribute_date`),
  ADD UNIQUE KEY `attribute_date_5` (`attribute_date`),
  ADD UNIQUE KEY `attribute_date_6` (`attribute_date`),
  ADD UNIQUE KEY `attribute_decimal_4` (`attribute_decimal`),
  ADD UNIQUE KEY `attribute_decimal_5` (`attribute_decimal`),
  ADD UNIQUE KEY `attribute_decimal_6` (`attribute_decimal`),
  ADD UNIQUE KEY `attribute_date_7` (`attribute_date`),
  ADD UNIQUE KEY `attribute_decimal_7` (`attribute_decimal`);

--
-- Indexes for table `ospos_bookings`
--
ALTER TABLE `ospos_bookings`
  ADD PRIMARY KEY (`booking_id`);

--
-- Indexes for table `ospos_cash_up`
--
ALTER TABLE `ospos_cash_up`
  ADD PRIMARY KEY (`cashup_id`),
  ADD KEY `open_employee_id` (`open_employee_id`),
  ADD KEY `close_employee_id` (`close_employee_id`);

--
-- Indexes for table `ospos_categories`
--
ALTER TABLE `ospos_categories`
  ADD PRIMARY KEY (`category_id`);

--
-- Indexes for table `ospos_customers`
--
ALTER TABLE `ospos_customers`
  ADD PRIMARY KEY (`person_id`),
  ADD UNIQUE KEY `account_number` (`account_number`),
  ADD KEY `package_id` (`package_id`),
  ADD KEY `sales_tax_code_id` (`sales_tax_code_id`),
  ADD KEY `company_name` (`company_name`),
  ADD KEY `company_name_2` (`company_name`),
  ADD KEY `company_name_3` (`company_name`),
  ADD KEY `company_name_4` (`company_name`),
  ADD KEY `company_name_5` (`company_name`),
  ADD KEY `company_name_6` (`company_name`),
  ADD KEY `company_name_7` (`company_name`);

--
-- Indexes for table `ospos_customers_packages`
--
ALTER TABLE `ospos_customers_packages`
  ADD PRIMARY KEY (`package_id`);

--
-- Indexes for table `ospos_customers_points`
--
ALTER TABLE `ospos_customers_points`
  ADD PRIMARY KEY (`id`),
  ADD KEY `person_id` (`person_id`),
  ADD KEY `package_id` (`package_id`),
  ADD KEY `sale_id` (`sale_id`);

--
-- Indexes for table `ospos_dinner_tables`
--
ALTER TABLE `ospos_dinner_tables`
  ADD PRIMARY KEY (`dinner_table_id`),
  ADD KEY `status` (`status`),
  ADD KEY `status_2` (`status`),
  ADD KEY `status_3` (`status`),
  ADD KEY `status_4` (`status`),
  ADD KEY `status_5` (`status`),
  ADD KEY `status_6` (`status`),
  ADD KEY `status_7` (`status`);

--
-- Indexes for table `ospos_expenses`
--
ALTER TABLE `ospos_expenses`
  ADD PRIMARY KEY (`expense_id`),
  ADD KEY `expense_category_id` (`expense_category_id`),
  ADD KEY `employee_id` (`employee_id`),
  ADD KEY `ospos_expenses_ibfk_3` (`supplier_id`),
  ADD KEY `date` (`date`),
  ADD KEY `payment_type` (`payment_type`),
  ADD KEY `amount` (`amount`),
  ADD KEY `payment_type_2` (`payment_type`),
  ADD KEY `amount_2` (`amount`),
  ADD KEY `payment_type_3` (`payment_type`),
  ADD KEY `amount_3` (`amount`),
  ADD KEY `payment_type_4` (`payment_type`),
  ADD KEY `amount_4` (`amount`),
  ADD KEY `payment_type_5` (`payment_type`),
  ADD KEY `amount_5` (`amount`),
  ADD KEY `payment_type_6` (`payment_type`),
  ADD KEY `amount_6` (`amount`),
  ADD KEY `payment_type_7` (`payment_type`),
  ADD KEY `amount_7` (`amount`);

--
-- Indexes for table `ospos_expense_categories`
--
ALTER TABLE `ospos_expense_categories`
  ADD PRIMARY KEY (`expense_category_id`),
  ADD UNIQUE KEY `category_name` (`category_name`),
  ADD KEY `category_description` (`category_description`),
  ADD KEY `category_description_2` (`category_description`),
  ADD KEY `category_description_3` (`category_description`),
  ADD KEY `category_description_4` (`category_description`),
  ADD KEY `category_description_5` (`category_description`),
  ADD KEY `category_description_6` (`category_description`),
  ADD KEY `category_description_7` (`category_description`);

--
-- Indexes for table `ospos_giftcards`
--
ALTER TABLE `ospos_giftcards`
  ADD PRIMARY KEY (`giftcard_id`),
  ADD UNIQUE KEY `giftcard_number` (`giftcard_number`),
  ADD KEY `person_id` (`person_id`);

--
-- Indexes for table `ospos_grants`
--
ALTER TABLE `ospos_grants`
  ADD PRIMARY KEY (`permission_id`,`person_id`);

--
-- Indexes for table `ospos_inventory`
--
ALTER TABLE `ospos_inventory`
  ADD PRIMARY KEY (`trans_id`),
  ADD KEY `trans_items` (`trans_items`),
  ADD KEY `trans_user` (`trans_user`),
  ADD KEY `trans_location` (`trans_location`),
  ADD KEY `trans_date` (`trans_date`);

--
-- Indexes for table `ospos_items`
--
ALTER TABLE `ospos_items`
  ADD PRIMARY KEY (`item_id`),
  ADD UNIQUE KEY `items_uq1` (`supplier_id`,`item_id`,`deleted`,`item_type`),
  ADD KEY `item_number` (`item_number`),
  ADD KEY `supplier_id` (`supplier_id`),
  ADD KEY `deleted` (`deleted`,`item_type`),
  ADD KEY `deleted_2` (`deleted`,`item_type`),
  ADD KEY `deleted_3` (`deleted`,`item_type`),
  ADD KEY `deleted_4` (`deleted`,`item_type`),
  ADD KEY `deleted_5` (`deleted`,`item_type`),
  ADD KEY `deleted_6` (`deleted`,`item_type`),
  ADD KEY `deleted_7` (`deleted`,`item_type`);

--
-- Indexes for table `ospos_items_taxes`
--
ALTER TABLE `ospos_items_taxes`
  ADD PRIMARY KEY (`item_id`,`name`,`percent`);

--
-- Indexes for table `ospos_item_kits`
--
ALTER TABLE `ospos_item_kits`
  ADD PRIMARY KEY (`item_kit_id`),
  ADD KEY `item_kit_number` (`item_kit_number`),
  ADD KEY `name` (`name`,`description`),
  ADD KEY `name_2` (`name`,`description`),
  ADD KEY `name_3` (`name`,`description`),
  ADD KEY `name_4` (`name`,`description`),
  ADD KEY `name_5` (`name`,`description`),
  ADD KEY `name_6` (`name`,`description`),
  ADD KEY `name_7` (`name`,`description`);

--
-- Indexes for table `ospos_item_kit_items`
--
ALTER TABLE `ospos_item_kit_items`
  ADD PRIMARY KEY (`item_kit_id`,`item_id`,`quantity`),
  ADD KEY `ospos_item_kit_items_ibfk_2` (`item_id`);

--
-- Indexes for table `ospos_item_quantities`
--
ALTER TABLE `ospos_item_quantities`
  ADD PRIMARY KEY (`item_id`,`location_id`),
  ADD KEY `item_id` (`item_id`),
  ADD KEY `location_id` (`location_id`);

--
-- Indexes for table `ospos_modules`
--
ALTER TABLE `ospos_modules`
  ADD PRIMARY KEY (`module_id`),
  ADD UNIQUE KEY `desc_lang_key` (`desc_lang_key`),
  ADD UNIQUE KEY `name_lang_key` (`name_lang_key`);

--
-- Indexes for table `ospos_people`
--
ALTER TABLE `ospos_people`
  ADD PRIMARY KEY (`person_id`),
  ADD KEY `email` (`email`),
  ADD KEY `first_name` (`first_name`,`last_name`,`email`,`phone_number`),
  ADD KEY `first_name_2` (`first_name`,`last_name`,`email`,`phone_number`),
  ADD KEY `first_name_3` (`first_name`,`last_name`,`email`,`phone_number`),
  ADD KEY `first_name_4` (`first_name`,`last_name`,`email`,`phone_number`),
  ADD KEY `first_name_5` (`first_name`,`last_name`,`email`,`phone_number`),
  ADD KEY `first_name_6` (`first_name`,`last_name`,`email`,`phone_number`),
  ADD KEY `first_name_7` (`first_name`,`last_name`,`email`,`phone_number`);

--
-- Indexes for table `ospos_permissions`
--
ALTER TABLE `ospos_permissions`
  ADD PRIMARY KEY (`permission_id`),
  ADD KEY `module_id` (`module_id`);

--
-- Indexes for table `ospos_receivings`
--
ALTER TABLE `ospos_receivings`
  ADD PRIMARY KEY (`receiving_id`),
  ADD KEY `supplier_id` (`supplier_id`),
  ADD KEY `employee_id` (`employee_id`),
  ADD KEY `reference` (`reference`),
  ADD KEY `receiving_time` (`receiving_time`);

--
-- Indexes for table `ospos_receivings_items`
--
ALTER TABLE `ospos_receivings_items`
  ADD PRIMARY KEY (`receiving_id`,`item_id`,`line`),
  ADD KEY `item_id` (`item_id`);

--
-- Indexes for table `ospos_sales`
--
ALTER TABLE `ospos_sales`
  ADD PRIMARY KEY (`sale_id`),
  ADD UNIQUE KEY `invoice_number` (`invoice_number`),
  ADD KEY `customer_id` (`customer_id`),
  ADD KEY `employee_id` (`employee_id`),
  ADD KEY `sale_time` (`sale_time`),
  ADD KEY `dinner_table_id` (`dinner_table_id`);

--
-- Indexes for table `ospos_sales_items`
--
ALTER TABLE `ospos_sales_items`
  ADD PRIMARY KEY (`sale_id`,`item_id`,`line`),
  ADD KEY `sale_id` (`sale_id`),
  ADD KEY `item_id` (`item_id`),
  ADD KEY `item_location` (`item_location`);

--
-- Indexes for table `ospos_sales_items_taxes`
--
ALTER TABLE `ospos_sales_items_taxes`
  ADD PRIMARY KEY (`sale_id`,`item_id`,`line`,`name`,`percent`),
  ADD KEY `sale_id` (`sale_id`),
  ADD KEY `item_id` (`item_id`);

--
-- Indexes for table `ospos_sales_payments`
--
ALTER TABLE `ospos_sales_payments`
  ADD PRIMARY KEY (`payment_id`),
  ADD KEY `payment_sale` (`sale_id`,`payment_type`),
  ADD KEY `employee_id` (`employee_id`),
  ADD KEY `payment_time` (`payment_time`);

--
-- Indexes for table `ospos_sales_reward_points`
--
ALTER TABLE `ospos_sales_reward_points`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sale_id` (`sale_id`);

--
-- Indexes for table `ospos_sales_taxes`
--
ALTER TABLE `ospos_sales_taxes`
  ADD PRIMARY KEY (`sales_taxes_id`),
  ADD KEY `print_sequence` (`sale_id`,`print_sequence`,`tax_group`);

--
-- Indexes for table `ospos_sessions`
--
ALTER TABLE `ospos_sessions`
  ADD KEY `ci_sessions_timestamp` (`timestamp`),
  ADD KEY `id` (`id`),
  ADD KEY `ip_address` (`ip_address`),
  ADD KEY `id_2` (`id`),
  ADD KEY `id_3` (`id`),
  ADD KEY `ip_address_2` (`ip_address`),
  ADD KEY `id_4` (`id`),
  ADD KEY `ip_address_3` (`ip_address`),
  ADD KEY `id_5` (`id`),
  ADD KEY `ip_address_4` (`ip_address`),
  ADD KEY `id_6` (`id`),
  ADD KEY `ip_address_5` (`ip_address`),
  ADD KEY `ip_address_6` (`ip_address`),
  ADD KEY `id_7` (`id`),
  ADD KEY `ip_address_7` (`ip_address`);

--
-- Indexes for table `ospos_stock_locations`
--
ALTER TABLE `ospos_stock_locations`
  ADD PRIMARY KEY (`location_id`);

--
-- Indexes for table `ospos_suppliers`
--
ALTER TABLE `ospos_suppliers`
  ADD PRIMARY KEY (`person_id`),
  ADD UNIQUE KEY `account_number` (`account_number`),
  ADD KEY `category` (`category`),
  ADD KEY `company_name` (`company_name`,`deleted`),
  ADD KEY `category_2` (`category`),
  ADD KEY `company_name_2` (`company_name`,`deleted`),
  ADD KEY `category_3` (`category`),
  ADD KEY `category_4` (`category`),
  ADD KEY `company_name_3` (`company_name`,`deleted`),
  ADD KEY `company_name_4` (`company_name`,`deleted`),
  ADD KEY `category_5` (`category`),
  ADD KEY `category_6` (`category`),
  ADD KEY `company_name_5` (`company_name`,`deleted`),
  ADD KEY `company_name_6` (`company_name`,`deleted`),
  ADD KEY `category_7` (`category`),
  ADD KEY `company_name_7` (`company_name`,`deleted`);

--
-- Indexes for table `ospos_tax_categories`
--
ALTER TABLE `ospos_tax_categories`
  ADD PRIMARY KEY (`tax_category_id`);

--
-- Indexes for table `ospos_tax_codes`
--
ALTER TABLE `ospos_tax_codes`
  ADD PRIMARY KEY (`tax_code_id`);

--
-- Indexes for table `ospos_tax_jurisdictions`
--
ALTER TABLE `ospos_tax_jurisdictions`
  ADD PRIMARY KEY (`jurisdiction_id`),
  ADD UNIQUE KEY `tax_jurisdictions_uq1` (`tax_group`);

--
-- Indexes for table `ospos_tax_rates`
--
ALTER TABLE `ospos_tax_rates`
  ADD PRIMARY KEY (`tax_rate_id`),
  ADD KEY `rate_tax_category_id` (`rate_tax_category_id`),
  ADD KEY `rate_tax_code_id` (`rate_tax_code_id`),
  ADD KEY `rate_jurisdiction_id` (`rate_jurisdiction_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `ospos_attribute_definitions`
--
ALTER TABLE `ospos_attribute_definitions`
  MODIFY `definition_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `ospos_attribute_values`
--
ALTER TABLE `ospos_attribute_values`
  MODIFY `attribute_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `ospos_bookings`
--
ALTER TABLE `ospos_bookings`
  MODIFY `booking_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `ospos_cash_up`
--
ALTER TABLE `ospos_cash_up`
  MODIFY `cashup_id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ospos_categories`
--
ALTER TABLE `ospos_categories`
  MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `ospos_customers_packages`
--
ALTER TABLE `ospos_customers_packages`
  MODIFY `package_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `ospos_customers_points`
--
ALTER TABLE `ospos_customers_points`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ospos_dinner_tables`
--
ALTER TABLE `ospos_dinner_tables`
  MODIFY `dinner_table_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `ospos_expenses`
--
ALTER TABLE `ospos_expenses`
  MODIFY `expense_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `ospos_expense_categories`
--
ALTER TABLE `ospos_expense_categories`
  MODIFY `expense_category_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `ospos_giftcards`
--
ALTER TABLE `ospos_giftcards`
  MODIFY `giftcard_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ospos_inventory`
--
ALTER TABLE `ospos_inventory`
  MODIFY `trans_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=168;

--
-- AUTO_INCREMENT for table `ospos_items`
--
ALTER TABLE `ospos_items`
  MODIFY `item_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;

--
-- AUTO_INCREMENT for table `ospos_item_kits`
--
ALTER TABLE `ospos_item_kits`
  MODIFY `item_kit_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `ospos_people`
--
ALTER TABLE `ospos_people`
  MODIFY `person_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `ospos_receivings`
--
ALTER TABLE `ospos_receivings`
  MODIFY `receiving_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `ospos_sales`
--
ALTER TABLE `ospos_sales`
  MODIFY `sale_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `ospos_sales_payments`
--
ALTER TABLE `ospos_sales_payments`
  MODIFY `payment_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `ospos_sales_reward_points`
--
ALTER TABLE `ospos_sales_reward_points`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ospos_sales_taxes`
--
ALTER TABLE `ospos_sales_taxes`
  MODIFY `sales_taxes_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ospos_stock_locations`
--
ALTER TABLE `ospos_stock_locations`
  MODIFY `location_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `ospos_tax_categories`
--
ALTER TABLE `ospos_tax_categories`
  MODIFY `tax_category_id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ospos_tax_codes`
--
ALTER TABLE `ospos_tax_codes`
  MODIFY `tax_code_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ospos_tax_jurisdictions`
--
ALTER TABLE `ospos_tax_jurisdictions`
  MODIFY `jurisdiction_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ospos_tax_rates`
--
ALTER TABLE `ospos_tax_rates`
  MODIFY `tax_rate_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `ospos_attribute_definitions`
--
ALTER TABLE `ospos_attribute_definitions`
  ADD CONSTRAINT `fk_ospos_attribute_definitions_ibfk_1` FOREIGN KEY (`definition_fk`) REFERENCES `ospos_attribute_definitions` (`definition_id`);

--
-- Constraints for table `ospos_attribute_links`
--
ALTER TABLE `ospos_attribute_links`
  ADD CONSTRAINT `ospos_attribute_links_ibfk_1` FOREIGN KEY (`definition_id`) REFERENCES `ospos_attribute_definitions` (`definition_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ospos_attribute_links_ibfk_2` FOREIGN KEY (`attribute_id`) REFERENCES `ospos_attribute_values` (`attribute_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ospos_attribute_links_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `ospos_items` (`item_id`),
  ADD CONSTRAINT `ospos_attribute_links_ibfk_4` FOREIGN KEY (`receiving_id`) REFERENCES `ospos_receivings` (`receiving_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ospos_attribute_links_ibfk_5` FOREIGN KEY (`sale_id`) REFERENCES `ospos_sales` (`sale_id`);

--
-- Constraints for table `ospos_cash_up`
--
ALTER TABLE `ospos_cash_up`
  ADD CONSTRAINT `ospos_cash_up_ibfk_1` FOREIGN KEY (`open_employee_id`) REFERENCES `ospos_employees` (`person_id`),
  ADD CONSTRAINT `ospos_cash_up_ibfk_2` FOREIGN KEY (`close_employee_id`) REFERENCES `ospos_employees` (`person_id`);

--
-- Constraints for table `ospos_customers`
--
ALTER TABLE `ospos_customers`
  ADD CONSTRAINT `ospos_customers_ibfk_3` FOREIGN KEY (`sales_tax_code_id`) REFERENCES `ospos_tax_codes` (`tax_code_id`);

--
-- Constraints for table `ospos_expenses`
--
ALTER TABLE `ospos_expenses`
  ADD CONSTRAINT `ospos_expenses_ibfk_1` FOREIGN KEY (`expense_category_id`) REFERENCES `ospos_expense_categories` (`expense_category_id`),
  ADD CONSTRAINT `ospos_expenses_ibfk_2` FOREIGN KEY (`employee_id`) REFERENCES `ospos_employees` (`person_id`),
  ADD CONSTRAINT `ospos_expenses_ibfk_3` FOREIGN KEY (`supplier_id`) REFERENCES `ospos_suppliers` (`person_id`);

--
-- Constraints for table `ospos_sales_payments`
--
ALTER TABLE `ospos_sales_payments`
  ADD CONSTRAINT `ospos_sales_payments_ibfk_1` FOREIGN KEY (`sale_id`) REFERENCES `ospos_sales` (`sale_id`),
  ADD CONSTRAINT `ospos_sales_payments_ibfk_2` FOREIGN KEY (`employee_id`) REFERENCES `ospos_employees` (`person_id`);

--
-- Constraints for table `ospos_tax_rates`
--
ALTER TABLE `ospos_tax_rates`
  ADD CONSTRAINT `ospos_tax_rates_ibfk_1` FOREIGN KEY (`rate_tax_category_id`) REFERENCES `ospos_tax_categories` (`tax_category_id`),
  ADD CONSTRAINT `ospos_tax_rates_ibfk_2` FOREIGN KEY (`rate_tax_code_id`) REFERENCES `ospos_tax_codes` (`tax_code_id`),
  ADD CONSTRAINT `ospos_tax_rates_ibfk_3` FOREIGN KEY (`rate_jurisdiction_id`) REFERENCES `ospos_tax_jurisdictions` (`jurisdiction_id`);
COMMIT;

