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

START TRANSACTION;



--
-- Database: `imsdb`
--

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

--
-- Table structure for table `tbl_accesscontrols`
--

CREATE TABLE `tbl_accesscontrols` (
  `id` int NOT NULL,
  `add_access` int NOT NULL DEFAULT '0',
  `edit_access` int NOT NULL DEFAULT '0',
  `active_deactivate_access` int NOT NULL DEFAULT '0',
  `module` varchar(225) NOT NULL,
  `user_type` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `tbl_brands`
--

CREATE TABLE `tbl_brands` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `brand_name` varchar(255) NOT NULL,
  `brand_image` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_brands`
--

INSERT INTO `tbl_brands` (`id`, `user_id`, `brand_name`, `brand_image`, `slug`, `status`, `created_at`, `updated_at`) VALUES
(2, 1, 'test', '90ea1510_.png', 'test-brand2', 0, '2024-04-11 09:06:31', '2024-04-20 08:43:45'),
(3, 1, 'test brand2', 'b55a941c_png', 'test-brand2-1', 1, '2024-04-11 09:10:41', '2024-04-20 08:43:50'),
(4, 1, 'test brand2', '6b4d0194_.png', 'test-brand2-2', 0, '2024-04-11 09:14:57', '2024-04-16 10:16:36'),
(5, 1, 'Apple', '63fd6895_.png', 'apple', 1, '2024-05-16 05:22:09', '2024-05-16 05:27:38');

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

--
-- Table structure for table `tbl_categories`
--

CREATE TABLE `tbl_categories` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `parent_id` int NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `image` varchar(225) NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_categories`
--

INSERT INTO `tbl_categories` (`id`, `user_id`, `parent_id`, `name`, `slug`, `image`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 0, 'test category 2', 'test-category-1', 'ad91c582_.png', 1, '2024-04-23 09:03:00', '2024-04-23 11:59:51'),
(2, 1, 1, 'Sub Cat 1', 'sub-cat-1', '', 1, '2024-04-23 11:19:57', '2024-04-23 12:18:04'),
(3, 1, 1, 'sub cat 2', 'sub-cat-2', '', 1, '2024-04-23 12:18:16', '2024-04-23 12:18:16');

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

--
-- Table structure for table `tbl_cities`
--

CREATE TABLE `tbl_cities` (
  `id` int NOT NULL,
  `country_id` int NOT NULL,
  `state_id` int NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` tinyint NOT NULL,
  `slug` int NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `tbl_countries`
--

CREATE TABLE `tbl_countries` (
  `id` int NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` tinyint NOT NULL DEFAULT '1',
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_countries`
--

INSERT INTO `tbl_countries` (`id`, `name`, `status`, `slug`, `created_at`, `updated_at`) VALUES
(1, 'India', 1, 'india', '2024-04-30 11:23:44', '2024-04-30 13:21:25'),
(2, 'USA', 1, 'usa', '2024-04-30 13:22:19', '2024-04-30 13:22:19'),
(3, 'UK', 1, 'uk', '2024-04-30 13:22:26', '2024-04-30 13:22:26'),
(4, 'Germany', 1, 'germany', '2024-04-30 13:22:41', '2024-04-30 13:22:41'),
(5, 'china', 1, 'china', '2024-04-30 13:23:02', '2024-04-30 13:23:02'),
(6, 'pakistan', 1, 'pakistan', '2024-04-30 13:23:15', '2024-04-30 13:23:15'),
(7, 'Iran', 1, 'iran', '2024-04-30 13:23:24', '2024-04-30 13:23:24'),
(8, 'Canada', 1, 'canada', '2024-04-30 13:24:06', '2024-04-30 13:24:06'),
(9, 'Nepal', 1, 'nepal', '2024-04-30 13:24:35', '2024-04-30 13:24:35'),
(10, 'Sri Lanka', 1, 'sri-lanka', '2024-04-30 13:24:55', '2024-04-30 13:24:55'),
(11, 'Thailand', 1, 'thailand', '2024-04-30 13:25:23', '2024-04-30 13:39:07');

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

--
-- Table structure for table `tbl_currencies`
--

CREATE TABLE `tbl_currencies` (
  `id` int NOT NULL,
  `code` varchar(255) NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `short_name` varchar(255) NOT NULL,
  `slug` varchar(225) NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_currencies`
--

INSERT INTO `tbl_currencies` (`id`, `code`, `full_name`, `short_name`, `slug`, `status`, `created_at`, `updated_at`) VALUES
(1, '₹', 'Rupee', 'INR', 'rupee', 1, '2024-05-28 04:49:01', '2024-05-28 04:59:50');

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

--
-- Table structure for table `tbl_customergroups`
--

CREATE TABLE `tbl_customergroups` (
  `id` int NOT NULL,
  `group_name` varchar(255) NOT NULL,
  `price` int NOT NULL,
  `slug` varchar(255) NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL,
  `updated_at` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_customergroups`
--

INSERT INTO `tbl_customergroups` (`id`, `group_name`, `price`, `slug`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Retailer', 11, 'retailer', 1, '2024-04-24 01:47:43', '2024-04-24 02:04:07');

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

--
-- Table structure for table `tbl_expenscategories`
--

CREATE TABLE `tbl_expenscategories` (
  `id` int NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` int NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_expenscategories`
--

INSERT INTO `tbl_expenscategories` (`id`, `name`, `status`, `slug`, `created_at`, `updated_at`) VALUES
(1, 'Electricity bill', 1, 'electricity-bill', '2024-04-24 09:22:37', '2024-04-24 09:42:47'),
(2, 'Currently Available', 1, 'currently-available', '2024-05-16 05:58:17', '2024-05-16 05:58:17');

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

--
-- Table structure for table `tbl_expenses`
--

CREATE TABLE `tbl_expenses` (
  `id` int NOT NULL,
  `date` date NOT NULL,
  `expenses_category` int NOT NULL,
  `warehouse` int NOT NULL,
  `expense_amount` float(12,2) NOT NULL,
  `assigned` int DEFAULT NULL,
  `status` int NOT NULL DEFAULT '1',
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_expenses`
--

INSERT INTO `tbl_expenses` (`id`, `date`, `expenses_category`, `warehouse`, `expense_amount`, `assigned`, `status`, `slug`, `created_at`, `updated_at`) VALUES
(1, '2024-04-24', 1, 1, 12.00, 1, 1, '1713959371', '2024-04-24 11:49:31', '2024-04-24 13:02:31');

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

--
-- Table structure for table `tbl_products`
--

CREATE TABLE `tbl_products` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_code` varchar(255) NOT NULL,
  `brand` int NOT NULL,
  `category` int NOT NULL,
  `sub_category` int DEFAULT NULL,
  `unit` int NOT NULL,
  `products_price` int NOT NULL,
  `products_quantity` int NOT NULL,
  `alert_quantity` int NOT NULL,
  `products_description` text NOT NULL,
  `tax` varchar(255) DEFAULT NULL,
  `tax_value` float(12,2) DEFAULT NULL,
  `products_tax` int DEFAULT NULL,
  `tax_method` varchar(255) NOT NULL,
  `product_images` varchar(255) NOT NULL,
  `products_variations` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `batch_no` varchar(255) NOT NULL,
  `warehouse` int NOT NULL,
  `sale_price` float(12,2) DEFAULT NULL,
  `sale_start_date` date DEFAULT NULL,
  `sale_end_date` date DEFAULT NULL,
  `slug` varchar(255) NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_products`
--

INSERT INTO `tbl_products` (`id`, `user_id`, `product_name`, `product_code`, `brand`, `category`, `sub_category`, `unit`, `products_price`, `products_quantity`, `alert_quantity`, `products_description`, `tax`, `tax_value`, `products_tax`, `tax_method`, `product_images`, `products_variations`, `expiry_date`, `batch_no`, `warehouse`, `sale_price`, `sale_start_date`, `sale_end_date`, `slug`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'test product', '1221231', 3, 1, 3, 2, 332, 12, 5, 'test product discription', 'VAT', 28.00, 1, 'inclusive', 'ef9f7a3c_.png', 'no', '2024-04-30', '2123312', 1, 12.00, NULL, NULL, 'test-product', 1, '2024-04-25 09:24:12', '2024-05-03 05:04:02'),
(2, 1, 'good day', 'day2AS1', 3, 1, 2, 2, 10, 120, 10, 'This is good day buiscet', 'VAT', 12.00, NULL, 'inclusive', '48c13f5e_.png', NULL, '2024-05-31', '2123312', 1, NULL, NULL, NULL, 'good-day', 1, '2024-04-29 10:21:40', '2024-04-29 10:21:40'),
(3, 1, 'iphone', '1221231', 3, 1, 2, 2, 123000, 120, 5, 'iphone', 'VAT', 28.00, NULL, 'inclusive', '268c9637_.png', NULL, NULL, '2123312', 1, NULL, NULL, NULL, 'iphone', 1, '2024-04-29 10:34:38', '2024-04-29 12:04:26'),
(4, 1, 'good day biscut', 'good_day_123', 3, 1, 2, 2, 20, 12, 5, 'good day', 'GST', 28.00, NULL, 'inclusive', '1385400a_.png', NULL, '2024-05-17', '2123312', 1, 123.00, NULL, NULL, 'good-day-biscut', 1, '2024-05-17 10:53:38', '2024-05-17 10:53:38');

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

--
-- Table structure for table `tbl_productvariants`
--

CREATE TABLE `tbl_productvariants` (
  `id` int NOT NULL,
  `productId` int NOT NULL,
  `variant` varchar(255) NOT NULL,
  `image` varchar(255) NOT NULL,
  `price` float(12,2) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_productvariants`
--

INSERT INTO `tbl_productvariants` (`id`, `productId`, `variant`, `image`, `price`, `created_at`, `updated_at`) VALUES
(1, 3, 'gold2', '36a900f0c_.png', 1230000.00, '2024-04-29 10:34:38', '2024-04-29 12:02:45'),
(3, 3, 'Black', '360fdee2b_.png', 1230000.00, '2024-04-29 12:04:26', '2024-04-29 12:04:26'),
(4, 4, 'gold', '4221a1362_.png', 100.00, '2024-05-17 10:53:38', '2024-05-17 10:53:38');

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

--
-- Table structure for table `tbl_purchaseorderproducts`
--

CREATE TABLE `tbl_purchaseorderproducts` (
  `id` int NOT NULL,
  `order_id` int NOT NULL,
  `product_id` int NOT NULL,
  `quantity` int NOT NULL,
  `taxPrice` float(12,2) NOT NULL,
  `tax_value` float(12,2) NOT NULL,
  `tax` varchar(255) NOT NULL,
  `taxAmount` float(12,2) NOT NULL,
  `price` float(12,2) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_purchaseorderproducts`
--

INSERT INTO `tbl_purchaseorderproducts` (`id`, `order_id`, `product_id`, `quantity`, `taxPrice`, `tax_value`, `tax`, `taxAmount`, `price`, `slug`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 259.37, 28.00, 'VAT', 72.63, 332.00, '1715662248', '2024-05-14 04:50:48', '2024-05-14 04:50:48'),
(2, 1, 2, 2, 17.86, 12.00, 'VAT', 2.14, 20.00, '1715662248-1', '2024-05-14 04:50:48', '2024-05-14 04:50:48'),
(3, 3, 1, 1, 259.37, 28.00, 'VAT', 72.63, 332.00, '1716199543', '2024-05-20 10:05:43', '2024-05-20 10:05:43'),
(4, 3, 2, 2, 17.86, 12.00, 'VAT', 2.14, 20.00, '1716199543-1', '2024-05-20 10:05:43', '2024-05-20 10:05:43'),
(8, 4, 1, 1, 259.37, 28.00, 'VAT', 72.63, 332.00, '1716204927', '2024-05-20 11:35:27', '2024-05-20 11:35:27'),
(9, 4, 2, 2, 17.86, 12.00, 'VAT', 2.14, 20.00, '1716204927-1', '2024-05-20 11:35:27', '2024-05-20 11:35:27'),
(10, 4, 4, 4, 62.50, 28.00, 'GST', 17.50, 80.00, '1716204927-2', '2024-05-20 11:35:27', '2024-05-20 11:35:27');

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

--
-- Table structure for table `tbl_purchaseorders`
--

CREATE TABLE `tbl_purchaseorders` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `date` date NOT NULL,
  `warehouse` int NOT NULL,
  `supplier` int NOT NULL,
  `total_tax` float(12,2) NOT NULL,
  `total` float(12,2) NOT NULL,
  `shipping_cost` float(12,2) NOT NULL,
  `finaltotal` float(12,2) NOT NULL,
  `discount` float(12,2) DEFAULT NULL,
  `orderstatus` int NOT NULL,
  `status` tinyint NOT NULL DEFAULT '1',
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_purchaseorders`
--

INSERT INTO `tbl_purchaseorders` (`id`, `user_id`, `date`, `warehouse`, `supplier`, `total_tax`, `total`, `shipping_cost`, `finaltotal`, `discount`, `orderstatus`, `status`, `slug`, `created_at`, `updated_at`) VALUES
(1, 1, '2024-05-14', 1, 3, 146.32, 674.00, 1000.00, 674.00, NULL, 2, 1, '1715661418', '2024-05-14 04:36:58', '2024-05-24 07:39:13'),
(3, 1, '2024-05-22', 2, 3, 74.77, 352.00, 1000.00, 1352.00, NULL, 4, 1, '1716199543', '2024-05-20 10:05:43', '2024-05-20 10:05:43'),
(4, 1, '2024-05-22', 1, 3, 92.27, 432.00, 1000.00, 1432.00, NULL, 4, 1, '1716203173', '2024-05-20 11:06:13', '2024-05-20 11:35:27');

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

--
-- Table structure for table `tbl_purchase_order_status_histories`
--

CREATE TABLE `tbl_purchase_order_status_histories` (
  `id` int NOT NULL,
  `order_id` int NOT NULL,
  `user_id` int NOT NULL,
  `status` int NOT NULL,
  `note` varchar(225) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_purchase_order_status_histories`
--

INSERT INTO `tbl_purchase_order_status_histories` (`id`, `order_id`, `user_id`, `status`, `note`, `slug`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 2, 'test', '1716533883', '2024-05-24 06:58:03', '2024-05-24 06:58:03'),
(2, 1, 1, 1, 'test', '1716536166', '2024-05-24 07:36:06', '2024-05-24 07:36:06'),
(3, 1, 1, 2, 'test', '1716536353', '2024-05-24 07:39:13', '2024-05-24 07:39:13');

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

--
-- Table structure for table `tbl_quotations`
--

CREATE TABLE `tbl_quotations` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `supplier` int NOT NULL,
  `customer` int NOT NULL,
  `warehouse` int NOT NULL,
  `total_tax` float(12,2) NOT NULL,
  `total` float(12,2) NOT NULL,
  `shipping_cost` float(12,2) NOT NULL,
  `finaltotal` float(12,2) NOT NULL,
  `discount` float(12,2) NOT NULL,
  `quotations_status` int NOT NULL,
  `status` int NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_quotations`
--

INSERT INTO `tbl_quotations` (`id`, `user_id`, `supplier`, `customer`, `warehouse`, `total_tax`, `total`, `shipping_cost`, `finaltotal`, `discount`, `quotations_status`, `status`, `slug`, `created_at`, `updated_at`) VALUES
(1, 1, 3, 5, 1, 149.63, 684.00, 1000.00, 1664.00, 20.00, 2, 1, '1716976919', '2024-05-29 10:01:59', '2024-05-29 10:31:47'),
(2, 1, 3, 5, 1, 149.63, 684.00, 1000.00, 1664.00, 20.00, 1, 1, '1716976968', '2024-05-29 10:02:48', '2024-05-29 10:02:48');

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

--
-- Table structure for table `tbl_quotation_products`
--

CREATE TABLE `tbl_quotation_products` (
  `id` int NOT NULL,
  `quotation_id` int NOT NULL,
  `product_id` int NOT NULL,
  `quantity` int NOT NULL,
  `taxPrice` float(12,2) NOT NULL,
  `tax_value` float(12,2) NOT NULL,
  `tax` varchar(255) NOT NULL,
  `taxAmount` float(12,2) NOT NULL,
  `price` float(12,2) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_quotation_products`
--

INSERT INTO `tbl_quotation_products` (`id`, `quotation_id`, `product_id`, `quantity`, `taxPrice`, `tax_value`, `tax`, `taxAmount`, `price`, `slug`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 2, 518.75, 28.00, 'VAT', 145.25, 664.00, '1716976919', '2024-05-29 10:01:59', '2024-05-29 10:01:59'),
(2, 1, 4, 1, 15.62, 28.00, 'GST', 4.38, 20.00, '1716976919-1', '2024-05-29 10:01:59', '2024-05-29 10:01:59'),
(3, 2, 1, 2, 518.75, 28.00, 'VAT', 145.25, 664.00, '1716976968', '2024-05-29 10:02:48', '2024-05-29 10:02:48'),
(4, 2, 4, 1, 15.62, 28.00, 'GST', 4.38, 20.00, '1716976968-1', '2024-05-29 10:02:48', '2024-05-29 10:02:48');

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

--
-- Table structure for table `tbl_quotation_status_histories`
--

CREATE TABLE `tbl_quotation_status_histories` (
  `id` int NOT NULL,
  `quote_id` int NOT NULL,
  `user_id` int NOT NULL,
  `status` int NOT NULL,
  `note` varchar(225) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_quotation_status_histories`
--

INSERT INTO `tbl_quotation_status_histories` (`id`, `quote_id`, `user_id`, `status`, `note`, `slug`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 2, 'test', '1716978518', '2024-05-29 10:28:38', '2024-05-29 10:28:38'),
(2, 1, 1, 2, 'test', '1716978577', '2024-05-29 10:29:37', '2024-05-29 10:29:37'),
(3, 1, 1, 2, 'test', '1716978650', '2024-05-29 10:30:50', '2024-05-29 10:30:50'),
(4, 1, 1, 2, 'test', '1716978707', '2024-05-29 10:31:47', '2024-05-29 10:31:47');

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

--
-- Table structure for table `tbl_sales`
--

CREATE TABLE `tbl_sales` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `customer` int NOT NULL,
  `date` date NOT NULL,
  `order_number` varchar(255) NOT NULL,
  `warehouse` int NOT NULL,
  `total_tax` float(12,2) NOT NULL,
  `total` float(12,2) NOT NULL,
  `shipping_cost` float(12,2) NOT NULL,
  `finaltotal` float(12,2) NOT NULL,
  `discount` float(12,2) NOT NULL,
  `orderstatus` int NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `paymentstatus` int NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_sales`
--

INSERT INTO `tbl_sales` (`id`, `user_id`, `customer`, `date`, `order_number`, `warehouse`, `total_tax`, `total`, `shipping_cost`, `finaltotal`, `discount`, `orderstatus`, `status`, `paymentstatus`, `slug`, `created_at`, `updated_at`) VALUES
(3, 1, 5, '2024-05-23', 'order-1287-8866488341', 1, 5.36, 50.00, 1000.00, 1040.00, 10.00, 2, 1, 2, '1716459483', '2024-05-23 10:18:03', '2024-05-28 06:24:49');

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

--
-- Table structure for table `tbl_salesorderproducts`
--

CREATE TABLE `tbl_salesorderproducts` (
  `id` int NOT NULL,
  `order_id` int NOT NULL,
  `product_id` int NOT NULL,
  `quantity` int NOT NULL,
  `taxPrice` float(12,2) NOT NULL,
  `tax_value` float(12,2) NOT NULL,
  `tax` varchar(255) NOT NULL,
  `taxAmount` float(12,2) NOT NULL,
  `price` float(12,2) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_salesorderproducts`
--

INSERT INTO `tbl_salesorderproducts` (`id`, `order_id`, `product_id`, `quantity`, `taxPrice`, `tax_value`, `tax`, `taxAmount`, `price`, `slug`, `created_at`, `updated_at`) VALUES
(1, 2, 1, 2, 518.75, 28.00, 'VAT', 145.25, 664.00, '1716450329', '2024-05-23 07:45:29', '2024-05-23 07:45:29'),
(2, 2, 2, 1, 8.93, 12.00, 'VAT', 1.07, 10.00, '1716450329-1', '2024-05-23 07:45:29', '2024-05-23 07:45:29'),
(4, 3, 2, 5, 44.64, 12.00, 'VAT', 5.36, 50.00, '1716460006', '2024-05-23 10:26:46', '2024-05-23 10:26:46');

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

--
-- Table structure for table `tbl_sales_order_status_histories`
--

CREATE TABLE `tbl_sales_order_status_histories` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `order_id` int NOT NULL,
  `status` int NOT NULL,
  `note` varchar(255) NOT NULL,
  `slug` varchar(225) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_sales_order_status_histories`
--

INSERT INTO `tbl_sales_order_status_histories` (`id`, `user_id`, `order_id`, `status`, `note`, `slug`, `created_at`, `updated_at`) VALUES
(1, 1, 3, 2, 'tesing', '1716877071', '2024-05-28 06:17:51', '2024-05-28 06:17:51'),
(2, 1, 3, 2, 'test status', '1716877489', '2024-05-28 06:24:49', '2024-05-28 06:24:49');

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

--
-- Table structure for table `tbl_states`
--

CREATE TABLE `tbl_states` (
  `id` int NOT NULL,
  `country_id` int NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` tinyint NOT NULL DEFAULT '1',
  `slug` varchar(225) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `tbl_taxes`
--

CREATE TABLE `tbl_taxes` (
  `id` int NOT NULL,
  `name` varchar(255) NOT NULL,
  `tax_rate` int NOT NULL,
  `slug` varchar(255) NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_taxes`
--

INSERT INTO `tbl_taxes` (`id`, `name`, `tax_rate`, `slug`, `status`, `created_at`, `updated_at`) VALUES
(1, 'GST', 18, 'gst', 1, '2024-04-24 05:13:29', '2024-04-24 05:39:47');

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

--
-- Table structure for table `tbl_transferproducts`
--

CREATE TABLE `tbl_transferproducts` (
  `id` int NOT NULL,
  `transfer_id` int NOT NULL,
  `product_id` int NOT NULL,
  `quantity` int NOT NULL,
  `taxPrice` float DEFAULT NULL,
  `tax_value` float(12,2) DEFAULT NULL,
  `tax` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `taxAmount` float(12,2) DEFAULT NULL,
  `price` float(12,2) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_transferproducts`
--

INSERT INTO `tbl_transferproducts` (`id`, `transfer_id`, `product_id`, `quantity`, `taxPrice`, `tax_value`, `tax`, `taxAmount`, `price`, `slug`, `created_at`, `updated_at`) VALUES
(2, 2, 2, 3, 26.79, 12.00, 'VAT', 3.21, 30.00, '1716359160', '2024-05-22 06:26:00', '2024-05-22 06:26:00'),
(4, 4, 4, 3, 46.87, 28.00, 'GST', 13.13, 60.00, '1716359728', '2024-05-22 06:35:28', '2024-05-22 06:35:28'),
(6, 3, 4, 4, 62.5, 28.00, 'GST', 17.50, 80.00, '1716367258', '2024-05-22 08:40:58', '2024-05-22 08:40:58'),
(8, 1, 2, 3, NULL, NULL, NULL, NULL, 30.00, '1716897774', '2024-05-28 12:02:54', '2024-05-28 12:02:54');

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

--
-- Table structure for table `tbl_units`
--

CREATE TABLE `tbl_units` (
  `id` int NOT NULL,
  `unit_code` varchar(255) NOT NULL,
  `unit_name` varchar(255) NOT NULL,
  `base_unit` int NOT NULL,
  `operator` varchar(225) NOT NULL,
  `operator_value` int NOT NULL,
  `slug` varchar(255) NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_units`
--

INSERT INTO `tbl_units` (`id`, `unit_code`, `unit_name`, `base_unit`, `operator`, `operator_value`, `slug`, `status`, `created_at`, `updated_at`) VALUES
(2, 'kg', 'Kilogram', 1, '*', 2, 'kilogram-1', 1, '2024-04-16 12:20:49', '2024-04-17 04:47:22');

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

--
-- Table structure for table `tbl_warehouses`
--

CREATE TABLE `tbl_warehouses` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `warehouse_name` varchar(255) NOT NULL,
  `phone_number` bigint NOT NULL,
  `email` varchar(255) NOT NULL,
  `address` varchar(225) NOT NULL,
  `stock` int DEFAULT NULL,
  `status` tinyint NOT NULL DEFAULT '1',
  `slug` varchar(255) NOT NULL,
  `contact_name` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_warehouses`
--

INSERT INTO `tbl_warehouses` (`id`, `user_id`, `warehouse_name`, `phone_number`, `email`, `address`, `stock`, `status`, `slug`, `contact_name`, `created_at`, `updated_at`) VALUES
(1, 1, 'Test Warehouse1', 12222232232, 'testwarehouse@email.com', 'test address', 12, 1, 'test-warehouse1', NULL, '2024-04-23 04:58:21', '2024-04-23 06:21:11'),
(2, 1, 'Test Warehouse 2', 223125534, 'test@gmail.com', 'test address', NULL, 1, 'test-warehouse-2', 'Test user', '2024-05-22 04:44:53', '2024-05-22 04:44:53');

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

--
-- Table structure for table `tbl_warehousetransfers`
--

CREATE TABLE `tbl_warehousetransfers` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `date` date NOT NULL,
  `from_warehouse` int NOT NULL,
  `to_warehouse` int NOT NULL,
  `total_tax` float(12,2) DEFAULT NULL,
  `total` float(12,2) NOT NULL,
  `shipping_cost` float(12,2) NOT NULL,
  `finaltotal` float(12,2) NOT NULL,
  `transferstatus` int NOT NULL,
  `status` int NOT NULL DEFAULT '1',
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_warehousetransfers`
--

INSERT INTO `tbl_warehousetransfers` (`id`, `user_id`, `date`, `from_warehouse`, `to_warehouse`, `total_tax`, `total`, `shipping_cost`, `finaltotal`, `transferstatus`, `status`, `slug`, `created_at`, `updated_at`) VALUES
(1, 1, '2024-05-22', 1, 2, 3.21, 30.00, 1000.00, 1030.00, 1, 1, '1716357786', '2024-05-22 06:03:06', '2024-05-28 12:38:04'),
(3, 1, '2024-05-22', 1, 2, 17.50, 80.00, 100.00, 180.00, 1, 1, '1716359679', '2024-05-22 06:34:39', '2024-05-22 08:40:58'),
(4, 1, '2024-05-22', 1, 2, 13.13, 60.00, 100.00, 60.00, 2, 1, '1716359728', '2024-05-22 06:35:28', '2024-05-22 07:20:33');

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

--
-- Table structure for table `tbl_warehouse_transfer_status_histories`
--

CREATE TABLE `tbl_warehouse_transfer_status_histories` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `transfer_id` int NOT NULL,
  `status` int NOT NULL,
  `note` varchar(225) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `tbl_warehouse_transfer_status_histories`
--

INSERT INTO `tbl_warehouse_transfer_status_histories` (`id`, `user_id`, `transfer_id`, `status`, `note`, `slug`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 'test', '1716899884', '2024-05-28 12:38:04', '2024-05-28 12:38:04');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `tbl_accesscontrols`
--
ALTER TABLE `tbl_accesscontrols`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_brands`
--
ALTER TABLE `tbl_brands`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_categories`
--
ALTER TABLE `tbl_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_cities`
--
ALTER TABLE `tbl_cities`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_countries`
--
ALTER TABLE `tbl_countries`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_currencies`
--
ALTER TABLE `tbl_currencies`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_customergroups`
--
ALTER TABLE `tbl_customergroups`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_expenscategories`
--
ALTER TABLE `tbl_expenscategories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_expenses`
--
ALTER TABLE `tbl_expenses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_products`
--
ALTER TABLE `tbl_products`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_productvariants`
--
ALTER TABLE `tbl_productvariants`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_purchaseorderproducts`
--
ALTER TABLE `tbl_purchaseorderproducts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_purchaseorders`
--
ALTER TABLE `tbl_purchaseorders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_purchase_order_status_histories`
--
ALTER TABLE `tbl_purchase_order_status_histories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_quotations`
--
ALTER TABLE `tbl_quotations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_quotation_products`
--
ALTER TABLE `tbl_quotation_products`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_quotation_status_histories`
--
ALTER TABLE `tbl_quotation_status_histories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_sales`
--
ALTER TABLE `tbl_sales`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `ordernumber` (`order_number`);

--
-- Indexes for table `tbl_salesorderproducts`
--
ALTER TABLE `tbl_salesorderproducts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_sales_order_status_histories`
--
ALTER TABLE `tbl_sales_order_status_histories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_states`
--
ALTER TABLE `tbl_states`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_taxes`
--
ALTER TABLE `tbl_taxes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_transferproducts`
--
ALTER TABLE `tbl_transferproducts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_units`
--
ALTER TABLE `tbl_units`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_warehouses`
--
ALTER TABLE `tbl_warehouses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_warehousetransfers`
--
ALTER TABLE `tbl_warehousetransfers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tbl_warehouse_transfer_status_histories`
--
ALTER TABLE `tbl_warehouse_transfer_status_histories`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `tbl_accesscontrols`
--
ALTER TABLE `tbl_accesscontrols`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tbl_brands`
--
ALTER TABLE `tbl_brands`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `tbl_categories`
--
ALTER TABLE `tbl_categories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `tbl_cities`
--
ALTER TABLE `tbl_cities`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tbl_countries`
--
ALTER TABLE `tbl_countries`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `tbl_currencies`
--
ALTER TABLE `tbl_currencies`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `tbl_customergroups`
--
ALTER TABLE `tbl_customergroups`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `tbl_expenscategories`
--
ALTER TABLE `tbl_expenscategories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `tbl_expenses`
--
ALTER TABLE `tbl_expenses`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `tbl_products`
--
ALTER TABLE `tbl_products`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `tbl_productvariants`
--
ALTER TABLE `tbl_productvariants`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `tbl_purchaseorderproducts`
--
ALTER TABLE `tbl_purchaseorderproducts`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `tbl_purchaseorders`
--
ALTER TABLE `tbl_purchaseorders`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `tbl_purchase_order_status_histories`
--
ALTER TABLE `tbl_purchase_order_status_histories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `tbl_quotations`
--
ALTER TABLE `tbl_quotations`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `tbl_quotation_products`
--
ALTER TABLE `tbl_quotation_products`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `tbl_quotation_status_histories`
--
ALTER TABLE `tbl_quotation_status_histories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `tbl_sales`
--
ALTER TABLE `tbl_sales`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `tbl_salesorderproducts`
--
ALTER TABLE `tbl_salesorderproducts`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `tbl_sales_order_status_histories`
--
ALTER TABLE `tbl_sales_order_status_histories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `tbl_states`
--
ALTER TABLE `tbl_states`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tbl_taxes`
--
ALTER TABLE `tbl_taxes`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `tbl_transferproducts`
--
ALTER TABLE `tbl_transferproducts`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `tbl_units`
--
ALTER TABLE `tbl_units`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `tbl_warehouses`
--
ALTER TABLE `tbl_warehouses`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `tbl_warehousetransfers`
--
ALTER TABLE `tbl_warehousetransfers`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `tbl_warehouse_transfer_status_histories`
--
ALTER TABLE `tbl_warehouse_transfer_status_histories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
COMMIT;

