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

START TRANSACTION;



--
-- Database: `bdigsdqb_okda2`
--

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

--
-- Table structure for table `accounts`
--

CREATE TABLE `accounts` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(11) NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_number` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_type_id` int(11) DEFAULT NULL,
  `note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` int(11) NOT NULL,
  `is_closed` tinyint(1) NOT NULL DEFAULT 0,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `account_transactions` (
  `id` int(10) UNSIGNED NOT NULL,
  `account_id` int(11) NOT NULL,
  `type` enum('debit','credit') COLLATE utf8mb4_unicode_ci NOT NULL,
  `sub_type` enum('opening_balance','fund_transfer','deposit') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` decimal(22,4) NOT NULL,
  `reff_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `operation_date` datetime NOT NULL,
  `created_by` int(11) NOT NULL,
  `transaction_id` int(11) DEFAULT NULL,
  `transaction_payment_id` int(11) DEFAULT NULL,
  `transfer_transaction_id` int(11) DEFAULT NULL,
  `note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `account_types` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parent_account_type_id` int(11) DEFAULT NULL,
  `business_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `activity_log`
--

CREATE TABLE `activity_log` (
  `id` int(10) UNSIGNED NOT NULL,
  `log_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `subject_id` int(11) DEFAULT NULL,
  `subject_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `causer_id` int(11) DEFAULT NULL,
  `causer_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `properties` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `activity_log`
--

INSERT INTO `activity_log` (`id`, `log_name`, `description`, `subject_id`, `subject_type`, `causer_id`, `causer_type`, `properties`, `created_at`, `updated_at`) VALUES
(1, 'default', 'added', 1, 'App\\Transaction', 1, 'App\\User', '[]', '2020-10-07 01:58:32', '2020-10-07 01:58:32'),
(2, 'default', 'added', 2, 'App\\Transaction', 1, 'App\\User', '[]', '2020-10-07 02:00:54', '2020-10-07 02:00:54'),
(3, 'default', 'added', 3, 'App\\Transaction', 1, 'App\\User', '[]', '2020-10-07 02:01:57', '2020-10-07 02:01:57'),
(4, 'default', 'added', 5, 'App\\Transaction', 1, 'App\\User', '[]', '2020-10-10 15:22:46', '2020-10-10 15:22:46'),
(5, 'default', 'added', 6, 'App\\Transaction', 1, 'App\\User', '[]', '2020-10-10 15:26:06', '2020-10-10 15:26:06'),
(6, 'default', 'added', 8, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-10 23:50:34', '2020-10-10 23:50:34'),
(7, 'default', 'added', 9, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-10 23:51:44', '2020-10-10 23:51:44'),
(8, 'default', 'added', 10, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-10 23:52:05', '2020-10-10 23:52:05'),
(9, 'default', 'added', 11, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-10 23:52:26', '2020-10-10 23:52:26'),
(10, 'default', 'added', 12, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-11 00:17:41', '2020-10-11 00:17:41'),
(11, 'default', 'added', 14, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-13 13:51:45', '2020-10-13 13:51:45'),
(12, 'default', 'added', 15, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-13 13:54:31', '2020-10-13 13:54:31'),
(13, 'default', 'added', 16, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-13 13:55:05', '2020-10-13 13:55:05'),
(14, 'default', 'added', 17, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-13 19:07:46', '2020-10-13 19:07:46'),
(15, 'default', 'added', 25, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-15 17:26:15', '2020-10-15 17:26:15'),
(16, 'default', 'added', 26, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-15 17:29:11', '2020-10-15 17:29:11'),
(17, 'default', 'added', 27, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-15 17:37:20', '2020-10-15 17:37:20'),
(18, 'default', 'added', 28, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-15 18:48:15', '2020-10-15 18:48:15'),
(19, 'default', 'added', 29, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-15 18:49:47', '2020-10-15 18:49:47'),
(20, 'default', 'added', 30, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-15 18:51:31', '2020-10-15 18:51:31'),
(21, 'default', 'added', 31, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-15 19:07:12', '2020-10-15 19:07:12'),
(22, 'default', 'added', 32, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-15 19:15:20', '2020-10-15 19:15:20'),
(23, 'default', 'added', 33, 'App\\Transaction', 3, 'App\\User', '[]', '2020-10-16 00:48:02', '2020-10-16 00:48:02'),
(24, 'default', 'added', 34, 'App\\Transaction', 3, 'App\\User', '[]', '2020-10-16 00:48:38', '2020-10-16 00:48:38'),
(25, 'default', 'added', 35, 'App\\Transaction', 3, 'App\\User', '[]', '2020-10-16 00:49:38', '2020-10-16 00:49:38'),
(26, 'default', 'added', 36, 'App\\Transaction', 3, 'App\\User', '[]', '2020-10-16 00:51:34', '2020-10-16 00:51:34'),
(27, 'default', 'added', 37, 'App\\Transaction', 3, 'App\\User', '[]', '2020-10-16 00:52:16', '2020-10-16 00:52:16'),
(28, 'default', 'added', 39, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-16 01:41:36', '2020-10-16 01:41:36'),
(29, 'default', 'added', 41, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-16 01:47:09', '2020-10-16 01:47:09'),
(30, 'default', 'added', 42, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-16 01:50:05', '2020-10-16 01:50:05'),
(31, 'default', 'added', 43, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-16 01:56:19', '2020-10-16 01:56:19'),
(32, 'default', 'added', 51, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-16 02:26:37', '2020-10-16 02:26:37'),
(33, 'default', 'added', 52, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-16 02:37:20', '2020-10-16 02:37:20'),
(34, 'default', 'added', 62, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 17:05:53', '2020-10-17 17:05:53'),
(35, 'default', 'added', 63, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 17:06:37', '2020-10-17 17:06:37'),
(36, 'default', 'added', 64, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 17:11:48', '2020-10-17 17:11:48'),
(37, 'default', 'added', 66, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 20:41:45', '2020-10-17 20:41:45'),
(38, 'default', 'added', 69, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 21:26:21', '2020-10-17 21:26:21'),
(39, 'default', 'added', 71, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 21:38:28', '2020-10-17 21:38:28'),
(40, 'default', 'added', 75, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 22:04:04', '2020-10-17 22:04:04'),
(41, 'default', 'added', 77, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 22:43:39', '2020-10-17 22:43:39'),
(42, 'default', 'added', 78, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 23:18:35', '2020-10-17 23:18:35'),
(43, 'default', 'added', 79, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 23:19:18', '2020-10-17 23:19:18'),
(44, 'default', 'added', 81, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 23:56:08', '2020-10-17 23:56:08'),
(45, 'default', 'added', 82, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-17 23:59:20', '2020-10-17 23:59:20'),
(46, 'default', 'added', 83, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 00:13:51', '2020-10-18 00:13:51'),
(47, 'default', 'added', 84, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 00:14:51', '2020-10-18 00:14:51'),
(48, 'default', 'added', 85, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 00:20:40', '2020-10-18 00:20:40'),
(49, 'default', 'added', 86, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 00:25:12', '2020-10-18 00:25:12'),
(50, 'default', 'added', 88, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 00:33:53', '2020-10-18 00:33:53'),
(51, 'default', 'added', 89, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 00:47:59', '2020-10-18 00:47:59'),
(52, 'default', 'added', 92, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 01:05:05', '2020-10-18 01:05:05'),
(53, 'default', 'added', 101, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 02:11:23', '2020-10-18 02:11:23'),
(54, 'default', 'added', 102, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 02:14:44', '2020-10-18 02:14:44'),
(55, 'default', 'added', 103, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 02:15:39', '2020-10-18 02:15:39'),
(56, 'default', 'added', 104, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 02:16:24', '2020-10-18 02:16:24'),
(57, 'default', 'added', 115, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-18 17:04:30', '2020-10-18 17:04:30'),
(58, 'default', 'added', 134, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 00:25:41', '2020-10-19 00:25:41'),
(59, 'default', 'added', 135, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 00:26:12', '2020-10-19 00:26:12'),
(60, 'default', 'added', 136, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 00:27:26', '2020-10-19 00:27:26'),
(61, 'default', 'added', 139, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 00:45:03', '2020-10-19 00:45:03'),
(62, 'default', 'added', 155, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:03:02', '2020-10-19 16:03:02'),
(63, 'default', 'added', 156, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:05:57', '2020-10-19 16:05:57'),
(64, 'default', 'added', 157, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:12:19', '2020-10-19 16:12:19'),
(65, 'default', 'added', 158, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:13:48', '2020-10-19 16:13:48'),
(66, 'default', 'added', 159, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:21:18', '2020-10-19 16:21:18'),
(67, 'default', 'added', 160, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:23:38', '2020-10-19 16:23:38'),
(68, 'default', 'added', 161, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:28:13', '2020-10-19 16:28:13'),
(69, 'default', 'added', 162, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:31:42', '2020-10-19 16:31:42'),
(70, 'default', 'added', 163, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:33:54', '2020-10-19 16:33:54'),
(71, 'default', 'added', 164, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:35:04', '2020-10-19 16:35:04'),
(72, 'default', 'added', 165, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:37:28', '2020-10-19 16:37:28'),
(73, 'default', 'added', 166, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-19 16:38:48', '2020-10-19 16:38:48'),
(74, 'default', 'added', 168, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-23 00:24:06', '2020-10-23 00:24:06'),
(75, 'default', 'added', 169, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-23 20:56:14', '2020-10-23 20:56:14'),
(76, 'default', 'added', 170, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-23 21:10:15', '2020-10-23 21:10:15'),
(77, 'default', 'added', 171, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-23 21:21:57', '2020-10-23 21:21:57'),
(78, 'default', 'added', 173, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-23 22:50:48', '2020-10-23 22:50:48'),
(79, 'default', 'added', 174, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-23 22:59:29', '2020-10-23 22:59:29'),
(80, 'default', 'added', 175, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-23 23:01:56', '2020-10-23 23:01:56'),
(81, 'default', 'added', 176, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-23 23:02:27', '2020-10-23 23:02:27'),
(82, 'default', 'added', 177, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-24 22:21:44', '2020-10-24 22:21:44'),
(83, 'default', 'added', 178, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-25 20:45:21', '2020-10-25 20:45:21'),
(84, 'default', 'added', 179, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-28 00:15:45', '2020-10-28 00:15:45'),
(85, 'default', 'added', 180, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-28 02:28:51', '2020-10-28 02:28:51'),
(86, 'default', 'added', 181, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-28 02:42:15', '2020-10-28 02:42:15'),
(87, 'default', 'added', 182, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-29 00:01:51', '2020-10-29 00:01:51'),
(88, 'default', 'added', 183, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-29 02:39:03', '2020-10-29 02:39:03'),
(89, 'default', 'added', 184, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-29 03:22:10', '2020-10-29 03:22:10'),
(90, 'default', 'added', 185, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-29 03:23:07', '2020-10-29 03:23:07'),
(91, 'default', 'added', 186, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-30 01:22:38', '2020-10-30 01:22:38'),
(92, 'default', 'added', 187, 'App\\Transaction', 2, 'App\\User', '[]', '2020-10-31 03:15:06', '2020-10-31 03:15:06'),
(93, 'default', 'added', 188, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-01 02:44:21', '2020-11-01 02:44:21'),
(94, 'default', 'added', 189, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-03 21:59:26', '2020-11-03 21:59:26'),
(95, 'default', 'added', 190, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-03 23:40:46', '2020-11-03 23:40:46'),
(96, 'default', 'added', 191, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-03 23:45:09', '2020-11-03 23:45:09'),
(97, 'default', 'added', 192, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-05 14:55:32', '2020-11-05 14:55:32'),
(98, 'default', 'added', 193, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-06 03:55:13', '2020-11-06 03:55:13'),
(99, 'default', 'added', 194, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-06 03:56:37', '2020-11-06 03:56:37'),
(100, 'default', 'added', 195, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-06 04:08:05', '2020-11-06 04:08:05'),
(101, 'default', 'added', 196, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-06 18:07:02', '2020-11-06 18:07:02'),
(102, 'default', 'added', 197, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-07 00:02:05', '2020-11-07 00:02:05'),
(103, 'default', 'added', 198, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-07 00:34:23', '2020-11-07 00:34:23'),
(104, 'default', 'added', 199, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-07 04:14:46', '2020-11-07 04:14:46'),
(105, 'default', 'added', 200, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-08 00:21:28', '2020-11-08 00:21:28'),
(106, 'default', 'added', 201, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-08 22:06:35', '2020-11-08 22:06:35'),
(107, 'default', 'added', 202, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-09 00:09:06', '2020-11-09 00:09:06'),
(108, 'default', 'added', 203, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-09 22:22:04', '2020-11-09 22:22:04'),
(109, 'default', 'added', 204, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-10 23:58:39', '2020-11-10 23:58:39'),
(110, 'default', 'added', 205, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-11 00:38:35', '2020-11-11 00:38:35'),
(111, 'default', 'added', 206, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-11 03:11:00', '2020-11-11 03:11:00'),
(112, 'default', 'added', 207, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-12 21:41:11', '2020-11-12 21:41:11'),
(113, 'default', 'added', 208, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-13 02:05:25', '2020-11-13 02:05:25'),
(114, 'default', 'added', 209, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-13 02:08:05', '2020-11-13 02:08:05'),
(115, 'default', 'added', 210, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-13 23:18:05', '2020-11-13 23:18:05'),
(116, 'default', 'added', 211, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-13 23:22:27', '2020-11-13 23:22:27'),
(117, 'default', 'added', 212, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 01:20:55', '2020-11-14 01:20:55'),
(118, 'default', 'added', 213, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 01:21:49', '2020-11-14 01:21:49'),
(119, 'default', 'added', 214, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 01:32:00', '2020-11-14 01:32:00'),
(120, 'default', 'added', 215, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 03:39:30', '2020-11-14 03:39:30'),
(121, 'default', 'added', 216, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 03:40:53', '2020-11-14 03:40:53'),
(122, 'default', 'added', 217, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 03:42:03', '2020-11-14 03:42:03'),
(123, 'default', 'added', 218, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 03:44:13', '2020-11-14 03:44:13'),
(124, 'default', 'added', 219, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 03:44:51', '2020-11-14 03:44:51'),
(125, 'default', 'added', 220, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 03:46:43', '2020-11-14 03:46:43'),
(126, 'default', 'added', 221, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 04:01:15', '2020-11-14 04:01:15'),
(127, 'default', 'added', 222, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 04:15:34', '2020-11-14 04:15:34'),
(128, 'default', 'added', 223, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 04:21:43', '2020-11-14 04:21:43'),
(129, 'default', 'added', 224, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 04:24:50', '2020-11-14 04:24:50'),
(130, 'default', 'added', 225, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-14 04:27:10', '2020-11-14 04:27:10'),
(131, 'default', 'added', 226, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-17 00:43:20', '2020-11-17 00:43:20'),
(132, 'default', 'added', 227, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-17 00:55:01', '2020-11-17 00:55:01'),
(133, 'default', 'added', 228, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-17 00:55:51', '2020-11-17 00:55:51'),
(134, 'default', 'added', 229, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-17 02:23:23', '2020-11-17 02:23:23'),
(135, 'default', 'added', 230, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-17 02:30:38', '2020-11-17 02:30:38'),
(136, 'default', 'added', 231, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-17 02:32:03', '2020-11-17 02:32:03'),
(137, 'default', 'added', 232, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-17 03:55:52', '2020-11-17 03:55:52'),
(138, 'default', 'added', 238, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-18 13:20:42', '2020-11-18 13:20:42'),
(139, 'default', 'added', 239, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-20 22:01:08', '2020-11-20 22:01:08'),
(140, 'default', 'added', 240, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-21 01:37:35', '2020-11-21 01:37:35'),
(141, 'default', 'added', 241, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-21 23:35:08', '2020-11-21 23:35:08'),
(142, 'default', 'added', 242, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-23 01:09:14', '2020-11-23 01:09:14'),
(143, 'default', 'added', 243, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-23 16:51:36', '2020-11-23 16:51:36'),
(144, 'default', 'added', 244, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-23 17:31:57', '2020-11-23 17:31:57'),
(145, 'default', 'added', 245, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-23 22:49:16', '2020-11-23 22:49:16'),
(146, 'default', 'added', 246, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-24 02:21:25', '2020-11-24 02:21:25'),
(147, 'default', 'added', 247, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-24 02:22:16', '2020-11-24 02:22:16'),
(148, 'default', 'added', 248, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-24 03:11:08', '2020-11-24 03:11:08'),
(149, 'default', 'added', 249, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-24 17:03:09', '2020-11-24 17:03:09'),
(150, 'default', 'added', 250, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-25 03:01:31', '2020-11-25 03:01:31'),
(151, 'default', 'added', 251, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-25 22:14:37', '2020-11-25 22:14:37'),
(152, 'default', 'added', 252, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-26 00:09:29', '2020-11-26 00:09:29'),
(153, 'default', 'added', 253, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-26 01:11:53', '2020-11-26 01:11:53'),
(154, 'default', 'added', 254, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-26 01:15:42', '2020-11-26 01:15:42'),
(155, 'default', 'added', 255, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-26 02:45:22', '2020-11-26 02:45:22'),
(156, 'default', 'added', 256, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-26 02:46:57', '2020-11-26 02:46:57'),
(157, 'default', 'added', 257, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-26 22:21:34', '2020-11-26 22:21:34'),
(158, 'default', 'added', 258, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-27 01:04:24', '2020-11-27 01:04:24'),
(159, 'default', 'added', 259, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-27 21:40:57', '2020-11-27 21:40:57'),
(160, 'default', 'added', 260, 'App\\Transaction', 2, 'App\\User', '[]', '2020-11-27 21:48:36', '2020-11-27 21:48:36');

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

--
-- Table structure for table `barcodes`
--

CREATE TABLE `barcodes` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `width` double(22,4) DEFAULT NULL,
  `height` double(22,4) DEFAULT NULL,
  `paper_width` double(22,4) DEFAULT NULL,
  `paper_height` double(22,4) DEFAULT NULL,
  `top_margin` double(22,4) DEFAULT NULL,
  `left_margin` double(22,4) DEFAULT NULL,
  `row_distance` double(22,4) DEFAULT NULL,
  `col_distance` double(22,4) DEFAULT NULL,
  `stickers_in_one_row` int(11) DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_continuous` tinyint(1) NOT NULL DEFAULT 0,
  `stickers_in_one_sheet` int(11) DEFAULT NULL,
  `business_id` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `barcodes`
--

INSERT INTO `barcodes` (`id`, `name`, `description`, `width`, `height`, `paper_width`, `paper_height`, `top_margin`, `left_margin`, `row_distance`, `col_distance`, `stickers_in_one_row`, `is_default`, `is_continuous`, `stickers_in_one_sheet`, `business_id`, `created_at`, `updated_at`) VALUES
(1, '20 Labels per Sheet - (8.5\" x 11\")', 'Sheet Size: 8.5\" x 11\"\\r\\nLabel Size: 4\" x 1\"\\r\\nLabels per sheet: 20', 3.7500, 1.0000, 8.5000, 11.0000, 0.5000, 0.5000, 0.0000, 0.1562, 2, 0, 0, 20, NULL, '2017-12-18 11:13:44', '2017-12-18 11:13:44'),
(2, '30 Labels per sheet - (8.5\" x 11\")', 'Sheet Size: 8.5\" x 11\"\\r\\nLabel Size: 2.625\" x 1\"\\r\\nLabels per sheet: 30', 2.6250, 1.0000, 8.5000, 11.0000, 0.5000, 0.2198, 0.0000, 0.1400, 3, 0, 0, 30, NULL, '2017-12-18 11:04:39', '2017-12-18 11:10:40'),
(3, '32 Labels per sheet - (8.5\" x 11\")', 'Sheet Size: 8.5\" x 11\"\\r\\nLabel Size: 2\" x 1.25\"\\r\\nLabels per sheet: 32', 2.0000, 1.2500, 8.5000, 11.0000, 0.5000, 0.2500, 0.0000, 0.0000, 4, 0, 0, 32, NULL, '2017-12-18 10:55:40', '2017-12-18 10:55:40'),
(4, '40 Labels per sheet - (8.5\" x 11\")', 'Sheet Size: 8.5\" x 11\"\\r\\nLabel Size: 2\" x 1\"\\r\\nLabels per sheet: 40', 2.0000, 1.0000, 8.5000, 11.0000, 0.5000, 0.2500, 0.0000, 0.0000, 4, 0, 0, 40, NULL, '2017-12-18 10:58:40', '2017-12-18 10:58:40'),
(5, '50 Labels per Sheet - (8.5\" x 11\")', 'Sheet Size: 8.5\" x 11\"\\r\\nLabel Size: 1.5\" x 1\"\\r\\nLabels per sheet: 50', 1.5000, 1.0000, 8.5000, 11.0000, 0.5000, 0.5000, 0.0000, 0.0000, 5, 0, 0, 50, NULL, '2017-12-18 10:51:10', '2017-12-18 10:51:10'),
(6, 'Continuous Rolls - 31.75mm x 25.4mm', 'Label Size: 31.75mm x 25.4mm\\r\\nGap: 3.18mm', 1.2500, 1.0000, 1.2500, 0.0000, 0.1250, 0.0000, 0.1250, 0.0000, 1, 0, 1, NULL, NULL, '2017-12-18 10:51:10', '2017-12-18 10:51:10');

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

--
-- Table structure for table `bookings`
--

CREATE TABLE `bookings` (
  `id` int(10) UNSIGNED NOT NULL,
  `contact_id` int(10) UNSIGNED NOT NULL,
  `waiter_id` int(10) UNSIGNED DEFAULT NULL,
  `table_id` int(10) UNSIGNED DEFAULT NULL,
  `correspondent_id` int(11) DEFAULT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `location_id` int(10) UNSIGNED NOT NULL,
  `booking_start` datetime NOT NULL,
  `booking_end` datetime NOT NULL,
  `created_by` int(10) UNSIGNED NOT NULL,
  `booking_status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `booking_note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `brands`
--

CREATE TABLE `brands` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` int(10) UNSIGNED NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `business`
--

CREATE TABLE `business` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency_id` int(10) UNSIGNED NOT NULL,
  `start_date` date DEFAULT NULL,
  `tax_number_1` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_label_1` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_number_2` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_label_2` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `default_sales_tax` int(10) UNSIGNED DEFAULT NULL,
  `default_profit_percent` double(5,2) NOT NULL DEFAULT 0.00,
  `owner_id` int(10) UNSIGNED NOT NULL,
  `time_zone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Asia/Kolkata',
  `fy_start_month` tinyint(4) NOT NULL DEFAULT 1,
  `accounting_method` enum('fifo','lifo','avco') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fifo',
  `default_sales_discount` decimal(5,2) DEFAULT NULL,
  `sell_price_tax` enum('includes','excludes') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'includes',
  `logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sku_prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enable_product_expiry` tinyint(1) NOT NULL DEFAULT 0,
  `expiry_type` enum('add_expiry','add_manufacturing') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'add_expiry',
  `on_product_expiry` enum('keep_selling','stop_selling','auto_delete') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'keep_selling',
  `stop_selling_before` int(11) NOT NULL COMMENT 'Stop selling expied item n days before expiry',
  `enable_tooltip` tinyint(1) NOT NULL DEFAULT 1,
  `purchase_in_diff_currency` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Allow purchase to be in different currency then the business currency',
  `purchase_currency_id` int(10) UNSIGNED DEFAULT NULL,
  `p_exchange_rate` decimal(20,3) NOT NULL DEFAULT 1.000,
  `transaction_edit_days` int(10) UNSIGNED NOT NULL DEFAULT 30,
  `stock_expiry_alert_days` int(10) UNSIGNED NOT NULL DEFAULT 30,
  `keyboard_shortcuts` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pos_settings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `weighing_scale_setting` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'used to store the configuration of weighing scale',
  `enable_brand` tinyint(1) NOT NULL DEFAULT 1,
  `enable_category` tinyint(1) NOT NULL DEFAULT 1,
  `enable_sub_category` tinyint(1) NOT NULL DEFAULT 1,
  `enable_price_tax` tinyint(1) NOT NULL DEFAULT 1,
  `enable_purchase_status` tinyint(1) DEFAULT 1,
  `enable_lot_number` tinyint(1) NOT NULL DEFAULT 0,
  `default_unit` int(11) DEFAULT NULL,
  `enable_sub_units` tinyint(1) NOT NULL DEFAULT 0,
  `enable_racks` tinyint(1) NOT NULL DEFAULT 0,
  `enable_row` tinyint(1) NOT NULL DEFAULT 0,
  `enable_position` tinyint(1) NOT NULL DEFAULT 0,
  `enable_editing_product_from_purchase` tinyint(1) NOT NULL DEFAULT 1,
  `sales_cmsn_agnt` enum('logged_in_user','user','cmsn_agnt') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `item_addition_method` tinyint(1) NOT NULL DEFAULT 1,
  `enable_inline_tax` tinyint(1) NOT NULL DEFAULT 1,
  `currency_symbol_placement` enum('before','after') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'before',
  `enabled_modules` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_format` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'm/d/Y',
  `time_format` enum('12','24') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '24',
  `ref_no_prefixes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `theme_color` char(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `enable_rp` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'rp is the short form of reward points',
  `rp_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'rp is the short form of reward points',
  `amount_for_unit_rp` decimal(22,4) NOT NULL DEFAULT 1.0000 COMMENT 'rp is the short form of reward points',
  `min_order_total_for_rp` decimal(22,4) NOT NULL DEFAULT 1.0000 COMMENT 'rp is the short form of reward points',
  `max_rp_per_order` int(11) DEFAULT NULL COMMENT 'rp is the short form of reward points',
  `redeem_amount_per_unit_rp` decimal(22,4) NOT NULL DEFAULT 1.0000 COMMENT 'rp is the short form of reward points',
  `min_order_total_for_redeem` decimal(22,4) NOT NULL DEFAULT 1.0000 COMMENT 'rp is the short form of reward points',
  `min_redeem_point` int(11) DEFAULT NULL COMMENT 'rp is the short form of reward points',
  `max_redeem_point` int(11) DEFAULT NULL COMMENT 'rp is the short form of reward points',
  `rp_expiry_period` int(11) DEFAULT NULL COMMENT 'rp is the short form of reward points',
  `rp_expiry_type` enum('month','year') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'year' COMMENT 'rp is the short form of reward points',
  `email_settings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sms_settings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_labels` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `common_settings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `business`
--

INSERT INTO `business` (`id`, `name`, `currency_id`, `start_date`, `tax_number_1`, `tax_label_1`, `tax_number_2`, `tax_label_2`, `default_sales_tax`, `default_profit_percent`, `owner_id`, `time_zone`, `fy_start_month`, `accounting_method`, `default_sales_discount`, `sell_price_tax`, `logo`, `sku_prefix`, `enable_product_expiry`, `expiry_type`, `on_product_expiry`, `stop_selling_before`, `enable_tooltip`, `purchase_in_diff_currency`, `purchase_currency_id`, `p_exchange_rate`, `transaction_edit_days`, `stock_expiry_alert_days`, `keyboard_shortcuts`, `pos_settings`, `weighing_scale_setting`, `enable_brand`, `enable_category`, `enable_sub_category`, `enable_price_tax`, `enable_purchase_status`, `enable_lot_number`, `default_unit`, `enable_sub_units`, `enable_racks`, `enable_row`, `enable_position`, `enable_editing_product_from_purchase`, `sales_cmsn_agnt`, `item_addition_method`, `enable_inline_tax`, `currency_symbol_placement`, `enabled_modules`, `date_format`, `time_format`, `ref_no_prefixes`, `theme_color`, `created_by`, `enable_rp`, `rp_name`, `amount_for_unit_rp`, `min_order_total_for_rp`, `max_rp_per_order`, `redeem_amount_per_unit_rp`, `min_order_total_for_redeem`, `min_redeem_point`, `max_redeem_point`, `rp_expiry_period`, `rp_expiry_type`, `email_settings`, `sms_settings`, `custom_labels`, `common_settings`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'محل العقدة', 97, '2020-10-06', NULL, NULL, NULL, NULL, NULL, 0.00, 1, 'Asia/Qatar', 1, 'fifo', 0.00, 'includes', '1602925696_okda.png', NULL, 0, 'add_manufacturing', 'stop_selling', 10, 1, 0, NULL, 1.000, 30, 30, '{\"pos\":{\"express_checkout\":\"shift+e\",\"pay_n_ckeckout\":\"shift+p\",\"draft\":\"shift+d\",\"cancel\":\"shift+c\",\"recent_product_quantity\":\"f2\",\"weighing_scale\":null,\"edit_discount\":\"shift+i\",\"edit_order_tax\":\"shift+t\",\"add_payment_row\":\"shift+r\",\"finalize_payment\":\"shift+f\",\"add_new_product\":\"f4\"}}', '{\"amount_rounding_method\":null,\"disable_draft\":\"1\",\"disable_order_tax\":\"1\",\"is_pos_subtotal_editable\":\"1\",\"disable_credit_sale_button\":\"1\",\"disable_pay_checkout\":0,\"disable_express_checkout\":0,\"hide_product_suggestion\":0,\"hide_recent_trans\":0,\"disable_discount\":0}', '{\"label_prefix\":null,\"product_sku_length\":\"4\",\"qty_length\":\"3\",\"qty_length_decimal\":\"2\"}', 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, NULL, 1, 0, 'before', '[\"purchases\",\"add_sale\",\"pos_sale\",\"stock_transfers\",\"stock_adjustment\",\"expenses\"]', 'm/d/Y', '24', '{\"purchase\":\"PO\",\"purchase_return\":null,\"stock_transfer\":\"ST\",\"stock_adjustment\":\"SA\",\"sell_return\":\"CN\",\"expense\":\"EP\",\"contacts\":\"CO\",\"purchase_payment\":\"PP\",\"sell_payment\":\"SP\",\"expense_payment\":null,\"business_location\":\"BL\",\"username\":null,\"subscription\":null,\"draft\":null}', NULL, NULL, 0, NULL, 1.0000, 1.0000, NULL, 1.0000, 1.0000, NULL, NULL, NULL, 'year', '{\"mail_driver\":\"smtp\",\"mail_host\":\"premium63.web-hosting.com\",\"mail_port\":\"465\",\"mail_username\":\"info@bdigital.website\",\"mail_password\":\"94147926\\/*-Mb\",\"mail_encryption\":\"SSL\",\"mail_from_address\":\"info@bdigital.website\",\"mail_from_name\":\"Malak al mahames\"}', '{\"sms_service\":\"other\",\"nexmo_key\":null,\"nexmo_secret\":null,\"nexmo_from\":null,\"twilio_sid\":null,\"twilio_token\":null,\"twilio_from\":null,\"url\":null,\"send_to_param_name\":\"to\",\"msg_param_name\":\"text\",\"request_method\":\"post\",\"param_1\":null,\"param_val_1\":null,\"param_2\":null,\"param_val_2\":null,\"param_3\":null,\"param_val_3\":null,\"param_4\":null,\"param_val_4\":null,\"param_5\":null,\"param_val_5\":null,\"param_6\":null,\"param_val_6\":null,\"param_7\":null,\"param_val_7\":null,\"param_8\":null,\"param_val_8\":null,\"param_9\":null,\"param_val_9\":null,\"param_10\":null,\"param_val_10\":null}', '{\"payments\":{\"custom_pay_1\":null,\"custom_pay_2\":null,\"custom_pay_3\":null},\"contact\":{\"custom_field_1\":null,\"custom_field_2\":null,\"custom_field_3\":null,\"custom_field_4\":null},\"product\":{\"custom_field_1\":null,\"custom_field_2\":null,\"custom_field_3\":null,\"custom_field_4\":null},\"location\":{\"custom_field_1\":null,\"custom_field_2\":null,\"custom_field_3\":null,\"custom_field_4\":null},\"user\":{\"custom_field_1\":null,\"custom_field_2\":null,\"custom_field_3\":null,\"custom_field_4\":null},\"purchase\":{\"custom_field_1\":null,\"custom_field_2\":null,\"custom_field_3\":null,\"custom_field_4\":null},\"sell\":{\"custom_field_1\":null,\"custom_field_2\":null,\"custom_field_3\":null,\"custom_field_4\":null},\"types_of_service\":{\"custom_field_1\":null,\"custom_field_2\":null,\"custom_field_3\":null,\"custom_field_4\":null}}', '{\"default_datatable_page_entries\":\"25\"}', 1, '2020-10-07 03:13:47', '2020-11-18 05:19:41');

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

--
-- Table structure for table `business_locations`
--

CREATE TABLE `business_locations` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `location_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL,
  `landmark` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `state` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `city` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `zip_code` char(7) COLLATE utf8mb4_unicode_ci NOT NULL,
  `invoice_scheme_id` int(10) UNSIGNED NOT NULL,
  `invoice_layout_id` int(10) UNSIGNED NOT NULL,
  `sale_invoice_layout_id` int(11) DEFAULT NULL,
  `selling_price_group_id` int(11) DEFAULT NULL,
  `print_receipt_on_invoice` tinyint(1) DEFAULT 1,
  `receipt_printer_type` enum('browser','printer') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'browser',
  `printer_id` int(11) DEFAULT NULL,
  `mobile` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `alternate_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `website` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `featured_products` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `default_payment_accounts` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `business_locations`
--

INSERT INTO `business_locations` (`id`, `business_id`, `location_id`, `name`, `landmark`, `country`, `state`, `city`, `zip_code`, `invoice_scheme_id`, `invoice_layout_id`, `sale_invoice_layout_id`, `selling_price_group_id`, `print_receipt_on_invoice`, `receipt_printer_type`, `printer_id`, `mobile`, `alternate_number`, `email`, `website`, `featured_products`, `is_active`, `default_payment_accounts`, `custom_field1`, `custom_field2`, `custom_field3`, `custom_field4`, `deleted_at`, `created_at`, `updated_at`) VALUES
(3, 1, 'BL0003', 'محل العقدة', 'Doha', 'Qatar', 'Doha', 'Doha', '2020', 1, 1, 1, NULL, 1, 'browser', NULL, '50635395', '50635395', 'archivetunisia@gmail.com', NULL, NULL, 1, '{\"cash\":{\"is_enabled\":\"1\"},\"card\":{\"is_enabled\":\"1\"},\"cheque\":{\"is_enabled\":\"1\"},\"bank_transfer\":{\"is_enabled\":\"1\"}}', NULL, NULL, NULL, NULL, NULL, '2020-10-17 17:02:45', '2020-11-25 05:23:55');

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

--
-- Table structure for table `cash_registers`
--

CREATE TABLE `cash_registers` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `location_id` int(11) DEFAULT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `status` enum('close','open') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',
  `closed_at` datetime DEFAULT NULL,
  `closing_amount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `total_card_slips` int(11) NOT NULL DEFAULT 0,
  `total_cheques` int(11) NOT NULL DEFAULT 0,
  `closing_note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cash_registers`
--

INSERT INTO `cash_registers` (`id`, `business_id`, `location_id`, `user_id`, `status`, `closed_at`, `closing_amount`, `total_card_slips`, `total_cheques`, `closing_note`, `created_at`, `updated_at`) VALUES
(7, 1, 3, 2, 'close', '2020-10-17 19:26:33', 0.0000, 0, 0, NULL, '2020-10-17 23:17:00', '2020-10-17 23:26:33'),
(8, 1, 3, 2, 'close', '2020-10-18 23:26:39', 0.0000, 0, 0, NULL, '2020-10-17 23:27:00', '2020-10-19 03:26:39'),
(9, 1, 3, 2, 'close', '2020-10-19 23:25:52', 538.0400, 0, 0, NULL, '2020-10-19 16:01:00', '2020-10-20 03:25:52'),
(10, 1, 3, 2, 'close', '2020-10-20 23:22:13', 538.0000, 0, 0, NULL, '2020-10-20 14:42:00', '2020-10-21 03:22:13'),
(11, 1, 3, 2, 'close', '2020-10-21 23:01:45', 538.0000, 0, 0, NULL, '2020-10-21 14:00:00', '2020-10-22 03:01:45'),
(12, 1, 3, 2, 'close', '2020-10-22 23:00:23', 545.0000, 0, 0, NULL, '2020-10-22 14:27:00', '2020-10-23 03:00:23'),
(13, 1, 3, 2, 'close', '2020-10-23 23:18:59', 1233.0000, 0, 0, NULL, '2020-10-23 20:54:00', '2020-10-24 03:18:59'),
(14, 1, 3, 2, 'close', '2020-10-23 23:18:59', 1233.0000, 0, 0, NULL, '2020-10-23 20:55:00', '2020-10-24 03:18:59'),
(15, 1, 3, 2, 'close', '2020-10-24 23:56:32', 618.0000, 0, 0, NULL, '2020-10-24 14:40:00', '2020-10-25 03:56:32'),
(16, 1, 3, 2, 'close', '2020-10-25 23:46:21', 1068.0000, 0, 0, NULL, '2020-10-25 14:08:00', '2020-10-26 03:46:21'),
(17, 1, 3, 2, 'close', '2020-10-26 23:57:56', 1068.0000, 0, 0, NULL, '2020-10-26 14:43:00', '2020-10-27 03:57:56'),
(18, 1, 3, 2, 'close', '2020-10-27 23:34:51', 1183.0000, 0, 0, NULL, '2020-10-27 14:30:00', '2020-10-28 03:34:51'),
(19, 1, 3, 2, 'close', '2020-10-28 23:38:21', 1273.0000, 0, 0, NULL, '2020-10-28 14:14:00', '2020-10-29 03:38:21'),
(20, 1, 3, 2, 'close', '2020-10-29 23:36:57', 1328.0000, 0, 0, NULL, '2020-10-29 20:57:00', '2020-10-30 03:36:57'),
(21, 1, 3, 2, 'close', '2020-10-30 23:22:30', 1338.0000, 0, 0, NULL, '2020-10-30 16:56:00', '2020-10-31 03:22:30'),
(22, 1, 3, 2, 'close', '2020-10-31 23:37:20', 1383.0000, 0, 0, NULL, '2020-10-31 14:01:00', '2020-11-01 03:37:20'),
(23, 1, 3, 2, 'close', '2020-11-01 22:37:11', 1383.0000, 0, 0, NULL, '2020-11-01 15:13:00', '2020-11-02 03:37:11'),
(24, 1, 3, 2, 'close', '2020-11-03 23:37:11', 1494.0000, 0, 0, NULL, '2020-11-02 14:58:00', '2020-11-04 04:37:11'),
(25, 1, 3, 2, 'close', '2020-11-04 23:10:18', 1494.0000, 0, 0, NULL, '2020-11-04 15:04:00', '2020-11-05 04:10:18'),
(26, 1, 3, 2, 'close', '2020-11-05 23:24:43', 1597.0000, 0, 0, NULL, '2020-11-05 14:52:00', '2020-11-06 04:24:43'),
(27, 1, 3, 2, 'close', '2020-11-06 23:55:03', 1897.0000, 0, 0, NULL, '2020-11-06 18:01:00', '2020-11-07 04:55:03'),
(28, 1, 3, 2, 'close', '2020-11-07 23:28:58', 1907.0000, 0, 0, NULL, '2020-11-07 15:08:00', '2020-11-08 04:28:58'),
(29, 1, 3, 2, 'close', '2020-11-08 23:26:08', 1917.0000, 0, 0, NULL, '2020-11-08 14:58:00', '2020-11-09 04:26:08'),
(30, 1, 3, 2, 'close', '2020-11-09 23:15:44', 1947.0000, 0, 0, NULL, '2020-11-09 14:31:00', '2020-11-10 04:15:44'),
(31, 1, 3, 2, 'close', '2020-11-10 23:26:13', 2041.0000, 0, 0, NULL, '2020-11-10 14:43:00', '2020-11-11 04:26:13'),
(32, 1, 3, 2, 'close', '2020-11-11 23:45:53', 2041.0000, 0, 0, NULL, '2020-11-11 14:35:00', '2020-11-12 04:45:53'),
(33, 1, 3, 2, 'close', '2020-11-12 23:09:21', 2131.0000, 0, 0, NULL, '2020-11-12 14:51:00', '2020-11-13 04:09:21'),
(34, 1, 3, 2, 'close', '2020-11-13 23:30:05', 2342.0000, 0, 0, NULL, '2020-11-13 16:00:00', '2020-11-14 04:30:05'),
(35, 1, 3, 2, 'close', '2020-11-13 23:45:39', 0.0000, 0, 0, NULL, '2020-11-14 04:45:00', '2020-11-14 04:45:39'),
(36, 1, 3, 2, 'close', '2020-11-13 23:59:44', 0.0000, 0, 0, NULL, '2020-11-14 04:59:00', '2020-11-14 04:59:44'),
(37, 1, 3, 2, 'close', '2020-11-14 23:16:54', 2342.0000, 0, 0, NULL, '2020-11-14 14:43:00', '2020-11-15 04:16:54'),
(38, 1, 3, 2, 'close', '2020-11-15 23:19:38', 4684.0000, 0, 0, NULL, '2020-11-15 14:29:00', '2020-11-16 04:19:38'),
(39, 1, 3, 2, 'close', '2020-11-15 23:19:38', 4684.0000, 0, 0, NULL, '2020-11-15 14:30:00', '2020-11-16 04:19:38'),
(40, 1, 3, 2, 'close', '2020-11-16 23:37:28', 2426.0000, 0, 0, NULL, '2020-11-16 14:24:00', '2020-11-17 04:37:28'),
(41, 1, 3, 2, 'close', '2020-11-17 23:41:49', 2426.0000, 0, 0, NULL, '2020-11-17 14:10:00', '2020-11-18 04:41:49'),
(42, 1, 3, 2, 'close', '2020-11-18 22:47:39', 2426.0000, 0, 0, NULL, '2020-11-18 13:20:00', '2020-11-19 03:47:39'),
(43, 1, 3, 2, 'close', '2020-11-19 21:43:55', 2426.0000, 0, 0, NULL, '2020-11-19 13:47:00', '2020-11-20 02:43:55'),
(44, 1, 3, 2, 'close', '2020-11-20 22:09:02', 2448.0000, 0, 0, NULL, '2020-11-20 16:55:00', '2020-11-21 03:09:02'),
(45, 1, 3, 2, 'close', '2020-11-21 22:09:42', 2538.0000, 0, 0, NULL, '2020-11-21 13:12:00', '2020-11-22 03:09:42'),
(46, 1, 3, 2, 'close', '2020-11-22 22:26:59', 2678.0000, 0, 0, NULL, '2020-11-22 13:38:00', '2020-11-23 03:26:59'),
(47, 1, 3, 2, 'close', '2020-11-23 22:33:34', 3232.0000, 0, 0, NULL, '2020-11-23 13:34:00', '2020-11-24 03:33:34'),
(48, 1, 3, 2, 'close', '2020-11-24 22:06:59', 3317.0000, 0, 0, NULL, '2020-11-24 13:26:00', '2020-11-25 03:06:59'),
(49, 1, 3, 2, 'close', '2020-11-25 22:31:34', 3638.0000, 0, 0, NULL, '2020-11-25 13:33:00', '2020-11-26 03:31:34'),
(50, 1, 3, 2, 'close', '2020-11-26 22:04:56', 3838.0000, 0, 0, NULL, '2020-11-26 13:22:00', '2020-11-27 03:04:56'),
(51, 1, 3, 2, 'close', '2020-11-27 22:07:14', 4038.0000, 0, 0, NULL, '2020-11-27 20:29:00', '2020-11-28 03:07:14'),
(52, 1, 3, 2, 'open', NULL, 0.0000, 0, 0, NULL, '2020-11-28 13:48:00', '2020-11-28 13:48:31');

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

--
-- Table structure for table `cash_register_transactions`
--

CREATE TABLE `cash_register_transactions` (
  `id` int(10) UNSIGNED NOT NULL,
  `cash_register_id` int(10) UNSIGNED NOT NULL,
  `amount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `pay_method` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` enum('debit','credit') COLLATE utf8mb4_unicode_ci NOT NULL,
  `transaction_type` enum('initial','sell','transfer','refund') COLLATE utf8mb4_unicode_ci NOT NULL,
  `transaction_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cash_register_transactions`
--

INSERT INTO `cash_register_transactions` (`id`, `cash_register_id`, `amount`, `pay_method`, `type`, `transaction_type`, `transaction_id`, `created_at`, `updated_at`) VALUES
(21, 4, 500.0000, 'cash', 'credit', 'initial', NULL, '2020-10-11 21:55:13', '2020-10-11 21:55:13'),
(137, 9, 120.0000, 'cash', 'credit', 'sell', 161, '2020-10-19 16:28:09', '2020-10-19 16:28:09'),
(138, 9, 0.0000, 'cash', 'credit', 'sell', 161, '2020-10-19 16:28:09', '2020-10-19 16:28:09'),
(139, 9, 145.0000, 'cash', 'credit', 'sell', 162, '2020-10-19 16:31:38', '2020-10-19 16:31:38'),
(140, 9, 0.0000, 'cash', 'credit', 'sell', 162, '2020-10-19 16:31:38', '2020-10-19 16:31:38'),
(141, 9, 50.0000, 'cash', 'credit', 'sell', 163, '2020-10-19 16:33:48', '2020-10-19 16:33:48'),
(142, 9, 0.0000, 'cash', 'credit', 'sell', 163, '2020-10-19 16:33:48', '2020-10-19 16:33:48'),
(143, 9, 60.0000, 'cash', 'credit', 'sell', 164, '2020-10-19 16:34:59', '2020-10-19 16:34:59'),
(144, 9, 0.0000, 'cash', 'credit', 'sell', 164, '2020-10-19 16:34:59', '2020-10-19 16:34:59'),
(145, 9, 28.0000, 'cash', 'credit', 'sell', 165, '2020-10-19 16:37:23', '2020-10-19 16:37:23'),
(146, 9, 0.0000, 'cash', 'credit', 'sell', 165, '2020-10-19 16:37:23', '2020-10-19 16:37:23'),
(147, 9, 10.0000, 'cash', 'credit', 'sell', 166, '2020-10-19 16:38:44', '2020-10-19 16:38:44'),
(148, 9, 0.0000, 'cash', 'credit', 'sell', 166, '2020-10-19 16:38:44', '2020-10-19 16:38:44'),
(149, 10, 538.0000, 'cash', 'credit', 'initial', NULL, '2020-10-20 14:42:56', '2020-10-20 14:42:56'),
(150, 11, 538.0000, 'cash', 'credit', 'initial', NULL, '2020-10-21 14:00:30', '2020-10-21 14:00:30'),
(151, 12, 538.0000, 'cash', 'credit', 'initial', NULL, '2020-10-22 14:27:31', '2020-10-22 14:27:31'),
(152, 12, 7.0000, 'cash', 'credit', 'sell', 168, '2020-10-23 00:24:00', '2020-10-23 00:24:00'),
(153, 12, 0.0000, 'cash', 'credit', 'sell', 168, '2020-10-23 00:24:00', '2020-10-23 00:24:00'),
(154, 13, 545.0000, 'cash', 'credit', 'initial', NULL, '2020-10-23 20:54:37', '2020-10-23 20:54:37'),
(155, 14, 545.0000, 'cash', 'credit', 'initial', NULL, '2020-10-23 20:55:20', '2020-10-23 20:55:20'),
(156, 13, 10.0000, 'cash', 'credit', 'sell', 169, '2020-10-23 20:56:09', '2020-10-23 20:56:09'),
(157, 13, 0.0000, 'cash', 'credit', 'sell', 169, '2020-10-23 20:56:09', '2020-10-23 20:56:09'),
(158, 13, 8.0000, 'cash', 'credit', 'sell', 170, '2020-10-23 21:10:10', '2020-10-23 21:10:10'),
(159, 13, 0.0000, 'cash', 'credit', 'sell', 170, '2020-10-23 21:10:10', '2020-10-23 21:10:10'),
(162, 13, 80.0000, 'cash', 'credit', 'sell', 173, '2020-10-23 22:50:43', '2020-10-23 22:50:43'),
(163, 13, 0.0000, 'cash', 'credit', 'sell', 173, '2020-10-23 22:50:43', '2020-10-23 22:50:43'),
(164, 13, 15.0000, 'cash', 'credit', 'sell', 174, '2020-10-23 22:59:21', '2020-10-23 22:59:21'),
(165, 13, 0.0000, 'cash', 'credit', 'sell', 174, '2020-10-23 22:59:21', '2020-10-23 22:59:21'),
(166, 13, 15.0000, 'cash', 'credit', 'sell', 175, '2020-10-23 23:01:52', '2020-10-23 23:01:52'),
(167, 13, 0.0000, 'cash', 'credit', 'sell', 175, '2020-10-23 23:01:52', '2020-10-23 23:01:52'),
(168, 13, 15.0000, 'cash', 'credit', 'sell', 176, '2020-10-23 23:02:22', '2020-10-23 23:02:22'),
(169, 13, 0.0000, 'cash', 'credit', 'sell', 176, '2020-10-23 23:02:22', '2020-10-23 23:02:22'),
(170, 15, 563.0000, 'cash', 'credit', 'initial', NULL, '2020-10-24 14:40:12', '2020-10-24 14:40:12'),
(171, 15, 55.0000, 'cash', 'credit', 'sell', 177, '2020-10-24 22:21:36', '2020-10-24 22:21:36'),
(172, 15, 0.0000, 'cash', 'credit', 'sell', 177, '2020-10-24 22:21:36', '2020-10-24 22:21:36'),
(173, 16, 618.0000, 'cash', 'credit', 'initial', NULL, '2020-10-25 14:08:53', '2020-10-25 14:08:53'),
(174, 16, 450.0000, 'cash', 'credit', 'sell', 178, '2020-10-25 20:45:16', '2020-10-25 20:45:16'),
(175, 16, 0.0000, 'cash', 'credit', 'sell', 178, '2020-10-25 20:45:16', '2020-10-25 20:45:16'),
(176, 17, 1068.0000, 'cash', 'credit', 'initial', NULL, '2020-10-26 14:43:22', '2020-10-26 14:43:22'),
(177, 18, 1068.0000, 'cash', 'credit', 'initial', NULL, '2020-10-27 14:30:23', '2020-10-27 14:30:23'),
(178, 18, 30.0000, 'cash', 'credit', 'sell', 179, '2020-10-28 00:15:40', '2020-10-28 00:15:40'),
(179, 18, 0.0000, 'cash', 'credit', 'sell', 179, '2020-10-28 00:15:40', '2020-10-28 00:15:40'),
(182, 18, 85.0000, 'cash', 'credit', 'sell', 181, '2020-10-28 02:42:07', '2020-10-28 02:42:07'),
(183, 18, 0.0000, 'cash', 'credit', 'sell', 181, '2020-10-28 02:42:07', '2020-10-28 02:42:07'),
(184, 19, 1183.0000, 'cash', 'credit', 'initial', NULL, '2020-10-28 14:14:58', '2020-10-28 14:14:58'),
(185, 19, 20.0000, 'cash', 'credit', 'sell', 182, '2020-10-29 00:01:46', '2020-10-29 00:01:46'),
(186, 19, 0.0000, 'cash', 'credit', 'sell', 182, '2020-10-29 00:01:46', '2020-10-29 00:01:46'),
(187, 19, 70.0000, 'cash', 'credit', 'sell', 183, '2020-10-29 02:38:58', '2020-10-29 02:38:58'),
(188, 19, 0.0000, 'cash', 'credit', 'sell', 183, '2020-10-29 02:38:58', '2020-10-29 02:38:58'),
(193, 20, 1273.0000, 'cash', 'credit', 'initial', NULL, '2020-10-29 20:57:02', '2020-10-29 20:57:02'),
(194, 20, 55.0000, 'cash', 'credit', 'sell', 186, '2020-10-30 01:22:29', '2020-10-30 01:22:29'),
(195, 20, 0.0000, 'cash', 'credit', 'sell', 186, '2020-10-30 01:22:29', '2020-10-30 01:22:29'),
(196, 21, 1328.0000, 'cash', 'credit', 'initial', NULL, '2020-10-30 16:56:00', '2020-10-30 16:56:00'),
(197, 21, 10.0000, 'cash', 'credit', 'sell', 187, '2020-10-31 03:15:01', '2020-10-31 03:15:01'),
(198, 21, 0.0000, 'cash', 'credit', 'sell', 187, '2020-10-31 03:15:01', '2020-10-31 03:15:01'),
(199, 22, 1338.0000, 'cash', 'credit', 'initial', NULL, '2020-10-31 14:01:02', '2020-10-31 14:01:02'),
(200, 22, 45.0000, 'cash', 'credit', 'sell', 188, '2020-11-01 02:44:15', '2020-11-01 02:44:15'),
(201, 22, 0.0000, 'cash', 'credit', 'sell', 188, '2020-11-01 02:44:15', '2020-11-01 02:44:15'),
(202, 23, 1383.0000, 'cash', 'credit', 'initial', NULL, '2020-11-01 15:13:04', '2020-11-01 15:13:04'),
(203, 24, 1383.0000, 'cash', 'credit', 'initial', NULL, '2020-11-02 14:58:19', '2020-11-02 14:58:19'),
(204, 24, 50.0000, 'cash', 'credit', 'sell', 189, '2020-11-03 21:59:21', '2020-11-03 21:59:21'),
(205, 24, 0.0000, 'cash', 'credit', 'sell', 189, '2020-11-03 21:59:21', '2020-11-03 21:59:21'),
(208, 24, 61.0000, 'cash', 'credit', 'sell', 191, '2020-11-03 23:45:04', '2020-11-03 23:45:04'),
(209, 24, 0.0000, 'cash', 'credit', 'sell', 191, '2020-11-03 23:45:04', '2020-11-03 23:45:04'),
(210, 25, 1494.0000, 'cash', 'credit', 'initial', NULL, '2020-11-04 15:04:12', '2020-11-04 15:04:12'),
(211, 26, 1494.0000, 'cash', 'credit', 'initial', NULL, '2020-11-05 14:52:42', '2020-11-05 14:52:42'),
(212, 26, 10.0000, 'cash', 'credit', 'sell', 192, '2020-11-05 14:55:25', '2020-11-05 14:55:25'),
(213, 26, 0.0000, 'cash', 'credit', 'sell', 192, '2020-11-05 14:55:25', '2020-11-05 14:55:25'),
(214, 26, 30.0000, 'cash', 'credit', 'sell', 193, '2020-11-06 03:55:05', '2020-11-06 03:55:05'),
(215, 26, 0.0000, 'cash', 'credit', 'sell', 193, '2020-11-06 03:55:05', '2020-11-06 03:55:05'),
(216, 26, 20.0000, 'cash', 'credit', 'sell', 194, '2020-11-06 03:56:29', '2020-11-06 03:56:29'),
(217, 26, 0.0000, 'cash', 'credit', 'sell', 194, '2020-11-06 03:56:29', '2020-11-06 03:56:29'),
(218, 26, 43.0000, 'cash', 'credit', 'sell', 195, '2020-11-06 04:08:00', '2020-11-06 04:08:00'),
(219, 26, 0.0000, 'cash', 'credit', 'sell', 195, '2020-11-06 04:08:00', '2020-11-06 04:08:00'),
(220, 27, 1597.0000, 'cash', 'credit', 'initial', NULL, '2020-11-06 18:01:22', '2020-11-06 18:01:22'),
(221, 27, 20.0000, 'cash', 'credit', 'sell', 196, '2020-11-06 18:06:56', '2020-11-06 18:06:56'),
(222, 27, 0.0000, 'cash', 'credit', 'sell', 196, '2020-11-06 18:06:56', '2020-11-06 18:06:56'),
(223, 27, 110.0000, 'cash', 'credit', 'sell', 197, '2020-11-07 00:01:59', '2020-11-07 00:01:59'),
(224, 27, 0.0000, 'cash', 'credit', 'sell', 197, '2020-11-07 00:01:59', '2020-11-07 00:01:59'),
(225, 27, 50.0000, 'cash', 'credit', 'sell', 198, '2020-11-07 00:34:18', '2020-11-07 00:34:18'),
(226, 27, 0.0000, 'cash', 'credit', 'sell', 198, '2020-11-07 00:34:18', '2020-11-07 00:34:18'),
(227, 27, 120.0000, 'cash', 'credit', 'sell', 199, '2020-11-07 04:14:37', '2020-11-07 04:14:37'),
(228, 27, 0.0000, 'cash', 'credit', 'sell', 199, '2020-11-07 04:14:37', '2020-11-07 04:14:37'),
(229, 28, 1897.0000, 'cash', 'credit', 'initial', NULL, '2020-11-07 15:08:54', '2020-11-07 15:08:54'),
(230, 28, 10.0000, 'cash', 'credit', 'sell', 200, '2020-11-08 00:21:22', '2020-11-08 00:21:22'),
(231, 28, 0.0000, 'cash', 'credit', 'sell', 200, '2020-11-08 00:21:22', '2020-11-08 00:21:22'),
(232, 29, 1907.0000, 'cash', 'credit', 'initial', NULL, '2020-11-08 14:58:43', '2020-11-08 14:58:43'),
(235, 29, 10.0000, 'cash', 'credit', 'sell', 202, '2020-11-09 00:09:01', '2020-11-09 00:09:01'),
(236, 29, 0.0000, 'cash', 'credit', 'sell', 202, '2020-11-09 00:09:01', '2020-11-09 00:09:01'),
(237, 30, 1917.0000, 'cash', 'credit', 'initial', NULL, '2020-11-09 14:31:21', '2020-11-09 14:31:21'),
(238, 30, 30.0000, 'cash', 'credit', 'sell', 203, '2020-11-09 22:21:58', '2020-11-09 22:21:58'),
(239, 30, 0.0000, 'cash', 'credit', 'sell', 203, '2020-11-09 22:21:58', '2020-11-09 22:21:58'),
(240, 31, 1947.0000, 'cash', 'credit', 'initial', NULL, '2020-11-10 14:43:56', '2020-11-10 14:43:56'),
(241, 31, 45.0000, 'cash', 'credit', 'sell', 204, '2020-11-10 23:58:34', '2020-11-10 23:58:34'),
(242, 31, 0.0000, 'cash', 'credit', 'sell', 204, '2020-11-10 23:58:34', '2020-11-10 23:58:34'),
(243, 31, 9.0000, 'cash', 'credit', 'sell', 205, '2020-11-11 00:38:31', '2020-11-11 00:38:31'),
(244, 31, 0.0000, 'cash', 'credit', 'sell', 205, '2020-11-11 00:38:31', '2020-11-11 00:38:31'),
(245, 31, 40.0000, 'cash', 'credit', 'sell', 206, '2020-11-11 03:10:55', '2020-11-11 03:10:55'),
(246, 31, 0.0000, 'cash', 'credit', 'sell', 206, '2020-11-11 03:10:55', '2020-11-11 03:10:55'),
(247, 32, 2041.0000, 'cash', 'credit', 'initial', NULL, '2020-11-11 14:35:34', '2020-11-11 14:35:34'),
(248, 33, 2041.0000, 'cash', 'credit', 'initial', NULL, '2020-11-12 14:51:26', '2020-11-12 14:51:26'),
(249, 33, 90.0000, 'cash', 'credit', 'sell', 207, '2020-11-12 21:41:06', '2020-11-12 21:41:06'),
(250, 33, 0.0000, 'cash', 'credit', 'sell', 207, '2020-11-12 21:41:06', '2020-11-12 21:41:06'),
(255, 34, 2131.0000, 'cash', 'credit', 'initial', NULL, '2020-11-13 16:00:23', '2020-11-13 16:00:23'),
(256, 34, 16.0000, 'cash', 'credit', 'sell', 210, '2020-11-13 23:18:00', '2020-11-13 23:18:00'),
(257, 34, 0.0000, 'cash', 'credit', 'sell', 210, '2020-11-13 23:18:00', '2020-11-13 23:18:00'),
(262, 34, 195.0000, 'cash', 'credit', 'sell', 213, '2020-11-14 01:21:43', '2020-11-14 01:21:43'),
(263, 34, 0.0000, 'cash', 'credit', 'sell', 213, '2020-11-14 01:21:43', '2020-11-14 01:21:43'),
(288, 37, 2342.0000, 'cash', 'credit', 'initial', NULL, '2020-11-14 14:43:47', '2020-11-14 14:43:47'),
(289, 38, 2342.0000, 'cash', 'credit', 'initial', NULL, '2020-11-15 14:29:51', '2020-11-15 14:29:51'),
(290, 39, 2342.0000, 'cash', 'credit', 'initial', NULL, '2020-11-15 14:30:45', '2020-11-15 14:30:45'),
(291, 40, 2342.0000, 'cash', 'credit', 'initial', NULL, '2020-11-16 14:24:05', '2020-11-16 14:24:05'),
(292, 40, 45.0000, 'cash', 'credit', 'sell', 226, '2020-11-17 00:43:14', '2020-11-17 00:43:14'),
(293, 40, 0.0000, 'cash', 'credit', 'sell', 226, '2020-11-17 00:43:14', '2020-11-17 00:43:14'),
(294, 40, 35.0000, 'cash', 'credit', 'sell', 231, '2020-11-17 02:31:54', '2020-11-17 02:31:54'),
(295, 40, 0.0000, 'cash', 'credit', 'sell', 231, '2020-11-17 02:31:54', '2020-11-17 02:31:54'),
(296, 40, 4.0000, 'cash', 'credit', 'sell', 232, '2020-11-17 03:55:46', '2020-11-17 03:55:46'),
(297, 40, 0.0000, 'cash', 'credit', 'sell', 232, '2020-11-17 03:55:46', '2020-11-17 03:55:46'),
(298, 41, 2426.0000, 'cash', 'credit', 'initial', NULL, '2020-11-17 14:10:13', '2020-11-17 14:10:13'),
(299, 42, 2426.0000, 'cash', 'credit', 'initial', NULL, '2020-11-18 13:20:19', '2020-11-18 13:20:19'),
(302, 43, 2426.0000, 'cash', 'credit', 'initial', NULL, '2020-11-19 13:47:57', '2020-11-19 13:47:57'),
(303, 44, 2426.0000, 'cash', 'credit', 'initial', NULL, '2020-11-20 16:55:09', '2020-11-20 16:55:09'),
(304, 44, 14.0000, 'cash', 'credit', 'sell', 239, '2020-11-20 22:01:01', '2020-11-20 22:01:01'),
(305, 44, 0.0000, 'cash', 'credit', 'sell', 239, '2020-11-20 22:01:01', '2020-11-20 22:01:01'),
(306, 44, 8.0000, 'cash', 'credit', 'sell', 240, '2020-11-21 01:37:26', '2020-11-21 01:37:26'),
(307, 44, 0.0000, 'cash', 'credit', 'sell', 240, '2020-11-21 01:37:26', '2020-11-21 01:37:26'),
(308, 45, 2448.0000, 'cash', 'credit', 'initial', NULL, '2020-11-21 13:12:22', '2020-11-21 13:12:22'),
(309, 45, 90.0000, 'cash', 'credit', 'sell', 241, '2020-11-21 23:35:02', '2020-11-21 23:35:02'),
(310, 45, 0.0000, 'cash', 'credit', 'sell', 241, '2020-11-21 23:35:02', '2020-11-21 23:35:02'),
(311, 46, 2538.0000, 'cash', 'credit', 'initial', NULL, '2020-11-22 13:38:38', '2020-11-22 13:38:38'),
(312, 46, 140.0000, 'cash', 'credit', 'sell', 242, '2020-11-23 01:09:09', '2020-11-23 01:09:09'),
(313, 46, 0.0000, 'cash', 'credit', 'sell', 242, '2020-11-23 01:09:09', '2020-11-23 01:09:09'),
(314, 47, 2678.0000, 'cash', 'credit', 'initial', NULL, '2020-11-23 13:34:26', '2020-11-23 13:34:26'),
(315, 47, 50.0000, 'cash', 'credit', 'sell', 243, '2020-11-23 16:51:31', '2020-11-23 16:51:31'),
(316, 47, 0.0000, 'cash', 'credit', 'sell', 243, '2020-11-23 16:51:31', '2020-11-23 16:51:31'),
(317, 47, 200.0000, 'cash', 'credit', 'sell', 244, '2020-11-23 17:31:51', '2020-11-23 17:31:51'),
(318, 47, 0.0000, 'cash', 'credit', 'sell', 244, '2020-11-23 17:31:51', '2020-11-23 17:31:51'),
(319, 47, 19.0000, 'cash', 'credit', 'sell', 245, '2020-11-23 22:49:11', '2020-11-23 22:49:11'),
(320, 47, 0.0000, 'cash', 'credit', 'sell', 245, '2020-11-23 22:49:11', '2020-11-23 22:49:11'),
(321, 47, 45.0000, 'cash', 'credit', 'sell', 246, '2020-11-24 02:21:20', '2020-11-24 02:21:20'),
(322, 47, 0.0000, 'cash', 'credit', 'sell', 246, '2020-11-24 02:21:20', '2020-11-24 02:21:20'),
(323, 47, 80.0000, 'cash', 'credit', 'sell', 247, '2020-11-24 02:22:11', '2020-11-24 02:22:11'),
(324, 47, 0.0000, 'cash', 'credit', 'sell', 247, '2020-11-24 02:22:11', '2020-11-24 02:22:11'),
(325, 47, 160.0000, 'cash', 'credit', 'sell', 248, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(326, 47, 0.0000, 'cash', 'credit', 'sell', 248, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(327, 48, 3232.0000, 'cash', 'credit', 'initial', NULL, '2020-11-24 13:26:48', '2020-11-24 13:26:48'),
(328, 48, 85.0000, 'cash', 'credit', 'sell', 249, '2020-11-24 17:03:04', '2020-11-24 17:03:04'),
(329, 48, 0.0000, 'cash', 'credit', 'sell', 249, '2020-11-24 17:03:04', '2020-11-24 17:03:04'),
(332, 49, 3317.0000, 'cash', 'credit', 'initial', NULL, '2020-11-25 13:33:54', '2020-11-25 13:33:54'),
(333, 49, 40.0000, 'cash', 'credit', 'sell', 251, '2020-11-25 22:14:33', '2020-11-25 22:14:33'),
(334, 49, 0.0000, 'cash', 'credit', 'sell', 251, '2020-11-25 22:14:33', '2020-11-25 22:14:33'),
(335, 49, 105.0000, 'cash', 'credit', 'sell', 252, '2020-11-26 00:09:24', '2020-11-26 00:09:24'),
(336, 49, 0.0000, 'cash', 'credit', 'sell', 252, '2020-11-26 00:09:24', '2020-11-26 00:09:24'),
(337, 49, 125.0000, 'cash', 'credit', 'sell', 253, '2020-11-26 01:11:47', '2020-11-26 01:11:47'),
(338, 49, 0.0000, 'cash', 'credit', 'sell', 253, '2020-11-26 01:11:47', '2020-11-26 01:11:47'),
(339, 49, 7.0000, 'cash', 'credit', 'sell', 254, '2020-11-26 01:15:35', '2020-11-26 01:15:35'),
(340, 49, 0.0000, 'cash', 'credit', 'sell', 254, '2020-11-26 01:15:35', '2020-11-26 01:15:35'),
(341, 49, 40.0000, 'cash', 'credit', 'sell', 255, '2020-11-26 02:45:18', '2020-11-26 02:45:18'),
(342, 49, 0.0000, 'cash', 'credit', 'sell', 255, '2020-11-26 02:45:18', '2020-11-26 02:45:18'),
(343, 49, 4.0000, 'cash', 'credit', 'sell', 256, '2020-11-26 02:46:52', '2020-11-26 02:46:52'),
(344, 49, 0.0000, 'cash', 'credit', 'sell', 256, '2020-11-26 02:46:52', '2020-11-26 02:46:52'),
(345, 50, 3638.0000, 'cash', 'credit', 'initial', NULL, '2020-11-26 13:22:43', '2020-11-26 13:22:43'),
(346, 50, 190.0000, 'cash', 'credit', 'sell', 257, '2020-11-26 22:21:25', '2020-11-26 22:21:25'),
(347, 50, 0.0000, 'cash', 'credit', 'sell', 257, '2020-11-26 22:21:25', '2020-11-26 22:21:25'),
(348, 50, 10.0000, 'cash', 'credit', 'sell', 258, '2020-11-27 01:04:19', '2020-11-27 01:04:19'),
(349, 50, 0.0000, 'cash', 'credit', 'sell', 258, '2020-11-27 01:04:19', '2020-11-27 01:04:19'),
(350, 51, 3838.0000, 'cash', 'credit', 'initial', NULL, '2020-11-27 20:29:37', '2020-11-27 20:29:37'),
(351, 51, 170.0000, 'cash', 'credit', 'sell', 259, '2020-11-27 21:40:52', '2020-11-27 21:40:52'),
(352, 51, 0.0000, 'cash', 'credit', 'sell', 259, '2020-11-27 21:40:52', '2020-11-27 21:40:52'),
(353, 51, 30.0000, 'cash', 'credit', 'sell', 260, '2020-11-27 21:48:32', '2020-11-27 21:48:32'),
(354, 51, 0.0000, 'cash', 'credit', 'sell', 260, '2020-11-27 21:48:32', '2020-11-27 21:48:32'),
(355, 52, 4038.0000, 'cash', 'credit', 'initial', NULL, '2020-11-28 13:48:31', '2020-11-28 13:48:31');

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

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

CREATE TABLE `categories` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `short_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_id` int(11) NOT NULL,
  `created_by` int(10) UNSIGNED NOT NULL,
  `category_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `slug` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `name`, `business_id`, `short_code`, `parent_id`, `created_by`, `category_type`, `description`, `slug`, `deleted_at`, `created_at`, `updated_at`) VALUES
(9, 'ملابس', 1, NULL, 0, 2, 'product', NULL, NULL, NULL, '2020-10-17 17:10:50', '2020-10-17 17:10:50'),
(10, 'عطور', 1, NULL, 0, 2, 'product', NULL, NULL, NULL, '2020-10-17 17:11:05', '2020-10-17 17:11:05');

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

--
-- Table structure for table `categorizables`
--

CREATE TABLE `categorizables` (
  `category_id` int(11) NOT NULL,
  `categorizable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `categorizable_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `contacts`
--

CREATE TABLE `contacts` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `supplier_business_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `middle_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `tax_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `city` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `state` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_line_1` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address_line_2` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `zip_code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `mobile` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `landline` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `alternate_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pay_term_number` int(11) DEFAULT NULL,
  `pay_term_type` enum('days','months') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `credit_limit` decimal(22,4) DEFAULT NULL,
  `created_by` int(10) UNSIGNED NOT NULL,
  `balance` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `total_rp` int(11) NOT NULL DEFAULT 0 COMMENT 'rp is the short form of reward points',
  `total_rp_used` int(11) NOT NULL DEFAULT 0 COMMENT 'rp is the short form of reward points',
  `total_rp_expired` int(11) NOT NULL DEFAULT 0 COMMENT 'rp is the short form of reward points',
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `shipping_address` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `position` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_group_id` int(11) DEFAULT NULL,
  `custom_field1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field5` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field6` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field7` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field8` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field9` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `custom_field10` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `contacts`
--

INSERT INTO `contacts` (`id`, `business_id`, `type`, `supplier_business_name`, `name`, `prefix`, `first_name`, `middle_name`, `last_name`, `email`, `contact_id`, `contact_status`, `tax_number`, `city`, `state`, `country`, `address_line_1`, `address_line_2`, `zip_code`, `dob`, `mobile`, `landline`, `alternate_number`, `pay_term_number`, `pay_term_type`, `credit_limit`, `created_by`, `balance`, `total_rp`, `total_rp_used`, `total_rp_expired`, `is_default`, `shipping_address`, `position`, `customer_group_id`, `custom_field1`, `custom_field2`, `custom_field3`, `custom_field4`, `custom_field5`, `custom_field6`, `custom_field7`, `custom_field8`, `custom_field9`, `custom_field10`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 1, 'customer', NULL, ' Al Ikda  ', NULL, 'Al Ikda', NULL, NULL, 'alikda@gmail.com', 'CO0001', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '50635395', NULL, NULL, NULL, NULL, 0.0000, 1, 0.0000, 0, 0, 0, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-10-07 03:13:48', '2020-10-17 23:17:29'),
(2, 1, 'customer', NULL, ' mohib  ', NULL, 'mohib', NULL, NULL, NULL, 'CO0002', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '77099645', NULL, NULL, NULL, NULL, NULL, 2, 0.0000, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-10-17 23:18:17', '2020-10-17 23:18:17');

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

--
-- Table structure for table `currencies`
--

CREATE TABLE `currencies` (
  `id` int(10) UNSIGNED NOT NULL,
  `country` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `code` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  `symbol` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
  `thousand_separator` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `decimal_separator` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `currencies`
--

INSERT INTO `currencies` (`id`, `country`, `currency`, `code`, `symbol`, `thousand_separator`, `decimal_separator`, `created_at`, `updated_at`) VALUES
(1, 'Albania', 'Leke', 'ALL', 'Lek', ',', '.', NULL, NULL),
(2, 'America', 'Dollars', 'USD', '$', ',', '.', NULL, NULL),
(3, 'Afghanistan', 'Afghanis', 'AF', '؋', ',', '.', NULL, NULL),
(4, 'Argentina', 'Pesos', 'ARS', '$', ',', '.', NULL, NULL),
(5, 'Aruba', 'Guilders', 'AWG', 'ƒ', ',', '.', NULL, NULL),
(6, 'Australia', 'Dollars', 'AUD', '$', ',', '.', NULL, NULL),
(7, 'Azerbaijan', 'New Manats', 'AZ', 'ман', ',', '.', NULL, NULL),
(8, 'Bahamas', 'Dollars', 'BSD', '$', ',', '.', NULL, NULL),
(9, 'Barbados', 'Dollars', 'BBD', '$', ',', '.', NULL, NULL),
(10, 'Belarus', 'Rubles', 'BYR', 'p.', ',', '.', NULL, NULL),
(11, 'Belgium', 'Euro', 'EUR', '€', ',', '.', NULL, NULL),
(12, 'Beliz', 'Dollars', 'BZD', 'BZ$', ',', '.', NULL, NULL),
(13, 'Bermuda', 'Dollars', 'BMD', '$', ',', '.', NULL, NULL),
(14, 'Bolivia', 'Bolivianos', 'BOB', '$b', ',', '.', NULL, NULL),
(15, 'Bosnia and Herzegovina', 'Convertible Marka', 'BAM', 'KM', ',', '.', NULL, NULL),
(16, 'Botswana', 'Pula\'s', 'BWP', 'P', ',', '.', NULL, NULL),
(17, 'Bulgaria', 'Leva', 'BG', 'лв', ',', '.', NULL, NULL),
(18, 'Brazil', 'Reais', 'BRL', 'R$', ',', '.', NULL, NULL),
(19, 'Britain [United Kingdom]', 'Pounds', 'GBP', '£', ',', '.', NULL, NULL),
(20, 'Brunei Darussalam', 'Dollars', 'BND', '$', ',', '.', NULL, NULL),
(21, 'Cambodia', 'Riels', 'KHR', '៛', ',', '.', NULL, NULL),
(22, 'Canada', 'Dollars', 'CAD', '$', ',', '.', NULL, NULL),
(23, 'Cayman Islands', 'Dollars', 'KYD', '$', ',', '.', NULL, NULL),
(24, 'Chile', 'Pesos', 'CLP', '$', ',', '.', NULL, NULL),
(25, 'China', 'Yuan Renminbi', 'CNY', '¥', ',', '.', NULL, NULL),
(26, 'Colombia', 'Pesos', 'COP', '$', ',', '.', NULL, NULL),
(27, 'Costa Rica', 'Colón', 'CRC', '₡', ',', '.', NULL, NULL),
(28, 'Croatia', 'Kuna', 'HRK', 'kn', ',', '.', NULL, NULL),
(29, 'Cuba', 'Pesos', 'CUP', '₱', ',', '.', NULL, NULL),
(30, 'Cyprus', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(31, 'Czech Republic', 'Koruny', 'CZK', 'Kč', ',', '.', NULL, NULL),
(32, 'Denmark', 'Kroner', 'DKK', 'kr', ',', '.', NULL, NULL),
(33, 'Dominican Republic', 'Pesos', 'DOP ', 'RD$', ',', '.', NULL, NULL),
(34, 'East Caribbean', 'Dollars', 'XCD', '$', ',', '.', NULL, NULL),
(35, 'Egypt', 'Pounds', 'EGP', '£', ',', '.', NULL, NULL),
(36, 'El Salvador', 'Colones', 'SVC', '$', ',', '.', NULL, NULL),
(37, 'England [United Kingdom]', 'Pounds', 'GBP', '£', ',', '.', NULL, NULL),
(38, 'Euro', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(39, 'Falkland Islands', 'Pounds', 'FKP', '£', ',', '.', NULL, NULL),
(40, 'Fiji', 'Dollars', 'FJD', '$', ',', '.', NULL, NULL),
(41, 'France', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(42, 'Ghana', 'Cedis', 'GHS', '¢', ',', '.', NULL, NULL),
(43, 'Gibraltar', 'Pounds', 'GIP', '£', ',', '.', NULL, NULL),
(44, 'Greece', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(45, 'Guatemala', 'Quetzales', 'GTQ', 'Q', ',', '.', NULL, NULL),
(46, 'Guernsey', 'Pounds', 'GGP', '£', ',', '.', NULL, NULL),
(47, 'Guyana', 'Dollars', 'GYD', '$', ',', '.', NULL, NULL),
(48, 'Holland [Netherlands]', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(49, 'Honduras', 'Lempiras', 'HNL', 'L', ',', '.', NULL, NULL),
(50, 'Hong Kong', 'Dollars', 'HKD', '$', ',', '.', NULL, NULL),
(51, 'Hungary', 'Forint', 'HUF', 'Ft', ',', '.', NULL, NULL),
(52, 'Iceland', 'Kronur', 'ISK', 'kr', ',', '.', NULL, NULL),
(53, 'India', 'Rupees', 'INR', '₹', ',', '.', NULL, NULL),
(54, 'Indonesia', 'Rupiahs', 'IDR', 'Rp', ',', '.', NULL, NULL),
(55, 'Iran', 'Rials', 'IRR', '﷼', ',', '.', NULL, NULL),
(56, 'Ireland', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(57, 'Isle of Man', 'Pounds', 'IMP', '£', ',', '.', NULL, NULL),
(58, 'Israel', 'New Shekels', 'ILS', '₪', ',', '.', NULL, NULL),
(59, 'Italy', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(60, 'Jamaica', 'Dollars', 'JMD', 'J$', ',', '.', NULL, NULL),
(61, 'Japan', 'Yen', 'JPY', '¥', ',', '.', NULL, NULL),
(62, 'Jersey', 'Pounds', 'JEP', '£', ',', '.', NULL, NULL),
(63, 'Kazakhstan', 'Tenge', 'KZT', 'лв', ',', '.', NULL, NULL),
(64, 'Korea [North]', 'Won', 'KPW', '₩', ',', '.', NULL, NULL),
(65, 'Korea [South]', 'Won', 'KRW', '₩', ',', '.', NULL, NULL),
(66, 'Kyrgyzstan', 'Soms', 'KGS', 'лв', ',', '.', NULL, NULL),
(67, 'Laos', 'Kips', 'LAK', '₭', ',', '.', NULL, NULL),
(68, 'Latvia', 'Lati', 'LVL', 'Ls', ',', '.', NULL, NULL),
(69, 'Lebanon', 'Pounds', 'LBP', '£', ',', '.', NULL, NULL),
(70, 'Liberia', 'Dollars', 'LRD', '$', ',', '.', NULL, NULL),
(71, 'Liechtenstein', 'Switzerland Francs', 'CHF', 'CHF', ',', '.', NULL, NULL),
(72, 'Lithuania', 'Litai', 'LTL', 'Lt', ',', '.', NULL, NULL),
(73, 'Luxembourg', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(74, 'Macedonia', 'Denars', 'MKD', 'ден', ',', '.', NULL, NULL),
(75, 'Malaysia', 'Ringgits', 'MYR', 'RM', ',', '.', NULL, NULL),
(76, 'Malta', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(77, 'Mauritius', 'Rupees', 'MUR', '₨', ',', '.', NULL, NULL),
(78, 'Mexico', 'Pesos', 'MXN', '$', ',', '.', NULL, NULL),
(79, 'Mongolia', 'Tugriks', 'MNT', '₮', ',', '.', NULL, NULL),
(80, 'Mozambique', 'Meticais', 'MZ', 'MT', ',', '.', NULL, NULL),
(81, 'Namibia', 'Dollars', 'NAD', '$', ',', '.', NULL, NULL),
(82, 'Nepal', 'Rupees', 'NPR', '₨', ',', '.', NULL, NULL),
(83, 'Netherlands Antilles', 'Guilders', 'ANG', 'ƒ', ',', '.', NULL, NULL),
(84, 'Netherlands', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(85, 'New Zealand', 'Dollars', 'NZD', '$', ',', '.', NULL, NULL),
(86, 'Nicaragua', 'Cordobas', 'NIO', 'C$', ',', '.', NULL, NULL),
(87, 'Nigeria', 'Nairas', 'NGN', '₦', ',', '.', NULL, NULL),
(88, 'North Korea', 'Won', 'KPW', '₩', ',', '.', NULL, NULL),
(89, 'Norway', 'Krone', 'NOK', 'kr', ',', '.', NULL, NULL),
(90, 'Oman', 'Rials', 'OMR', '﷼', ',', '.', NULL, NULL),
(91, 'Pakistan', 'Rupees', 'PKR', '₨', ',', '.', NULL, NULL),
(92, 'Panama', 'Balboa', 'PAB', 'B/.', ',', '.', NULL, NULL),
(93, 'Paraguay', 'Guarani', 'PYG', 'Gs', ',', '.', NULL, NULL),
(94, 'Peru', 'Nuevos Soles', 'PE', 'S/.', ',', '.', NULL, NULL),
(95, 'Philippines', 'Pesos', 'PHP', 'Php', ',', '.', NULL, NULL),
(96, 'Poland', 'Zlotych', 'PL', 'zł', ',', '.', NULL, NULL),
(97, 'Qatar', 'Rials', 'QAR', '﷼', ',', '.', NULL, NULL),
(98, 'Romania', 'New Lei', 'RO', 'lei', ',', '.', NULL, NULL),
(99, 'Russia', 'Rubles', 'RUB', 'руб', ',', '.', NULL, NULL),
(100, 'Saint Helena', 'Pounds', 'SHP', '£', ',', '.', NULL, NULL),
(101, 'Saudi Arabia', 'Riyals', 'SAR', '﷼', ',', '.', NULL, NULL),
(102, 'Serbia', 'Dinars', 'RSD', 'Дин.', ',', '.', NULL, NULL),
(103, 'Seychelles', 'Rupees', 'SCR', '₨', ',', '.', NULL, NULL),
(104, 'Singapore', 'Dollars', 'SGD', '$', ',', '.', NULL, NULL),
(105, 'Slovenia', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(106, 'Solomon Islands', 'Dollars', 'SBD', '$', ',', '.', NULL, NULL),
(107, 'Somalia', 'Shillings', 'SOS', 'S', ',', '.', NULL, NULL),
(108, 'South Africa', 'Rand', 'ZAR', 'R', ',', '.', NULL, NULL),
(109, 'South Korea', 'Won', 'KRW', '₩', ',', '.', NULL, NULL),
(110, 'Spain', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(111, 'Sri Lanka', 'Rupees', 'LKR', '₨', ',', '.', NULL, NULL),
(112, 'Sweden', 'Kronor', 'SEK', 'kr', ',', '.', NULL, NULL),
(113, 'Switzerland', 'Francs', 'CHF', 'CHF', ',', '.', NULL, NULL),
(114, 'Suriname', 'Dollars', 'SRD', '$', ',', '.', NULL, NULL),
(115, 'Syria', 'Pounds', 'SYP', '£', ',', '.', NULL, NULL),
(116, 'Taiwan', 'New Dollars', 'TWD', 'NT$', ',', '.', NULL, NULL),
(117, 'Thailand', 'Baht', 'THB', '฿', ',', '.', NULL, NULL),
(118, 'Trinidad and Tobago', 'Dollars', 'TTD', 'TT$', ',', '.', NULL, NULL),
(119, 'Turkey', 'Lira', 'TRY', 'TL', ',', '.', NULL, NULL),
(120, 'Turkey', 'Liras', 'TRL', '£', ',', '.', NULL, NULL),
(121, 'Tuvalu', 'Dollars', 'TVD', '$', ',', '.', NULL, NULL),
(122, 'Ukraine', 'Hryvnia', 'UAH', '₴', ',', '.', NULL, NULL),
(123, 'United Kingdom', 'Pounds', 'GBP', '£', ',', '.', NULL, NULL),
(124, 'United States of America', 'Dollars', 'USD', '$', ',', '.', NULL, NULL),
(125, 'Uruguay', 'Pesos', 'UYU', '$U', ',', '.', NULL, NULL),
(126, 'Uzbekistan', 'Sums', 'UZS', 'лв', ',', '.', NULL, NULL),
(127, 'Vatican City', 'Euro', 'EUR', '€', '.', ',', NULL, NULL),
(128, 'Venezuela', 'Bolivares Fuertes', 'VEF', 'Bs', ',', '.', NULL, NULL),
(129, 'Vietnam', 'Dong', 'VND', '₫', ',', '.', NULL, NULL),
(130, 'Yemen', 'Rials', 'YER', '﷼', ',', '.', NULL, NULL),
(131, 'Zimbabwe', 'Zimbabwe Dollars', 'ZWD', 'Z$', ',', '.', NULL, NULL),
(132, 'Iraq', 'Iraqi dinar', 'IQD', 'د.ع', ',', '.', NULL, NULL),
(133, 'Kenya', 'Kenyan shilling', 'KES', 'KSh', ',', '.', NULL, NULL),
(134, 'Bangladesh', 'Taka', 'BDT', '৳', ',', '.', NULL, NULL),
(135, 'Algerie', 'Algerian dinar', 'DZD', 'د.ج', ' ', '.', NULL, NULL),
(136, 'United Arab Emirates', 'United Arab Emirates dirham', 'AED', 'د.إ', ',', '.', NULL, NULL),
(137, 'Uganda', 'Uganda shillings', 'UGX', 'USh', ',', '.', NULL, NULL),
(138, 'Tanzania', 'Tanzanian shilling', 'TZS', 'TSh', ',', '.', NULL, NULL),
(139, 'Angola', 'Kwanza', 'AOA', 'Kz', ',', '.', NULL, NULL),
(140, 'Kuwait', 'Kuwaiti dinar', 'KWD', 'KD', ',', '.', NULL, NULL),
(141, 'Bahrain', 'Bahraini dinar', 'BHD', 'BD', ',', '.', NULL, NULL);

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

--
-- Table structure for table `customer_groups`
--

CREATE TABLE `customer_groups` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` double(5,2) NOT NULL,
  `created_by` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `dashboard_configurations`
--

CREATE TABLE `dashboard_configurations` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `created_by` int(11) NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `color` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `configuration` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `discounts` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int(11) NOT NULL,
  `brand_id` int(11) DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `location_id` int(11) DEFAULT NULL,
  `priority` int(11) DEFAULT NULL,
  `discount_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `discount_amount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `starts_at` datetime DEFAULT NULL,
  `ends_at` datetime DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `applicable_in_spg` tinyint(1) DEFAULT 0,
  `applicable_in_cg` tinyint(1) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `discount_variations`
--

CREATE TABLE `discount_variations` (
  `discount_id` int(11) NOT NULL,
  `variation_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `document_and_notes`
--

CREATE TABLE `document_and_notes` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(11) NOT NULL,
  `notable_id` int(11) NOT NULL,
  `notable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `heading` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_private` tinyint(1) NOT NULL DEFAULT 0,
  `created_by` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `expense_categories` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `code` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `group_sub_taxes`
--

CREATE TABLE `group_sub_taxes` (
  `group_tax_id` int(10) UNSIGNED NOT NULL,
  `tax_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `invoice_layouts`
--

CREATE TABLE `invoice_layouts` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `header_text` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_no_prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quotation_no_prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_heading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_heading_line1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_heading_line2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_heading_line3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_heading_line4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_heading_line5` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_heading_not_paid` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_heading_paid` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quotation_heading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_total_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `discount_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tax_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `round_off_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_due_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `paid_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_client_id` tinyint(1) NOT NULL DEFAULT 0,
  `client_id_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `client_tax_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_time_format` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_time` tinyint(1) NOT NULL DEFAULT 1,
  `show_brand` tinyint(1) NOT NULL DEFAULT 0,
  `show_sku` tinyint(1) NOT NULL DEFAULT 1,
  `show_cat_code` tinyint(1) NOT NULL DEFAULT 1,
  `show_expiry` tinyint(1) NOT NULL DEFAULT 0,
  `show_lot` tinyint(1) NOT NULL DEFAULT 0,
  `show_image` tinyint(1) NOT NULL DEFAULT 0,
  `show_sale_description` tinyint(1) NOT NULL DEFAULT 0,
  `sales_person_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_sales_person` tinyint(1) NOT NULL DEFAULT 0,
  `table_product_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `table_qty_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `table_unit_price_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `table_subtotal_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cat_code_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `logo` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_logo` tinyint(1) NOT NULL DEFAULT 0,
  `show_business_name` tinyint(1) NOT NULL DEFAULT 0,
  `show_location_name` tinyint(1) NOT NULL DEFAULT 1,
  `show_landmark` tinyint(1) NOT NULL DEFAULT 1,
  `show_city` tinyint(1) NOT NULL DEFAULT 1,
  `show_state` tinyint(1) NOT NULL DEFAULT 1,
  `show_zip_code` tinyint(1) NOT NULL DEFAULT 1,
  `show_country` tinyint(1) NOT NULL DEFAULT 1,
  `show_mobile_number` tinyint(1) NOT NULL DEFAULT 1,
  `show_alternate_number` tinyint(1) NOT NULL DEFAULT 0,
  `show_email` tinyint(1) NOT NULL DEFAULT 0,
  `show_tax_1` tinyint(1) NOT NULL DEFAULT 1,
  `show_tax_2` tinyint(1) NOT NULL DEFAULT 0,
  `show_barcode` tinyint(1) NOT NULL DEFAULT 0,
  `show_payments` tinyint(1) NOT NULL DEFAULT 0,
  `show_customer` tinyint(1) NOT NULL DEFAULT 0,
  `customer_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_reward_point` tinyint(1) NOT NULL DEFAULT 0,
  `highlight_color` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `footer_text` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `module_info` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `common_settings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `business_id` int(10) UNSIGNED NOT NULL,
  `design` varchar(190) COLLATE utf8mb4_unicode_ci DEFAULT 'classic',
  `cn_heading` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'cn = credit note',
  `cn_no_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cn_amount_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `table_tax_headings` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `show_previous_bal` tinyint(1) NOT NULL DEFAULT 0,
  `prev_bal_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `change_return_label` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_custom_fields` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_custom_fields` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `location_custom_fields` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invoice_layouts`
--

INSERT INTO `invoice_layouts` (`id`, `name`, `header_text`, `invoice_no_prefix`, `quotation_no_prefix`, `invoice_heading`, `sub_heading_line1`, `sub_heading_line2`, `sub_heading_line3`, `sub_heading_line4`, `sub_heading_line5`, `invoice_heading_not_paid`, `invoice_heading_paid`, `quotation_heading`, `sub_total_label`, `discount_label`, `tax_label`, `total_label`, `round_off_label`, `total_due_label`, `paid_label`, `show_client_id`, `client_id_label`, `client_tax_label`, `date_label`, `date_time_format`, `show_time`, `show_brand`, `show_sku`, `show_cat_code`, `show_expiry`, `show_lot`, `show_image`, `show_sale_description`, `sales_person_label`, `show_sales_person`, `table_product_label`, `table_qty_label`, `table_unit_price_label`, `table_subtotal_label`, `cat_code_label`, `logo`, `show_logo`, `show_business_name`, `show_location_name`, `show_landmark`, `show_city`, `show_state`, `show_zip_code`, `show_country`, `show_mobile_number`, `show_alternate_number`, `show_email`, `show_tax_1`, `show_tax_2`, `show_barcode`, `show_payments`, `show_customer`, `customer_label`, `show_reward_point`, `highlight_color`, `footer_text`, `module_info`, `common_settings`, `is_default`, `business_id`, `design`, `cn_heading`, `cn_no_label`, `cn_amount_label`, `table_tax_headings`, `show_previous_bal`, `prev_bal_label`, `change_return_label`, `product_custom_fields`, `contact_custom_fields`, `location_custom_fields`, `created_at`, `updated_at`) VALUES
(1, 'Default', NULL, 'Invoice No.', NULL, 'Invoice', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Subtotal', 'Discount', 'Tax', 'Total', NULL, 'Total Due', 'Total Paid', 0, NULL, NULL, 'Date', NULL, 1, 0, 1, 0, 0, 0, 0, 0, NULL, 0, 'Product', 'Quantity', 'Unit Price', 'Subtotal', NULL, '1602342896_malek.png', 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 'Customer', 0, '#000000', '<p style=\"text-align: center;\">شكرا لزيارتكم</p>', NULL, '{\"due_date_label\":null,\"total_quantity_label\":null}', 1, 1, 'slim', NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, '2020-10-07 03:13:48', '2020-10-13 19:02:57');

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

--
-- Table structure for table `invoice_schemes`
--

CREATE TABLE `invoice_schemes` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `scheme_type` enum('blank','year') COLLATE utf8mb4_unicode_ci NOT NULL,
  `prefix` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `start_number` int(11) DEFAULT NULL,
  `invoice_count` int(11) NOT NULL DEFAULT 0,
  `total_digits` int(11) DEFAULT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invoice_schemes`
--

INSERT INTO `invoice_schemes` (`id`, `business_id`, `name`, `scheme_type`, `prefix`, `start_number`, `invoice_count`, `total_digits`, `is_default`, `created_at`, `updated_at`) VALUES
(1, 1, 'Default', 'blank', '', 1, 151, 4, 1, '2020-10-07 03:13:48', '2020-11-27 21:48:32');

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

--
-- Table structure for table `media`
--

CREATE TABLE `media` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(11) NOT NULL,
  `file_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `uploaded_by` int(11) DEFAULT NULL,
  `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `media`
--

INSERT INTO `media` (`id`, `business_id`, `file_name`, `description`, `uploaded_by`, `model_type`, `model_id`, `created_at`, `updated_at`) VALUES
(1, 1, '1602007087_203753603_WhatsApp Image 2020-10-06 at 10.40.21 AM.jpeg', NULL, 1, 'App\\Variation', 1, '2020-10-07 01:58:07', '2020-10-07 01:58:07'),
(2, 1, '1602369163_1353740969_herary.jpg', NULL, 2, 'App\\Variation', 3, '2020-10-11 06:32:43', '2020-10-11 06:32:43'),
(3, 1, '1602420163_1889198842_herary.jpg', NULL, 2, 'App\\Variation', 4, '2020-10-11 20:42:43', '2020-10-11 20:42:43'),
(4, 1, '1602422238_233420563_herary.jpg', NULL, 2, 'App\\Variation', 5, '2020-10-11 21:17:18', '2020-10-11 21:17:18'),
(5, 1, '1602423052_367045104_herary.jpg', NULL, 2, 'App\\Variation', 6, '2020-10-11 21:30:52', '2020-10-11 21:30:52'),
(6, 1, '1602694188_1555080820_turkish coffe.jpg', NULL, 2, 'App\\Variation', 7, '2020-10-15 00:49:48', '2020-10-15 00:49:48'),
(7, 1, '1602694664_1622087179_turkish coffe.jpg', NULL, 2, 'App\\Variation', 8, '2020-10-15 00:57:44', '2020-10-15 00:57:44'),
(8, 1, '1602694859_1091852088_turkish coffe.jpg', NULL, 2, 'App\\Variation', 9, '2020-10-15 01:00:59', '2020-10-15 01:00:59'),
(9, 1, '1602697968_1696935165_فستق-تركي-مسموم-في-الأسواق-السورية..-والتاجر-المهرّب-إلى-القضاء.jpg', NULL, 2, 'App\\Variation', 10, '2020-10-15 01:52:48', '2020-10-15 01:52:48'),
(10, 1, '1602698318_172528715_فستق-تركي-مسموم-في-الأسواق-السورية..-والتاجر-المهرّب-إلى-القضاء.jpg', NULL, 2, 'App\\Variation', 11, '2020-10-15 01:58:38', '2020-10-15 01:58:38'),
(11, 1, '1602698793_1207801988_download.jpg', NULL, 2, 'App\\Variation', 12, '2020-10-15 02:06:33', '2020-10-15 02:06:33'),
(12, 1, '1602699557_362027912_cashew.jpg', NULL, 2, 'App\\Variation', 13, '2020-10-15 02:19:17', '2020-10-15 02:19:17'),
(13, 1, '1602699787_575977782_cashew salt.jpg', NULL, 2, 'App\\Variation', 14, '2020-10-15 02:23:07', '2020-10-15 02:23:07'),
(14, 1, '1602708627_997847350_unnamed.png', NULL, 2, 'App\\Variation', 15, '2020-10-15 04:50:27', '2020-10-15 04:50:27'),
(15, 1, '1602709356_1561831059_download (1).jpg', NULL, 2, 'App\\Variation', 16, '2020-10-15 05:02:36', '2020-10-15 05:02:36'),
(16, 1, '1602721102_155575788_whole-natural-detail_grande_b301c2a8-952a-4d17-8773-03d9a9817ebe.webp', NULL, 2, 'App\\Variation', 17, '2020-10-15 08:18:22', '2020-10-15 08:18:22'),
(17, 1, '1602721982_1899741168_salt almond.webp', NULL, 2, 'App\\Variation', 18, '2020-10-15 08:33:02', '2020-10-15 08:33:02'),
(18, 1, '1602722151_265700671_salt almond.webp', NULL, 2, 'App\\Variation', 19, '2020-10-15 08:35:51', '2020-10-15 08:35:51'),
(19, 1, '1602722760_2013311198_wallnuts.jpg', NULL, 2, 'App\\Variation', 20, '2020-10-15 08:46:00', '2020-10-15 08:46:00'),
(20, 1, '1602722962_1821508975_wallnuts chile.jpg', NULL, 2, 'App\\Variation', 21, '2020-10-15 08:49:22', '2020-10-15 08:49:22'),
(21, 1, '1602782562_1968336818_hab jordon.jpg', NULL, 2, 'App\\Variation', 22, '2020-10-16 01:22:42', '2020-10-16 01:22:42'),
(22, 1, '1602783839_1791101594_مصري.jpg', NULL, 2, 'App\\Variation', 23, '2020-10-16 01:43:59', '2020-10-16 01:43:59'),
(23, 1, '1602785475_1970272769_Egyptian-Salted-corn-product-img.jpg', NULL, 2, 'App\\Variation', 24, '2020-10-16 02:11:15', '2020-10-16 02:11:15'),
(24, 1, '1602785739_1210725921_Egyptian-Salted-corn-product-img.jpg', NULL, 2, 'App\\Variation', 25, '2020-10-16 02:15:39', '2020-10-16 02:15:39'),
(25, 1, '1602791500_645929467_turkish coffe.jpg', NULL, 2, 'App\\Variation', 26, '2020-10-16 03:51:40', '2020-10-16 03:51:40');

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2017_07_05_071953_create_currencies_table', 1),
(4, '2017_07_05_073658_create_business_table', 1),
(5, '2017_07_22_075923_add_business_id_users_table', 1),
(6, '2017_07_23_113209_create_brands_table', 1),
(7, '2017_07_26_083429_create_permission_tables', 1),
(8, '2017_07_26_110000_create_tax_rates_table', 1),
(9, '2017_07_26_122313_create_units_table', 1),
(10, '2017_07_27_075706_create_contacts_table', 1),
(11, '2017_08_04_071038_create_categories_table', 1),
(12, '2017_08_08_115903_create_products_table', 1),
(13, '2017_08_09_061616_create_variation_templates_table', 1),
(14, '2017_08_09_061638_create_variation_value_templates_table', 1),
(15, '2017_08_10_061146_create_product_variations_table', 1),
(16, '2017_08_10_061216_create_variations_table', 1),
(17, '2017_08_19_054827_create_transactions_table', 1),
(18, '2017_08_31_073533_create_purchase_lines_table', 1),
(19, '2017_10_15_064638_create_transaction_payments_table', 1),
(20, '2017_10_31_065621_add_default_sales_tax_to_business_table', 1),
(21, '2017_11_20_051930_create_table_group_sub_taxes', 1),
(22, '2017_11_20_063603_create_transaction_sell_lines', 1),
(23, '2017_11_21_064540_create_barcodes_table', 1),
(24, '2017_11_23_181237_create_invoice_schemes_table', 1),
(25, '2017_12_25_122822_create_business_locations_table', 1),
(26, '2017_12_25_160253_add_location_id_to_transactions_table', 1),
(27, '2017_12_25_163227_create_variation_location_details_table', 1),
(28, '2018_01_04_115627_create_sessions_table', 1),
(29, '2018_01_05_112817_create_invoice_layouts_table', 1),
(30, '2018_01_06_112303_add_invoice_scheme_id_and_invoice_layout_id_to_business_locations', 1),
(31, '2018_01_08_104124_create_expense_categories_table', 1),
(32, '2018_01_08_123327_modify_transactions_table_for_expenses', 1),
(33, '2018_01_09_111005_modify_payment_status_in_transactions_table', 1),
(34, '2018_01_09_111109_add_paid_on_column_to_transaction_payments_table', 1),
(35, '2018_01_25_172439_add_printer_related_fields_to_business_locations_table', 1),
(36, '2018_01_27_184322_create_printers_table', 1),
(37, '2018_01_30_181442_create_cash_registers_table', 1),
(38, '2018_01_31_125836_create_cash_register_transactions_table', 1),
(39, '2018_02_07_173326_modify_business_table', 1),
(40, '2018_02_08_105425_add_enable_product_expiry_column_to_business_table', 1),
(41, '2018_02_08_111027_add_expiry_period_and_expiry_period_type_columns_to_products_table', 1),
(42, '2018_02_08_131118_add_mfg_date_and_exp_date_purchase_lines_table', 1),
(43, '2018_02_08_155348_add_exchange_rate_to_transactions_table', 1),
(44, '2018_02_09_124945_modify_transaction_payments_table_for_contact_payments', 1),
(45, '2018_02_12_113640_create_transaction_sell_lines_purchase_lines_table', 1),
(46, '2018_02_12_114605_add_quantity_sold_in_purchase_lines_table', 1),
(47, '2018_02_13_183323_alter_decimal_fields_size', 1),
(48, '2018_02_14_161928_add_transaction_edit_days_to_business_table', 1),
(49, '2018_02_15_161032_add_document_column_to_transactions_table', 1),
(50, '2018_02_17_124709_add_more_options_to_invoice_layouts', 1),
(51, '2018_02_19_111517_add_keyboard_shortcut_column_to_business_table', 1),
(52, '2018_02_19_121537_stock_adjustment_move_to_transaction_table', 1),
(53, '2018_02_20_165505_add_is_direct_sale_column_to_transactions_table', 1),
(54, '2018_02_21_105329_create_system_table', 1),
(55, '2018_02_23_100549_version_1_2', 1),
(56, '2018_02_23_125648_add_enable_editing_sp_from_purchase_column_to_business_table', 1),
(57, '2018_02_26_103612_add_sales_commission_agent_column_to_business_table', 1),
(58, '2018_02_26_130519_modify_users_table_for_sales_cmmsn_agnt', 1),
(59, '2018_02_26_134500_add_commission_agent_to_transactions_table', 1),
(60, '2018_02_27_121422_add_item_addition_method_to_business_table', 1),
(61, '2018_02_27_170232_modify_transactions_table_for_stock_transfer', 1),
(62, '2018_03_05_153510_add_enable_inline_tax_column_to_business_table', 1),
(63, '2018_03_06_210206_modify_product_barcode_types', 1),
(64, '2018_03_13_181541_add_expiry_type_to_business_table', 1),
(65, '2018_03_16_113446_product_expiry_setting_for_business', 1),
(66, '2018_03_19_113601_add_business_settings_options', 1),
(67, '2018_03_26_125334_add_pos_settings_to_business_table', 1),
(68, '2018_03_26_165350_create_customer_groups_table', 1),
(69, '2018_03_27_122720_customer_group_related_changes_in_tables', 1),
(70, '2018_03_29_110138_change_tax_field_to_nullable_in_business_table', 1),
(71, '2018_03_29_115502_add_changes_for_sr_number_in_products_and_sale_lines_table', 1),
(72, '2018_03_29_134340_add_inline_discount_fields_in_purchase_lines', 1),
(73, '2018_03_31_140921_update_transactions_table_exchange_rate', 1),
(74, '2018_04_03_103037_add_contact_id_to_contacts_table', 1),
(75, '2018_04_03_122709_add_changes_to_invoice_layouts_table', 1),
(76, '2018_04_09_135320_change_exchage_rate_size_in_business_table', 1),
(77, '2018_04_17_123122_add_lot_number_to_business', 1),
(78, '2018_04_17_160845_add_product_racks_table', 1),
(79, '2018_04_20_182015_create_res_tables_table', 1),
(80, '2018_04_24_105246_restaurant_fields_in_transaction_table', 1),
(81, '2018_04_24_114149_add_enabled_modules_business_table', 1),
(82, '2018_04_24_133704_add_modules_fields_in_invoice_layout_table', 1),
(83, '2018_04_27_132653_quotation_related_change', 1),
(84, '2018_05_02_104439_add_date_format_and_time_format_to_business', 1),
(85, '2018_05_02_111939_add_sell_return_to_transaction_payments', 1),
(86, '2018_05_14_114027_add_rows_positions_for_products', 1),
(87, '2018_05_14_125223_add_weight_to_products_table', 1),
(88, '2018_05_14_164754_add_opening_stock_permission', 1),
(89, '2018_05_15_134729_add_design_to_invoice_layouts', 1),
(90, '2018_05_16_183307_add_tax_fields_invoice_layout', 1),
(91, '2018_05_18_191956_add_sell_return_to_transaction_table', 1),
(92, '2018_05_21_131349_add_custom_fileds_to_contacts_table', 1),
(93, '2018_05_21_131607_invoice_layout_fields_for_sell_return', 1),
(94, '2018_05_21_131949_add_custom_fileds_and_website_to_business_locations_table', 1),
(95, '2018_05_22_123527_create_reference_counts_table', 1),
(96, '2018_05_22_154540_add_ref_no_prefixes_column_to_business_table', 1),
(97, '2018_05_24_132620_add_ref_no_column_to_transaction_payments_table', 1),
(98, '2018_05_24_161026_add_location_id_column_to_business_location_table', 1),
(99, '2018_05_25_180603_create_modifiers_related_table', 1),
(100, '2018_05_29_121714_add_purchase_line_id_to_stock_adjustment_line_table', 1),
(101, '2018_05_31_114645_add_res_order_status_column_to_transactions_table', 1),
(102, '2018_06_05_103530_rename_purchase_line_id_in_stock_adjustment_lines_table', 1),
(103, '2018_06_05_111905_modify_products_table_for_modifiers', 1),
(104, '2018_06_06_110524_add_parent_sell_line_id_column_to_transaction_sell_lines_table', 1),
(105, '2018_06_07_152443_add_is_service_staff_to_roles_table', 1),
(106, '2018_06_07_182258_add_image_field_to_products_table', 1),
(107, '2018_06_13_133705_create_bookings_table', 1),
(108, '2018_06_15_173636_add_email_column_to_contacts_table', 1),
(109, '2018_06_27_182835_add_superadmin_related_fields_business', 1),
(110, '2018_07_10_101913_add_custom_fields_to_products_table', 1),
(111, '2018_07_17_103434_add_sales_person_name_label_to_invoice_layouts_table', 1),
(112, '2018_07_17_163920_add_theme_skin_color_column_to_business_table', 1),
(113, '2018_07_24_160319_add_lot_no_line_id_to_transaction_sell_lines_table', 1),
(114, '2018_07_25_110004_add_show_expiry_and_show_lot_colums_to_invoice_layouts_table', 1),
(115, '2018_07_25_172004_add_discount_columns_to_transaction_sell_lines_table', 1),
(116, '2018_07_26_124720_change_design_column_type_in_invoice_layouts_table', 1),
(117, '2018_07_26_170424_add_unit_price_before_discount_column_to_transaction_sell_line_table', 1),
(118, '2018_07_28_103614_add_credit_limit_column_to_contacts_table', 1),
(119, '2018_08_08_110755_add_new_payment_methods_to_transaction_payments_table', 1),
(120, '2018_08_08_122225_modify_cash_register_transactions_table_for_new_payment_methods', 1),
(121, '2018_08_14_104036_add_opening_balance_type_to_transactions_table', 1),
(122, '2018_09_04_155900_create_accounts_table', 1),
(123, '2018_09_06_114438_create_selling_price_groups_table', 1),
(124, '2018_09_06_154057_create_variation_group_prices_table', 1),
(125, '2018_09_07_102413_add_permission_to_access_default_selling_price', 1),
(126, '2018_09_07_134858_add_selling_price_group_id_to_transactions_table', 1),
(127, '2018_09_10_112448_update_product_type_to_single_if_null_in_products_table', 1),
(128, '2018_09_10_152703_create_account_transactions_table', 1),
(129, '2018_09_10_173656_add_account_id_column_to_transaction_payments_table', 1),
(130, '2018_09_19_123914_create_notification_templates_table', 1),
(131, '2018_09_22_110504_add_sms_and_email_settings_columns_to_business_table', 1),
(132, '2018_09_24_134942_add_lot_no_line_id_to_stock_adjustment_lines_table', 1),
(133, '2018_09_26_105557_add_transaction_payments_for_existing_expenses', 1),
(134, '2018_09_27_111609_modify_transactions_table_for_purchase_return', 1),
(135, '2018_09_27_131154_add_quantity_returned_column_to_purchase_lines_table', 1),
(136, '2018_10_02_131401_add_return_quantity_column_to_transaction_sell_lines_table', 1),
(137, '2018_10_03_104918_add_qty_returned_column_to_transaction_sell_lines_purchase_lines_table', 1),
(138, '2018_10_03_185947_add_default_notification_templates_to_database', 1),
(139, '2018_10_09_153105_add_business_id_to_transaction_payments_table', 1),
(140, '2018_10_16_135229_create_permission_for_sells_and_purchase', 1),
(141, '2018_10_22_114441_add_columns_for_variable_product_modifications', 1),
(142, '2018_10_22_134428_modify_variable_product_data', 1),
(143, '2018_10_30_181558_add_table_tax_headings_to_invoice_layout', 1),
(144, '2018_10_31_122619_add_pay_terms_field_transactions_table', 1),
(145, '2018_10_31_161328_add_new_permissions_for_pos_screen', 1),
(146, '2018_10_31_174752_add_access_selected_contacts_only_to_users_table', 1),
(147, '2018_10_31_175627_add_user_contact_access', 1),
(148, '2018_10_31_180559_add_auto_send_sms_column_to_notification_templates_table', 1),
(149, '2018_11_02_171949_change_card_type_column_to_varchar_in_transaction_payments_table', 1),
(150, '2018_11_08_105621_add_role_permissions', 1),
(151, '2018_11_26_114135_add_is_suspend_column_to_transactions_table', 1),
(152, '2018_11_28_104410_modify_units_table_for_multi_unit', 1),
(153, '2018_11_28_170952_add_sub_unit_id_to_purchase_lines_and_sell_lines', 1),
(154, '2018_11_29_115918_add_primary_key_in_system_table', 1),
(155, '2018_12_03_185546_add_product_description_column_to_products_table', 1),
(156, '2018_12_06_114937_modify_system_table_and_users_table', 1),
(157, '2018_12_13_160007_add_custom_fields_display_options_to_invoice_layouts_table', 1),
(158, '2018_12_14_103307_modify_system_table', 1),
(159, '2018_12_18_133837_add_prev_balance_due_columns_to_invoice_layouts_table', 1),
(160, '2018_12_18_170656_add_invoice_token_column_to_transaction_table', 1),
(161, '2018_12_20_133639_add_date_time_format_column_to_invoice_layouts_table', 1),
(162, '2018_12_21_120659_add_recurring_invoice_fields_to_transactions_table', 1),
(163, '2018_12_24_154933_create_notifications_table', 1),
(164, '2019_01_08_112015_add_document_column_to_transaction_payments_table', 1),
(165, '2019_01_10_124645_add_account_permission', 1),
(166, '2019_01_16_125825_add_subscription_no_column_to_transactions_table', 1),
(167, '2019_01_28_111647_add_order_addresses_column_to_transactions_table', 1),
(168, '2019_02_13_173821_add_is_inactive_column_to_products_table', 1),
(169, '2019_02_19_103118_create_discounts_table', 1),
(170, '2019_02_21_120324_add_discount_id_column_to_transaction_sell_lines_table', 1),
(171, '2019_02_21_134324_add_permission_for_discount', 1),
(172, '2019_03_04_170832_add_service_staff_columns_to_transaction_sell_lines_table', 1),
(173, '2019_03_09_102425_add_sub_type_column_to_transactions_table', 1),
(174, '2019_03_09_124457_add_indexing_transaction_sell_lines_purchase_lines_table', 1),
(175, '2019_03_12_120336_create_activity_log_table', 1),
(176, '2019_03_15_132925_create_media_table', 1),
(177, '2019_05_08_130339_add_indexing_to_parent_id_in_transaction_payments_table', 1),
(178, '2019_05_10_132311_add_missing_column_indexing', 1),
(179, '2019_05_14_091812_add_show_image_column_to_invoice_layouts_table', 1),
(180, '2019_05_25_104922_add_view_purchase_price_permission', 1),
(181, '2019_06_17_103515_add_profile_informations_columns_to_users_table', 1),
(182, '2019_06_18_135524_add_permission_to_view_own_sales_only', 1),
(183, '2019_06_19_112058_add_database_changes_for_reward_points', 1),
(184, '2019_06_28_133732_change_type_column_to_string_in_transactions_table', 1),
(185, '2019_07_13_111420_add_is_created_from_api_column_to_transactions_table', 1),
(186, '2019_07_15_165136_add_fields_for_combo_product', 1),
(187, '2019_07_19_103446_add_mfg_quantity_used_column_to_purchase_lines_table', 1),
(188, '2019_07_22_152649_add_not_for_selling_in_product_table', 1),
(189, '2019_07_29_185351_add_show_reward_point_column_to_invoice_layouts_table', 1),
(190, '2019_08_08_162302_add_sub_units_related_fields', 1),
(191, '2019_08_26_133419_update_price_fields_decimal_point', 1),
(192, '2019_09_02_160054_remove_location_permissions_from_roles', 1),
(193, '2019_09_03_185259_add_permission_for_pos_screen', 1),
(194, '2019_09_04_163141_add_location_id_to_cash_registers_table', 1),
(195, '2019_09_04_184008_create_types_of_services_table', 1),
(196, '2019_09_06_131445_add_types_of_service_fields_to_transactions_table', 1),
(197, '2019_09_09_134810_add_default_selling_price_group_id_column_to_business_locations_table', 1),
(198, '2019_09_12_105616_create_product_locations_table', 1),
(199, '2019_09_17_122522_add_custom_labels_column_to_business_table', 1),
(200, '2019_09_18_164319_add_shipping_fields_to_transactions_table', 1),
(201, '2019_09_19_170927_close_all_active_registers', 1),
(202, '2019_09_23_161906_add_media_description_cloumn_to_media_table', 1),
(203, '2019_10_18_155633_create_account_types_table', 1),
(204, '2019_10_22_163335_add_common_settings_column_to_business_table', 1),
(205, '2019_10_29_132521_add_update_purchase_status_permission', 1),
(206, '2019_11_09_110522_add_indexing_to_lot_number', 1),
(207, '2019_11_19_170824_add_is_active_column_to_business_locations_table', 1),
(208, '2019_11_21_162913_change_quantity_field_types_to_decimal', 1),
(209, '2019_11_25_160340_modify_categories_table_for_polymerphic_relationship', 1),
(210, '2019_12_02_105025_create_warranties_table', 1),
(211, '2019_12_03_180342_add_common_settings_field_to_invoice_layouts_table', 1),
(212, '2019_12_05_183955_add_more_fields_to_users_table', 1),
(213, '2019_12_06_174904_add_change_return_label_column_to_invoice_layouts_table', 1),
(214, '2019_12_11_121307_add_draft_and_quotation_list_permissions', 1),
(215, '2019_12_12_180126_copy_expense_total_to_total_before_tax', 1),
(216, '2019_12_19_181412_make_alert_quantity_field_nullable_on_products_table', 1),
(217, '2019_12_25_173413_create_dashboard_configurations_table', 1),
(218, '2020_01_08_133506_create_document_and_notes_table', 1),
(219, '2020_01_09_113252_add_cc_bcc_column_to_notification_templates_table', 1),
(220, '2020_01_16_174818_add_round_off_amount_field_to_transactions_table', 1),
(221, '2020_01_28_162345_add_weighing_scale_settings_in_business_settings_table', 1),
(222, '2020_02_18_172447_add_import_fields_to_transactions_table', 1),
(223, '2020_03_13_135844_add_is_active_column_to_selling_price_groups_table', 1),
(224, '2020_03_16_115449_add_contact_status_field_to_contacts_table', 1),
(225, '2020_03_26_124736_add_allow_login_column_in_users_table', 1),
(226, '2020_04_13_154150_add_feature_products_column_to_business_loactions', 1),
(227, '2020_04_15_151802_add_user_type_to_users_table', 1),
(228, '2020_04_22_153905_add_subscription_repeat_on_column_to_transactions_table', 1),
(229, '2020_04_28_111436_add_shipping_address_to_contacts_table', 1),
(230, '2020_06_01_094654_add_max_sale_discount_column_to_users_table', 1),
(231, '2020_06_12_162245_modify_contacts_table', 1),
(232, '2020_06_22_103104_change_recur_interval_default_to_one', 1),
(233, '2020_07_09_174621_add_balance_field_to_contacts_table', 1),
(234, '2020_07_23_104933_change_status_column_to_varchar_in_transaction_table', 1),
(235, '2020_09_07_171059_change_completed_stock_transfer_status_to_final', 1),
(236, '2016_06_01_000001_create_oauth_auth_codes_table', 2),
(237, '2016_06_01_000002_create_oauth_access_tokens_table', 2),
(238, '2016_06_01_000003_create_oauth_refresh_tokens_table', 2),
(239, '2016_06_01_000004_create_oauth_clients_table', 2),
(240, '2016_06_01_000005_create_oauth_personal_access_clients_table', 2),
(241, '2020_09_21_123224_modify_booking_status_column_in_bookings_table', 2),
(242, '2020_09_22_121639_create_discount_variations_table', 2),
(243, '2020_10_05_121550_modify_business_location_table_for_invoice_layout', 2),
(244, '2020_10_16_175726_set_status_as_received_for_opening_stock', 2),
(245, '2020_10_23_170823_add_for_group_tax_column_to_tax_rates_table', 2),
(246, '2020_11_04_130940_add_more_custom_fields_to_contacts_table', 2),
(247, '2020_11_10_152841_add_cash_register_permissions', 2),
(248, '2020_11_17_164041_modify_type_column_to_varchar_in_contacts_table', 2);

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

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` int(10) UNSIGNED NOT NULL,
  `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_permissions`
--

INSERT INTO `model_has_permissions` (`permission_id`, `model_type`, `model_id`) VALUES
(77, 'App\\User', 2),
(77, 'App\\User', 3);

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

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` int(10) UNSIGNED NOT NULL,
  `model_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(1, 'App\\User', 1),
(1, 'App\\User', 2),
(2, 'App\\User', 3);

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

--
-- Table structure for table `notifications`
--

CREATE TABLE `notifications` (
  `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `notifiable_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `notifiable_id` bigint(20) UNSIGNED NOT NULL,
  `data` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `read_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `notification_templates`
--

CREATE TABLE `notification_templates` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(11) NOT NULL,
  `template_for` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_body` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sms_body` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `subject` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cc` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bcc` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `auto_send` tinyint(1) NOT NULL DEFAULT 0,
  `auto_send_sms` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `notification_templates`
--

INSERT INTO `notification_templates` (`id`, `business_id`, `template_for`, `email_body`, `sms_body`, `subject`, `cc`, `bcc`, `auto_send`, `auto_send_sms`, `created_at`, `updated_at`) VALUES
(1, 1, 'new_sale', '<p>Dear {contact_name},</p>\r\n<p>Your invoice number is {invoice_number}<br />Total amount: {total_amount}<br />Paid amount: {received_amount}</p>\r\n<p>Invoice url : {invoice_url}</p>\r\n<p>Thank you for shopping with us.</p>\r\n<p>{business_logo}</p>\r\n<p>&nbsp;</p>', 'Dear {contact_name}, Thank you for shopping with us. {business_name}', 'Thank you from {business_name}', NULL, NULL, 1, 0, '2020-10-07 03:13:48', '2020-10-16 02:38:48'),
(2, 1, 'payment_received', '<p>Dear {contact_name},</p>\r\n<p>We have received a payment of {received_amount}</p>\r\n<p>{business_logo}</p>', 'Dear {contact_name}, We have received a payment of {received_amount}. {business_name}', 'Payment Received, from {business_name}', NULL, NULL, 0, 0, '2020-10-07 03:13:48', '2020-10-16 02:14:32'),
(3, 1, 'payment_reminder', '<p>Dear {contact_name},</p>\r\n<p>This is to remind you that you have pending payment of {due_amount}. Kindly pay it as soon as possible.</p>\r\n<p>{business_logo}</p>', 'Dear {contact_name}, You have pending payment of {due_amount}. Kindly pay it as soon as possible. {business_name}', 'Payment Reminder, from {business_name}', NULL, NULL, 0, 0, '2020-10-07 03:13:48', '2020-10-16 02:14:32'),
(4, 1, 'new_booking', '<p>Dear {contact_name},</p>\r\n<p>Your booking is confirmed</p>\r\n<p>Date: {start_time} to {end_time}</p>\r\n<p>Table: {table}</p>\r\n<p>Location: {location}</p>\r\n<p>{business_logo}</p>', 'Dear {contact_name}, Your booking is confirmed. Date: {start_time} to {end_time}, Table: {table}, Location: {location}', 'Booking Confirmed - {business_name}', NULL, NULL, 0, 0, '2020-10-07 03:13:48', '2020-10-16 02:14:32'),
(5, 1, 'new_order', '<p>Dear {contact_name},</p>\r\n<p>We have a new order with reference number {order_ref_number}. Kindly process the products as soon as possible.</p>\r\n<p>{business_name}<br />{business_logo}</p>', 'Dear {contact_name}, We have a new order with reference number {order_ref_number}. Kindly process the products as soon as possible. {business_name}', 'New Order, from {business_name}', NULL, NULL, 0, 0, '2020-10-07 03:13:48', '2020-10-16 02:14:32'),
(6, 1, 'payment_paid', '<p>Dear {contact_name},</p>\r\n<p>We have paid amount {paid_amount} again invoice number {order_ref_number}.<br />Kindly note it down.</p>\r\n<p>{business_name}<br />{business_logo}</p>', 'We have paid amount {paid_amount} again invoice number {order_ref_number}.\r\n                    Kindly note it down. {business_name}', 'Payment Paid, from {business_name}', NULL, NULL, 0, 0, '2020-10-07 03:13:48', '2020-10-16 02:14:32'),
(7, 1, 'items_received', '<p>Dear {contact_name},</p>\r\n<p>We have received all items from invoice reference number {order_ref_number}. Thank you for processing it.</p>\r\n<p>{business_name}<br />{business_logo}</p>', 'We have received all items from invoice reference number {order_ref_number}. Thank you for processing it. {business_name}', 'Items received, from {business_name}', NULL, NULL, 0, 0, '2020-10-07 03:13:48', '2020-10-16 02:14:32'),
(8, 1, 'items_pending', '<p>Dear {contact_name},<br />This is to remind you that we have not yet received some items from invoice reference number {order_ref_number}. Please process it as soon as possible.</p>\r\n<p>{business_name}<br />{business_logo}</p>', 'This is to remind you that we have not yet received some items from invoice reference number {order_ref_number} . Please process it as soon as possible.{business_name}', 'Items Pending, from {business_name}', NULL, NULL, 0, 0, '2020-10-07 03:13:48', '2020-10-16 02:14:32'),
(9, 1, 'send_ledger', NULL, NULL, NULL, NULL, NULL, 0, 0, '2020-10-16 02:14:32', '2020-10-16 02:14:32');

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

--
-- Table structure for table `oauth_auth_codes`
--

CREATE TABLE `oauth_auth_codes` (
  `id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `scopes` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `oauth_personal_access_clients`
--

CREATE TABLE `oauth_personal_access_clients` (
  `id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'profit_loss_report.view', 'web', '2020-10-07 03:11:17', NULL),
(2, 'direct_sell.access', 'web', '2020-10-07 03:11:17', NULL),
(3, 'product.opening_stock', 'web', '2020-10-07 03:11:19', '2020-10-07 03:11:19'),
(4, 'crud_all_bookings', 'web', '2020-10-07 03:11:20', '2020-10-07 03:11:20'),
(5, 'crud_own_bookings', 'web', '2020-10-07 03:11:20', '2020-10-07 03:11:20'),
(6, 'access_default_selling_price', 'web', '2020-10-07 03:11:20', '2020-10-07 03:11:20'),
(7, 'purchase.payments', 'web', '2020-10-07 03:11:21', '2020-10-07 03:11:21'),
(8, 'sell.payments', 'web', '2020-10-07 03:11:21', '2020-10-07 03:11:21'),
(9, 'edit_product_price_from_sale_screen', 'web', '2020-10-07 03:11:21', '2020-10-07 03:11:21'),
(10, 'edit_product_discount_from_sale_screen', 'web', '2020-10-07 03:11:21', '2020-10-07 03:11:21'),
(11, 'roles.view', 'web', '2020-10-07 03:11:21', '2020-10-07 03:11:21'),
(12, 'roles.create', 'web', '2020-10-07 03:11:21', '2020-10-07 03:11:21'),
(13, 'roles.update', 'web', '2020-10-07 03:11:21', '2020-10-07 03:11:21'),
(14, 'roles.delete', 'web', '2020-10-07 03:11:21', '2020-10-07 03:11:21'),
(15, 'account.access', 'web', '2020-10-07 03:11:21', '2020-10-07 03:11:21'),
(16, 'discount.access', 'web', '2020-10-07 03:11:22', '2020-10-07 03:11:22'),
(17, 'view_purchase_price', 'web', '2020-10-07 03:11:22', '2020-10-07 03:11:22'),
(18, 'view_own_sell_only', 'web', '2020-10-07 03:11:22', '2020-10-07 03:11:22'),
(19, 'edit_product_discount_from_pos_screen', 'web', '2020-10-07 03:11:22', '2020-10-07 03:11:22'),
(20, 'edit_product_price_from_pos_screen', 'web', '2020-10-07 03:11:23', '2020-10-07 03:11:23'),
(21, 'access_shipping', 'web', '2020-10-07 03:11:23', '2020-10-07 03:11:23'),
(22, 'purchase.update_status', 'web', '2020-10-07 03:11:23', '2020-10-07 03:11:23'),
(23, 'list_drafts', 'web', '2020-10-07 03:11:23', '2020-10-07 03:11:23'),
(24, 'list_quotations', 'web', '2020-10-07 03:11:23', '2020-10-07 03:11:23'),
(25, 'user.view', 'web', '2020-10-07 03:11:24', NULL),
(26, 'user.create', 'web', '2020-10-07 03:11:24', NULL),
(27, 'user.update', 'web', '2020-10-07 03:11:24', NULL),
(28, 'user.delete', 'web', '2020-10-07 03:11:24', NULL),
(29, 'supplier.view', 'web', '2020-10-07 03:11:24', NULL),
(30, 'supplier.create', 'web', '2020-10-07 03:11:24', NULL),
(31, 'supplier.update', 'web', '2020-10-07 03:11:24', NULL),
(32, 'supplier.delete', 'web', '2020-10-07 03:11:24', NULL),
(33, 'customer.view', 'web', '2020-10-07 03:11:24', NULL),
(34, 'customer.create', 'web', '2020-10-07 03:11:24', NULL),
(35, 'customer.update', 'web', '2020-10-07 03:11:24', NULL),
(36, 'customer.delete', 'web', '2020-10-07 03:11:24', NULL),
(37, 'product.view', 'web', '2020-10-07 03:11:24', NULL),
(38, 'product.create', 'web', '2020-10-07 03:11:24', NULL),
(39, 'product.update', 'web', '2020-10-07 03:11:24', NULL),
(40, 'product.delete', 'web', '2020-10-07 03:11:24', NULL),
(41, 'purchase.view', 'web', '2020-10-07 03:11:24', NULL),
(42, 'purchase.create', 'web', '2020-10-07 03:11:24', NULL),
(43, 'purchase.update', 'web', '2020-10-07 03:11:24', NULL),
(44, 'purchase.delete', 'web', '2020-10-07 03:11:24', NULL),
(45, 'sell.view', 'web', '2020-10-07 03:11:24', NULL),
(46, 'sell.create', 'web', '2020-10-07 03:11:24', NULL),
(47, 'sell.update', 'web', '2020-10-07 03:11:24', NULL),
(48, 'sell.delete', 'web', '2020-10-07 03:11:24', NULL),
(49, 'purchase_n_sell_report.view', 'web', '2020-10-07 03:11:24', NULL),
(50, 'contacts_report.view', 'web', '2020-10-07 03:11:24', NULL),
(51, 'stock_report.view', 'web', '2020-10-07 03:11:24', NULL),
(52, 'tax_report.view', 'web', '2020-10-07 03:11:24', NULL),
(53, 'trending_product_report.view', 'web', '2020-10-07 03:11:24', NULL),
(54, 'register_report.view', 'web', '2020-10-07 03:11:24', NULL),
(55, 'sales_representative.view', 'web', '2020-10-07 03:11:24', NULL),
(56, 'expense_report.view', 'web', '2020-10-07 03:11:24', NULL),
(57, 'business_settings.access', 'web', '2020-10-07 03:11:24', NULL),
(58, 'barcode_settings.access', 'web', '2020-10-07 03:11:24', NULL),
(59, 'invoice_settings.access', 'web', '2020-10-07 03:11:24', NULL),
(60, 'brand.view', 'web', '2020-10-07 03:11:24', NULL),
(61, 'brand.create', 'web', '2020-10-07 03:11:24', NULL),
(62, 'brand.update', 'web', '2020-10-07 03:11:24', NULL),
(63, 'brand.delete', 'web', '2020-10-07 03:11:24', NULL),
(64, 'tax_rate.view', 'web', '2020-10-07 03:11:24', NULL),
(65, 'tax_rate.create', 'web', '2020-10-07 03:11:24', NULL),
(66, 'tax_rate.update', 'web', '2020-10-07 03:11:24', NULL),
(67, 'tax_rate.delete', 'web', '2020-10-07 03:11:24', NULL),
(68, 'unit.view', 'web', '2020-10-07 03:11:24', NULL),
(69, 'unit.create', 'web', '2020-10-07 03:11:24', NULL),
(70, 'unit.update', 'web', '2020-10-07 03:11:24', NULL),
(71, 'unit.delete', 'web', '2020-10-07 03:11:24', NULL),
(72, 'category.view', 'web', '2020-10-07 03:11:24', NULL),
(73, 'category.create', 'web', '2020-10-07 03:11:24', NULL),
(74, 'category.update', 'web', '2020-10-07 03:11:24', NULL),
(75, 'category.delete', 'web', '2020-10-07 03:11:24', NULL),
(76, 'expense.access', 'web', '2020-10-07 03:11:24', NULL),
(77, 'access_all_locations', 'web', '2020-10-07 03:11:24', NULL),
(78, 'dashboard.data', 'web', '2020-10-07 03:11:24', NULL),
(79, 'location.1', 'web', '2020-10-07 03:13:48', '2020-10-07 03:13:48'),
(80, 'location.2', 'web', '2020-10-10 23:18:42', '2020-10-10 23:18:42'),
(81, 'location.3', 'web', '2020-10-17 17:02:45', '2020-10-17 17:02:45'),
(82, 'view_cash_register', 'web', '2020-11-25 05:23:56', '2020-11-25 05:23:56'),
(83, 'close_cash_register', 'web', '2020-11-25 05:23:56', '2020-11-25 05:23:56');

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

--
-- Table structure for table `printers`
--

CREATE TABLE `printers` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection_type` enum('network','windows','linux') COLLATE utf8mb4_unicode_ci NOT NULL,
  `capability_profile` enum('default','simple','SP2000','TEP-200M','P822D') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default',
  `char_per_line` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ip_address` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `port` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `path` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `type` enum('single','variable','modifier','combo') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `unit_id` int(11) UNSIGNED DEFAULT NULL,
  `sub_unit_ids` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `brand_id` int(10) UNSIGNED DEFAULT NULL,
  `category_id` int(10) UNSIGNED DEFAULT NULL,
  `sub_category_id` int(10) UNSIGNED DEFAULT NULL,
  `tax` int(10) UNSIGNED DEFAULT NULL,
  `tax_type` enum('inclusive','exclusive') COLLATE utf8mb4_unicode_ci NOT NULL,
  `enable_stock` tinyint(1) NOT NULL DEFAULT 0,
  `alert_quantity` decimal(22,4) DEFAULT NULL,
  `sku` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `barcode_type` enum('C39','C128','EAN13','EAN8','UPCA','UPCE') COLLATE utf8mb4_unicode_ci DEFAULT 'C128',
  `expiry_period` decimal(4,2) DEFAULT NULL,
  `expiry_period_type` enum('days','months') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enable_sr_no` tinyint(1) NOT NULL DEFAULT 0,
  `weight` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_custom_field1` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_custom_field2` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_custom_field3` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_custom_field4` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` int(10) UNSIGNED NOT NULL,
  `warranty_id` int(11) DEFAULT NULL,
  `is_inactive` tinyint(1) NOT NULL DEFAULT 0,
  `not_for_selling` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `name`, `business_id`, `type`, `unit_id`, `sub_unit_ids`, `brand_id`, `category_id`, `sub_category_id`, `tax`, `tax_type`, `enable_stock`, `alert_quantity`, `sku`, `barcode_type`, `expiry_period`, `expiry_period_type`, `enable_sr_no`, `weight`, `product_custom_field1`, `product_custom_field2`, `product_custom_field3`, `product_custom_field4`, `image`, `product_description`, `created_by`, `warranty_id`, `is_inactive`, `not_for_selling`, `created_at`, `updated_at`) VALUES
(36, 'ghotra rayhan neksha', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0036', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-17 20:53:25', '2020-10-22 01:22:55'),
(37, 'malaki sada', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0037', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-17 21:21:33', '2020-11-04 01:51:14'),
(38, 'malaki naksha', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0038', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-17 21:32:30', '2020-10-22 01:28:07'),
(39, 'jalabiya malki 1', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0039', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-17 21:47:03', '2020-10-18 00:32:39'),
(40, 'jalabiya malki v', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0040', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-17 21:56:45', '2020-10-24 23:35:21'),
(41, 'jalabiya malki v 2', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0041', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-17 22:00:44', '2020-10-24 23:42:49'),
(42, 'jalabiya malki 3', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0042', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-17 22:39:38', '2020-10-17 22:39:38'),
(43, 'jalbiya malki 4', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0043', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-17 23:42:59', '2020-10-25 00:08:59'),
(44, 'fanilla malaki r', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 50.0000, '0050', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 00:29:49', '2020-10-18 00:29:49'),
(45, 'fanila malki v', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0045', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 00:54:52', '2020-10-18 00:54:52'),
(46, 'fanila vest malki', 1, 'single', 1, NULL, NULL, NULL, NULL, NULL, 'exclusive', 1, 5.0000, '0046', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 01:01:03', '2020-10-18 01:01:03'),
(48, 'haf shrt malk rehn', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, NULL, '0048', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 01:16:02', '2020-10-18 01:16:02'),
(49, 'fanila child 1/8', 1, 'single', 1, NULL, NULL, NULL, NULL, NULL, 'exclusive', 1, NULL, '0049', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 01:23:51', '2020-10-18 01:23:51'),
(51, 'fnila malki shbab 9/16', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0051', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 01:36:31', '2020-10-18 01:36:31'),
(52, 'sarwal malki rehn men', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0052', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 01:43:33', '2020-10-18 01:43:34'),
(53, 'sarwal men pich', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0053', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 01:50:43', '2020-10-18 01:50:43'),
(54, 'saewal shbab 9/16', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0054', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 01:57:40', '2020-10-18 01:57:40'),
(55, 'sarwai child 1/8', 1, 'single', 1, NULL, NULL, NULL, NULL, NULL, 'exclusive', 1, 5.0000, '0055', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 02:03:19', '2020-10-18 02:03:19'),
(56, 'cap 2', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0056', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 15:09:28', '2020-10-18 15:09:28'),
(57, 't shirt slv', 1, 'single', 1, NULL, NULL, NULL, NULL, NULL, 'exclusive', 1, 5.0000, '0057', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 15:23:39', '2020-10-18 15:23:39'),
(58, 'ID purse', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0058', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 15:36:08', '2020-10-18 15:36:08'),
(59, 'Belt', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0059', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 15:43:57', '2020-10-18 15:43:57'),
(60, 'BOXER', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0060', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 15:57:56', '2020-10-18 15:57:56'),
(61, 'BOXER BOX', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0061', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 16:06:46', '2020-10-18 16:06:46'),
(62, 'PURSE', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0062', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 16:13:46', '2020-10-18 16:13:46'),
(63, 'PERFUM', 1, 'single', 1, NULL, NULL, 10, NULL, NULL, 'exclusive', 1, 5.0000, '0063', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 16:33:33', '2020-10-18 16:33:33'),
(64, 'ATAR MX', 1, 'single', 1, NULL, NULL, 10, NULL, NULL, 'exclusive', 1, 5.0000, '0064', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 16:52:11', '2020-10-18 16:52:11'),
(65, 'ATAR 1', 1, 'single', 1, NULL, NULL, 10, NULL, NULL, 'exclusive', 1, 5.0000, '0065', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 16:59:46', '2020-10-18 16:59:46'),
(66, 'THOB WHITH CHIJD', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0066', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 17:16:35', '2020-10-18 17:16:35'),
(67, 'THOB WHITE MEN', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0067', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 17:31:15', '2020-10-18 17:31:15'),
(68, 'LUNGI', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0068', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 17:41:00', '2020-10-19 01:40:37'),
(69, 'FANILA VE INDIA', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0069', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 17:47:22', '2020-11-21 02:12:12'),
(70, 'SAJADA PAC', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0070', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 17:55:37', '2020-10-18 17:55:37'),
(71, 'SOCK CHILD', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0071', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 18:05:48', '2020-10-18 18:05:48'),
(72, 'SOCK MEN F', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0072', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 18:11:35', '2020-10-18 21:47:35'),
(73, 'SOVK MEN', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0073', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 18:18:55', '2020-10-18 18:18:55'),
(74, 'cap', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0074', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 20:35:53', '2020-10-18 20:35:53'),
(75, 'fanila R india', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0075', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 20:43:54', '2020-11-21 02:15:19'),
(76, 'haf kapri', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0076', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 21:00:01', '2020-10-25 22:57:10'),
(77, 'long paint men', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0077', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 21:16:39', '2020-10-25 23:04:16'),
(78, 'sock haf', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0078', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 21:31:49', '2020-10-18 21:31:49'),
(79, 'jalbiya idrees', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0079', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 22:01:23', '2020-10-22 22:46:40'),
(80, 'pajama child', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0080', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 22:20:47', '2020-10-18 22:20:47'),
(81, 'fanila winter', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0081', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 22:32:08', '2020-10-18 22:32:08'),
(82, 'fanila turk xx r', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0082', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 22:47:07', '2020-10-18 22:47:07'),
(83, 'jalbiya shbab uthman', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0083', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-18 23:04:40', '2020-10-18 23:04:40'),
(84, 'shamagh red', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0084', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 00:35:32', '2020-11-17 02:20:28'),
(85, 'shmagh white', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0085', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 00:42:06', '2020-10-19 00:42:06'),
(86, 'lungi white', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0086', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 00:49:34', '2020-10-19 00:49:34'),
(87, 'sajada', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0087', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 01:51:59', '2020-10-19 01:51:59'),
(88, 'sajada turk', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0088', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 01:58:13', '2020-10-19 01:58:13'),
(90, 'sajada jambo', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0090', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 02:06:09', '2020-10-19 02:06:09'),
(92, 'towel n', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0092', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 02:25:49', '2020-10-19 02:25:49'),
(93, 'towel jambo', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0093', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 02:31:41', '2020-10-19 02:31:41'),
(94, 'towel pk', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0094', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 02:39:00', '2020-10-19 02:39:00'),
(95, 'cap kofi', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0095', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 02:58:11', '2020-10-19 02:58:11'),
(96, 'cap tagi malaki', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0096', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 03:05:43', '2020-10-19 03:05:43'),
(97, 'cap malaki', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 5.0000, '0097', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 03:09:07', '2020-10-19 03:09:07'),
(98, 'pajama men', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0098', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 03:15:33', '2020-10-22 14:24:24'),
(99, 'cap kofi syr', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 3.0000, '0099', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 03:18:56', '2020-10-19 03:18:56'),
(100, 'cap cofi 1', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0100', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-19 03:21:36', '2020-10-19 03:21:36'),
(101, 'towel smal', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, 2.0000, '0101', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-21 22:12:17', '2020-10-21 22:19:10'),
(102, 'fanila shbab rehan 9/16', 1, 'single', 1, NULL, NULL, NULL, NULL, NULL, 'exclusive', 1, 5.0000, '0102', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-23 22:23:09', '2020-10-23 22:32:12'),
(103, 'towel smal', 1, 'single', 1, NULL, NULL, NULL, NULL, NULL, 'exclusive', 1, NULL, '0103', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-10-31 21:54:48', '2020-10-31 21:54:48'),
(104, 'khayal shamagh red no 11', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, NULL, '0104', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-11-17 17:38:11', '2020-11-17 17:45:03'),
(105, 'ruwais shamagh red no 4', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, NULL, '0105', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-11-17 17:51:45', '2020-11-17 17:51:45'),
(106, 'ruwais shmagh red no 13', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, NULL, '0106', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-11-17 17:58:54', '2020-11-17 17:58:54'),
(107, 'shall red', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, NULL, '0107', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-11-17 18:04:26', '2020-11-17 18:04:26'),
(108, 'ruwais ghtra whit no 5', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, NULL, '0108', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-11-17 18:08:50', '2020-11-17 18:08:50'),
(109, 'shal long kashmir', 1, 'single', 1, NULL, NULL, 9, NULL, NULL, 'exclusive', 1, NULL, '0109', 'C128', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, NULL, 0, 0, '2020-11-28 16:52:25', '2020-11-28 16:52:25');

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

--
-- Table structure for table `product_locations`
--

CREATE TABLE `product_locations` (
  `product_id` int(11) NOT NULL,
  `location_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_locations`
--

INSERT INTO `product_locations` (`product_id`, `location_id`) VALUES
(1, 1),
(2, 1),
(3, 2),
(4, 2),
(5, 2),
(6, 2),
(7, 2),
(8, 2),
(9, 2),
(10, 2),
(11, 2),
(12, 2),
(13, 2),
(14, 2),
(15, 2),
(16, 2),
(17, 2),
(18, 2),
(19, 2),
(20, 2),
(21, 2),
(22, 2),
(23, 2),
(24, 2),
(25, 2),
(26, 2),
(27, 2),
(28, 2),
(29, 2),
(30, 2),
(31, 2),
(32, 2),
(33, 2),
(34, 2),
(35, 3),
(36, 3),
(37, 3),
(38, 3),
(39, 3),
(40, 3),
(41, 3),
(42, 3),
(43, 3),
(44, 3),
(45, 3),
(46, 3),
(47, 3),
(48, 3),
(49, 3),
(50, 3),
(51, 3),
(52, 3),
(53, 3),
(54, 3),
(55, 3),
(56, 3),
(57, 3),
(58, 3),
(59, 3),
(60, 3),
(61, 3),
(62, 3),
(63, 3),
(64, 3),
(65, 3),
(66, 3),
(67, 3),
(68, 3),
(69, 3),
(70, 3),
(71, 3),
(72, 3),
(73, 3),
(74, 3),
(75, 3),
(76, 3),
(77, 3),
(78, 3),
(79, 3),
(80, 3),
(81, 3),
(82, 3),
(83, 3),
(84, 3),
(85, 3),
(86, 3),
(87, 3),
(88, 3),
(89, 3),
(90, 3),
(91, 3),
(92, 3),
(93, 3),
(94, 3),
(95, 3),
(96, 3),
(97, 3),
(98, 3),
(99, 3),
(100, 3),
(101, 3),
(102, 3),
(103, 3),
(104, 3),
(105, 3),
(106, 3),
(107, 3),
(108, 3),
(109, 3);

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

--
-- Table structure for table `product_racks`
--

CREATE TABLE `product_racks` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `location_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `rack` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `row` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `position` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `product_variations`
--

CREATE TABLE `product_variations` (
  `id` int(10) UNSIGNED NOT NULL,
  `variation_template_id` int(11) DEFAULT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `is_dummy` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `product_variations`
--

INSERT INTO `product_variations` (`id`, `variation_template_id`, `name`, `product_id`, `is_dummy`, `created_at`, `updated_at`) VALUES
(3, NULL, 'DUMMY', 3, 1, '2020-10-10 23:47:05', '2020-10-10 23:47:05'),
(4, NULL, 'DUMMY', 4, 1, '2020-10-11 20:42:43', '2020-10-11 20:42:43'),
(9, NULL, 'DUMMY', 9, 1, '2020-10-15 01:00:59', '2020-10-15 01:00:59'),
(16, NULL, 'DUMMY', 16, 1, '2020-10-15 05:02:36', '2020-10-15 05:02:36'),
(17, NULL, 'DUMMY', 17, 1, '2020-10-15 08:18:22', '2020-10-15 08:18:22'),
(18, NULL, 'DUMMY', 18, 1, '2020-10-15 08:33:02', '2020-10-15 08:33:02'),
(20, NULL, 'DUMMY', 20, 1, '2020-10-15 08:46:00', '2020-10-15 08:46:00'),
(21, NULL, 'DUMMY', 21, 1, '2020-10-15 08:49:22', '2020-10-15 08:49:22'),
(22, NULL, 'DUMMY', 22, 1, '2020-10-16 01:18:12', '2020-10-16 01:18:12'),
(23, NULL, 'DUMMY', 23, 1, '2020-10-16 01:43:59', '2020-10-16 01:43:59'),
(24, NULL, 'DUMMY', 24, 1, '2020-10-16 02:11:15', '2020-10-16 02:11:15'),
(26, NULL, 'DUMMY', 26, 1, '2020-10-16 03:51:40', '2020-10-16 03:51:40'),
(27, NULL, 'DUMMY', 27, 1, '2020-10-16 03:57:54', '2020-10-16 03:57:54'),
(28, NULL, 'DUMMY', 28, 1, '2020-10-16 04:10:48', '2020-10-16 04:10:48'),
(29, NULL, 'DUMMY', 29, 1, '2020-10-16 04:11:39', '2020-10-16 04:11:39'),
(30, NULL, 'DUMMY', 30, 1, '2020-10-16 04:19:47', '2020-10-16 04:19:47'),
(31, NULL, 'DUMMY', 31, 1, '2020-10-16 04:24:46', '2020-10-16 04:24:46'),
(32, NULL, 'DUMMY', 32, 1, '2020-10-16 04:27:51', '2020-10-16 04:27:51'),
(33, NULL, 'DUMMY', 33, 1, '2020-10-16 04:32:39', '2020-10-16 04:32:39'),
(34, NULL, 'DUMMY', 34, 1, '2020-10-16 04:42:39', '2020-10-16 04:42:39'),
(36, NULL, 'DUMMY', 36, 1, '2020-10-17 20:53:25', '2020-10-17 20:53:25'),
(37, NULL, 'DUMMY', 37, 1, '2020-10-17 21:21:33', '2020-10-17 21:21:33'),
(38, NULL, 'DUMMY', 38, 1, '2020-10-17 21:32:30', '2020-10-17 21:32:30'),
(39, NULL, 'DUMMY', 39, 1, '2020-10-17 21:47:03', '2020-10-17 21:47:03'),
(40, NULL, 'DUMMY', 40, 1, '2020-10-17 21:56:45', '2020-10-17 21:56:45'),
(41, NULL, 'DUMMY', 41, 1, '2020-10-17 22:00:44', '2020-10-17 22:00:44'),
(42, NULL, 'DUMMY', 42, 1, '2020-10-17 22:39:38', '2020-10-17 22:39:38'),
(43, NULL, 'DUMMY', 43, 1, '2020-10-17 23:42:59', '2020-10-17 23:42:59'),
(44, NULL, 'DUMMY', 44, 1, '2020-10-18 00:29:49', '2020-10-18 00:29:49'),
(45, NULL, 'DUMMY', 45, 1, '2020-10-18 00:54:52', '2020-10-18 00:54:52'),
(46, NULL, 'DUMMY', 46, 1, '2020-10-18 01:01:03', '2020-10-18 01:01:03'),
(48, NULL, 'DUMMY', 48, 1, '2020-10-18 01:16:02', '2020-10-18 01:16:02'),
(49, NULL, 'DUMMY', 49, 1, '2020-10-18 01:23:51', '2020-10-18 01:23:51'),
(51, NULL, 'DUMMY', 51, 1, '2020-10-18 01:36:31', '2020-10-18 01:36:31'),
(52, NULL, 'DUMMY', 52, 1, '2020-10-18 01:43:34', '2020-10-18 01:43:34'),
(53, NULL, 'DUMMY', 53, 1, '2020-10-18 01:50:43', '2020-10-18 01:50:43'),
(54, NULL, 'DUMMY', 54, 1, '2020-10-18 01:57:40', '2020-10-18 01:57:40'),
(55, NULL, 'DUMMY', 55, 1, '2020-10-18 02:03:19', '2020-10-18 02:03:19'),
(56, NULL, 'DUMMY', 56, 1, '2020-10-18 15:09:28', '2020-10-18 15:09:28'),
(57, NULL, 'DUMMY', 57, 1, '2020-10-18 15:23:39', '2020-10-18 15:23:39'),
(58, NULL, 'DUMMY', 58, 1, '2020-10-18 15:36:08', '2020-10-18 15:36:08'),
(59, NULL, 'DUMMY', 59, 1, '2020-10-18 15:43:57', '2020-10-18 15:43:57'),
(60, NULL, 'DUMMY', 60, 1, '2020-10-18 15:57:56', '2020-10-18 15:57:56'),
(61, NULL, 'DUMMY', 61, 1, '2020-10-18 16:06:46', '2020-10-18 16:06:46'),
(62, NULL, 'DUMMY', 62, 1, '2020-10-18 16:13:46', '2020-10-18 16:13:46'),
(63, NULL, 'DUMMY', 63, 1, '2020-10-18 16:33:33', '2020-10-18 16:33:33'),
(64, NULL, 'DUMMY', 64, 1, '2020-10-18 16:52:11', '2020-10-18 16:52:11'),
(65, NULL, 'DUMMY', 65, 1, '2020-10-18 16:59:46', '2020-10-18 16:59:46'),
(66, NULL, 'DUMMY', 66, 1, '2020-10-18 17:16:35', '2020-10-18 17:16:35'),
(67, NULL, 'DUMMY', 67, 1, '2020-10-18 17:31:15', '2020-10-18 17:31:15'),
(68, NULL, 'DUMMY', 68, 1, '2020-10-18 17:41:00', '2020-10-18 17:41:00'),
(69, NULL, 'DUMMY', 69, 1, '2020-10-18 17:47:22', '2020-10-18 17:47:22'),
(70, NULL, 'DUMMY', 70, 1, '2020-10-18 17:55:37', '2020-10-18 17:55:37'),
(71, NULL, 'DUMMY', 71, 1, '2020-10-18 18:05:48', '2020-10-18 18:05:48'),
(72, NULL, 'DUMMY', 72, 1, '2020-10-18 18:11:35', '2020-10-18 18:11:35'),
(73, NULL, 'DUMMY', 73, 1, '2020-10-18 18:18:55', '2020-10-18 18:18:55'),
(74, NULL, 'DUMMY', 74, 1, '2020-10-18 20:35:53', '2020-10-18 20:35:53'),
(75, NULL, 'DUMMY', 75, 1, '2020-10-18 20:43:54', '2020-10-18 20:43:54'),
(76, NULL, 'DUMMY', 76, 1, '2020-10-18 21:00:01', '2020-10-18 21:00:01'),
(77, NULL, 'DUMMY', 77, 1, '2020-10-18 21:16:39', '2020-10-18 21:16:39'),
(78, NULL, 'DUMMY', 78, 1, '2020-10-18 21:31:49', '2020-10-18 21:31:49'),
(79, NULL, 'DUMMY', 79, 1, '2020-10-18 22:01:23', '2020-10-18 22:01:23'),
(80, NULL, 'DUMMY', 80, 1, '2020-10-18 22:20:47', '2020-10-18 22:20:47'),
(81, NULL, 'DUMMY', 81, 1, '2020-10-18 22:32:08', '2020-10-18 22:32:08'),
(82, NULL, 'DUMMY', 82, 1, '2020-10-18 22:47:07', '2020-10-18 22:47:07'),
(83, NULL, 'DUMMY', 83, 1, '2020-10-18 23:04:40', '2020-10-18 23:04:40'),
(84, NULL, 'DUMMY', 84, 1, '2020-10-19 00:35:32', '2020-10-19 00:35:32'),
(85, NULL, 'DUMMY', 85, 1, '2020-10-19 00:42:06', '2020-10-19 00:42:06'),
(86, NULL, 'DUMMY', 86, 1, '2020-10-19 00:49:34', '2020-10-19 00:49:34'),
(87, NULL, 'DUMMY', 87, 1, '2020-10-19 01:51:59', '2020-10-19 01:51:59'),
(88, NULL, 'DUMMY', 88, 1, '2020-10-19 01:58:13', '2020-10-19 01:58:13'),
(90, NULL, 'DUMMY', 90, 1, '2020-10-19 02:06:09', '2020-10-19 02:06:09'),
(92, NULL, 'DUMMY', 92, 1, '2020-10-19 02:25:49', '2020-10-19 02:25:49'),
(93, NULL, 'DUMMY', 93, 1, '2020-10-19 02:31:41', '2020-10-19 02:31:41'),
(94, NULL, 'DUMMY', 94, 1, '2020-10-19 02:39:00', '2020-10-19 02:39:00'),
(95, NULL, 'DUMMY', 95, 1, '2020-10-19 02:58:11', '2020-10-19 02:58:11'),
(96, NULL, 'DUMMY', 96, 1, '2020-10-19 03:05:43', '2020-10-19 03:05:43'),
(97, NULL, 'DUMMY', 97, 1, '2020-10-19 03:09:07', '2020-10-19 03:09:07'),
(98, NULL, 'DUMMY', 98, 1, '2020-10-19 03:15:33', '2020-10-19 03:15:33'),
(99, NULL, 'DUMMY', 99, 1, '2020-10-19 03:18:56', '2020-10-19 03:18:56'),
(100, NULL, 'DUMMY', 100, 1, '2020-10-19 03:21:36', '2020-10-19 03:21:36'),
(101, NULL, 'DUMMY', 101, 1, '2020-10-21 22:12:17', '2020-10-21 22:12:17'),
(102, NULL, 'DUMMY', 102, 1, '2020-10-23 22:23:09', '2020-10-23 22:23:09'),
(103, NULL, 'DUMMY', 103, 1, '2020-10-31 21:54:48', '2020-10-31 21:54:48'),
(104, NULL, 'DUMMY', 104, 1, '2020-11-17 17:38:11', '2020-11-17 17:38:11'),
(105, NULL, 'DUMMY', 105, 1, '2020-11-17 17:51:45', '2020-11-17 17:51:45'),
(106, NULL, 'DUMMY', 106, 1, '2020-11-17 17:58:54', '2020-11-17 17:58:54'),
(107, NULL, 'DUMMY', 107, 1, '2020-11-17 18:04:26', '2020-11-17 18:04:26'),
(108, NULL, 'DUMMY', 108, 1, '2020-11-17 18:08:50', '2020-11-17 18:08:50'),
(109, NULL, 'DUMMY', 109, 1, '2020-11-28 16:52:25', '2020-11-28 16:52:25');

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

--
-- Table structure for table `purchase_lines`
--

CREATE TABLE `purchase_lines` (
  `id` int(10) UNSIGNED NOT NULL,
  `transaction_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `variation_id` int(10) UNSIGNED NOT NULL,
  `quantity` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `pp_without_discount` decimal(22,4) NOT NULL DEFAULT 0.0000 COMMENT 'Purchase price before inline discounts',
  `discount_percent` decimal(5,2) NOT NULL DEFAULT 0.00 COMMENT 'Inline discount percentage',
  `purchase_price` decimal(22,4) NOT NULL,
  `purchase_price_inc_tax` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `item_tax` decimal(22,4) NOT NULL COMMENT 'Tax for one quantity',
  `tax_id` int(10) UNSIGNED DEFAULT NULL,
  `quantity_sold` decimal(22,4) NOT NULL DEFAULT 0.0000 COMMENT 'Quanity sold from this purchase line',
  `quantity_adjusted` decimal(22,4) NOT NULL DEFAULT 0.0000 COMMENT 'Quanity adjusted in stock adjustment from this purchase line',
  `quantity_returned` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `mfg_quantity_used` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `mfg_date` date DEFAULT NULL,
  `exp_date` date DEFAULT NULL,
  `lot_number` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_unit_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `purchase_lines`
--

INSERT INTO `purchase_lines` (`id`, `transaction_id`, `product_id`, `variation_id`, `quantity`, `pp_without_discount`, `discount_percent`, `purchase_price`, `purchase_price_inc_tax`, `item_tax`, `tax_id`, `quantity_sold`, `quantity_adjusted`, `quantity_returned`, `mfg_quantity_used`, `mfg_date`, `exp_date`, `lot_number`, `sub_unit_id`, `created_at`, `updated_at`) VALUES
(27, 67, 36, 36, 380.0000, 23.0000, 0.00, 23.0000, 23.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-17 20:53:42', '2020-11-13 02:06:40'),
(28, 68, 37, 37, 200.0000, 16.0000, 0.00, 16.0000, 16.0000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-17 21:21:56', '2020-11-04 01:51:31'),
(29, 70, 38, 38, 400.0000, 23.0000, 0.00, 23.0000, 23.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-17 21:33:05', '2020-10-22 01:28:17'),
(30, 72, 39, 39, 36.0000, 28.5000, 0.00, 28.5000, 28.5000, 0.0000, NULL, 6.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-17 21:47:50', '2020-11-25 03:01:57'),
(31, 73, 40, 40, 24.0000, 26.6600, 0.00, 26.6600, 26.6600, 0.0000, NULL, 7.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-17 21:57:10', '2020-11-26 02:45:18'),
(32, 74, 41, 41, 12.0000, 25.0000, 0.00, 25.0000, 25.0000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-17 22:01:01', '2020-11-25 22:14:33'),
(33, 76, 42, 42, 36.0000, 25.0000, 0.00, 25.0000, 25.0000, 0.0000, NULL, 15.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-17 22:39:53', '2020-11-24 02:22:11'),
(34, 80, 43, 43, 12.0000, 23.3000, 0.00, 23.3000, 23.3000, 0.0000, NULL, 3.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-17 23:43:19', '2020-11-01 02:44:15'),
(35, 87, 44, 44, 288.0000, 7.5000, 0.00, 7.5000, 7.5000, 0.0000, NULL, 29.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 00:30:01', '2020-11-24 03:11:03'),
(36, 90, 45, 45, 144.0000, 7.5000, 0.00, 7.5000, 7.5000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 00:55:22', '2020-10-23 21:25:19'),
(37, 91, 46, 46, 288.0000, 7.0000, 0.00, 7.0000, 7.0000, 0.0000, NULL, 14.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 01:01:44', '2020-11-23 01:09:09'),
(38, 93, 48, 48, 192.0000, 7.0000, 0.00, 7.0000, 7.0000, 0.0000, NULL, 8.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 01:17:33', '2020-11-27 21:48:32'),
(39, 94, 49, 49, 192.0000, 5.0000, 0.00, 5.0000, 5.0000, 0.0000, NULL, 13.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 01:24:58', '2020-11-26 01:11:47'),
(42, 96, 51, 51, 144.0000, 6.0000, 0.00, 6.0000, 6.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 01:36:48', '2020-10-18 01:36:48'),
(43, 97, 52, 52, 396.0000, 11.0000, 0.00, 11.0000, 11.0000, 0.0000, NULL, 11.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 01:44:31', '2020-11-27 21:48:32'),
(44, 98, 53, 53, 396.0000, 11.0000, 0.00, 11.0000, 11.0000, 0.0000, NULL, 10.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 01:51:12', '2020-11-26 00:09:24'),
(45, 99, 54, 54, 144.0000, 8.2500, 0.00, 8.2500, 8.2500, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 01:57:54', '2020-10-18 01:57:54'),
(46, 100, 55, 55, 144.0000, 6.7500, 0.00, 6.7500, 6.7500, 0.0000, NULL, 14.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 02:03:38', '2020-11-26 01:11:47'),
(47, 105, 56, 56, 12.0000, 3.3300, 0.00, 3.3300, 3.3300, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 15:09:58', '2020-10-18 15:09:58'),
(48, 106, 57, 57, 12.0000, 6.5000, 0.00, 6.5000, 6.5000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 15:23:57', '2020-11-05 14:55:25'),
(49, 107, 58, 58, 12.0000, 3.7500, 0.00, 3.7500, 3.7500, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 15:36:20', '2020-10-18 15:36:20'),
(50, 108, 59, 59, 24.0000, 4.5000, 0.00, 4.5000, 4.5000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 15:44:15', '2020-11-14 04:23:36'),
(51, 109, 60, 60, 24.0000, 3.0000, 0.00, 3.0000, 3.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 15:58:08', '2020-10-18 15:58:08'),
(52, 110, 61, 61, 24.0000, 4.0000, 0.00, 4.0000, 4.0000, 0.0000, NULL, 4.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 16:07:01', '2020-11-25 03:01:57'),
(53, 111, 62, 62, 12.0000, 5.7000, 0.00, 5.7000, 5.7000, 0.0000, NULL, 3.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 16:14:00', '2020-10-28 00:15:40'),
(54, 112, 63, 63, 52.0000, 5.5000, 0.00, 5.5000, 5.5000, 0.0000, NULL, 6.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 16:34:25', '2020-11-23 22:49:11'),
(55, 113, 64, 64, 36.0000, 1.7000, 0.00, 1.7000, 1.7000, 0.0000, NULL, 6.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 16:52:30', '2020-11-14 04:27:49'),
(56, 114, 65, 65, 12.0000, 2.5000, 0.00, 2.5000, 2.5000, 0.0000, NULL, 6.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 17:00:01', '2020-11-26 02:46:52'),
(57, 116, 66, 66, 24.0000, 15.0000, 0.00, 15.0000, 15.0000, 0.0000, NULL, 3.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 17:17:43', '2020-11-06 04:08:00'),
(58, 117, 67, 67, 12.0000, 20.0000, 0.00, 20.0000, 20.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 17:32:04', '2020-10-18 17:32:04'),
(59, 118, 68, 68, 20.0000, 9.0000, 0.00, 9.0000, 9.0000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 17:41:16', '2020-10-31 03:15:01'),
(60, 119, 69, 69, 24.0000, 5.0000, 0.00, 5.0000, 5.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 17:47:46', '2020-11-21 02:12:53'),
(61, 120, 70, 70, 6.0000, 17.0000, 0.00, 17.0000, 17.0000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 17:55:50', '2020-11-24 03:11:03'),
(62, 121, 71, 71, 12.0000, 2.0000, 0.00, 2.0000, 2.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 18:06:08', '2020-10-18 18:06:08'),
(63, 122, 72, 72, 48.0000, 4.6000, 0.00, 4.6000, 4.6000, 0.0000, NULL, 3.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 18:11:52', '2020-11-26 22:21:25'),
(64, 123, 73, 73, 12.0000, 4.6600, 0.00, 4.6600, 4.6600, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 18:19:29', '2020-11-13 23:18:00'),
(65, 124, 74, 74, 12.0000, 4.5000, 0.00, 4.5000, 4.5000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 20:36:09', '2020-11-27 01:04:19'),
(66, 125, 75, 75, 36.0000, 4.0000, 0.00, 4.0000, 4.0000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 20:44:12', '2020-11-21 02:16:34'),
(67, 126, 76, 76, 12.0000, 14.2000, 0.00, 14.2000, 14.2000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 21:00:18', '2020-11-06 03:56:29'),
(68, 127, 77, 77, 12.0000, 25.0000, 0.00, 25.0000, 25.0000, 0.0000, NULL, 3.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 21:16:49', '2020-11-26 22:21:25'),
(69, 128, 78, 78, 8.0000, 2.5000, 0.00, 2.5000, 2.5000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 21:32:01', '2020-10-18 21:32:01'),
(70, 129, 79, 79, 12.0000, 15.0000, 0.00, 15.0000, 15.0000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 22:01:34', '2020-11-07 00:01:59'),
(71, 130, 80, 80, 12.0000, 23.3300, 0.00, 23.3300, 23.3300, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 22:21:02', '2020-10-18 22:21:02'),
(72, 131, 81, 81, 12.0000, 12.5000, 0.00, 12.5000, 12.5000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 22:32:19', '2020-10-18 22:32:19'),
(73, 132, 82, 82, 12.0000, 9.1200, 0.00, 9.1200, 9.1200, 0.0000, NULL, 3.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 22:47:18', '2020-11-26 00:09:24'),
(74, 133, 83, 83, 12.0000, 13.3500, 0.00, 13.3500, 13.3500, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-18 23:04:51', '2020-10-18 23:04:51'),
(75, 137, 84, 84, 12.0000, 7.5000, 0.00, 7.5000, 7.5000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 00:35:44', '2020-11-17 02:31:54'),
(76, 138, 85, 85, 20.0000, 4.5000, 0.00, 4.5000, 4.5000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 00:42:23', '2020-10-19 00:42:23'),
(77, 140, 86, 86, 10.0000, 15.0000, 0.00, 15.0000, 15.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 00:49:48', '2020-10-19 00:49:48'),
(78, 141, 87, 87, 6.0000, 8.0000, 0.00, 8.0000, 8.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 01:52:14', '2020-10-19 01:52:14'),
(79, 142, 88, 88, 6.0000, 21.0000, 0.00, 21.0000, 21.0000, 0.0000, NULL, 2.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 01:58:31', '2020-10-24 22:21:36'),
(81, 144, 90, 90, 6.0000, 13.0000, 0.00, 13.0000, 13.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 02:06:27', '2020-10-19 02:06:27'),
(83, 146, 92, 92, 6.0000, 13.3400, 0.00, 13.3400, 13.3400, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 02:26:00', '2020-10-19 02:26:00'),
(84, 147, 93, 93, 6.0000, 31.6600, 0.00, 31.6600, 31.6600, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 02:31:56', '2020-10-19 02:31:56'),
(85, 148, 94, 94, 6.0000, 22.5000, 0.00, 22.5000, 22.5000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 02:39:08', '2020-10-19 02:39:08'),
(86, 149, 95, 95, 55.0000, 2.7500, 0.00, 2.7500, 2.7500, 0.0000, NULL, 9.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 02:58:31', '2020-11-26 01:15:35'),
(87, 150, 96, 96, 20.0000, 6.0000, 0.00, 6.0000, 6.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 03:05:55', '2020-10-19 03:05:55'),
(88, 151, 97, 97, 48.0000, 4.0000, 0.00, 4.0000, 4.0000, 0.0000, NULL, 2.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 03:09:30', '2020-11-26 22:21:25'),
(89, 152, 98, 98, 11.0000, 32.5000, 0.00, 32.5000, 32.5000, 0.0000, NULL, 1.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 03:15:44', '2020-11-23 01:09:09'),
(90, 153, 99, 99, 24.0000, 3.7500, 0.00, 3.7500, 3.7500, 0.0000, NULL, 4.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 03:19:16', '2020-10-19 16:37:23'),
(91, 154, 100, 100, 12.0000, 6.6600, 0.00, 6.6600, 6.6600, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-19 03:21:50', '2020-10-19 03:21:50'),
(92, 167, 101, 101, 12.0000, 7.9100, 0.00, 7.9100, 7.9100, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-21 22:19:25', '2020-10-21 22:19:25'),
(93, 172, 102, 102, 48.0000, 5.7500, 0.00, 5.7500, 5.7500, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-10-23 22:33:07', '2020-10-23 22:33:07'),
(94, 233, 104, 104, 15.0000, 50.0000, 0.00, 50.0000, 50.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-11-17 17:38:59', '2020-11-17 17:45:13'),
(95, 234, 105, 105, 10.0000, 50.0000, 0.00, 50.0000, 50.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-11-17 17:52:26', '2020-11-17 17:52:26'),
(96, 235, 106, 106, 15.0000, 50.0000, 0.00, 50.0000, 50.0000, 0.0000, NULL, 2.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-11-17 17:59:20', '2020-11-24 17:03:04'),
(97, 236, 107, 107, 10.0000, 50.0000, 0.00, 50.0000, 50.0000, 0.0000, NULL, 2.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-11-17 18:04:45', '2020-11-27 21:40:52'),
(98, 237, 108, 108, 10.0000, 20.0000, 0.00, 20.0000, 20.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-11-17 18:09:06', '2020-11-17 18:09:06'),
(99, 261, 109, 109, 10.0000, 24.0000, 0.00, 24.0000, 24.0000, 0.0000, NULL, 0.0000, 0.0000, 0.0000, 0.0000, NULL, NULL, NULL, NULL, '2020-11-28 16:52:41', '2020-11-28 16:52:41');

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

--
-- Table structure for table `reference_counts`
--

CREATE TABLE `reference_counts` (
  `id` int(10) UNSIGNED NOT NULL,
  `ref_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ref_count` int(11) NOT NULL,
  `business_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `reference_counts`
--

INSERT INTO `reference_counts` (`id`, `ref_type`, `ref_count`, `business_id`, `created_at`, `updated_at`) VALUES
(1, 'contacts', 2, 1, '2020-10-07 03:13:48', '2020-10-17 23:18:17'),
(2, 'business_location', 3, 1, '2020-10-07 03:13:48', '2020-10-17 17:02:45'),
(3, 'sell_payment', 153, 1, '2020-10-07 01:58:32', '2020-11-27 21:48:32'),
(4, 'username', 2, 1, '2020-10-10 23:17:30', '2020-10-10 23:30:05'),
(5, 'draft', 9, 1, '2020-10-18 02:15:39', '2020-11-17 02:30:37');

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

--
-- Table structure for table `res_product_modifier_sets`
--

CREATE TABLE `res_product_modifier_sets` (
  `modifier_set_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL COMMENT 'Table use to store the modifier sets applicable for a product'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `res_tables`
--

CREATE TABLE `res_tables` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `location_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_by` int(10) UNSIGNED NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `roles` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_service_staff` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` (`id`, `name`, `guard_name`, `business_id`, `is_default`, `is_service_staff`, `created_at`, `updated_at`) VALUES
(1, 'Admin#1', 'web', 1, 1, 0, '2020-10-07 03:13:47', '2020-10-07 03:13:47'),
(2, 'Cashier#1', 'web', 1, 0, 0, '2020-10-07 03:13:47', '2020-10-07 03:13:47');

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

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_has_permissions`
--

INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
(45, 2),
(46, 2),
(47, 2),
(48, 2),
(77, 2);

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

--
-- Table structure for table `selling_price_groups`
--

CREATE TABLE `selling_price_groups` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `sell_line_warranties`
--

CREATE TABLE `sell_line_warranties` (
  `sell_line_id` int(11) NOT NULL,
  `warranty_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payload` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `stock_adjustments_temp`
--

CREATE TABLE `stock_adjustments_temp` (
  `id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `stock_adjustment_lines`
--

CREATE TABLE `stock_adjustment_lines` (
  `id` int(10) UNSIGNED NOT NULL,
  `transaction_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `variation_id` int(10) UNSIGNED NOT NULL,
  `quantity` decimal(22,4) NOT NULL,
  `unit_price` decimal(22,4) DEFAULT NULL COMMENT 'Last purchase unit price',
  `removed_purchase_line` int(11) DEFAULT NULL,
  `lot_no_line_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `tax_rates` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` double(22,4) NOT NULL,
  `is_tax_group` tinyint(1) NOT NULL DEFAULT 0,
  `for_tax_group` tinyint(1) NOT NULL DEFAULT 0,
  `created_by` int(10) UNSIGNED NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `transaction_sell_lines`
--

CREATE TABLE `transaction_sell_lines` (
  `id` int(10) UNSIGNED NOT NULL,
  `transaction_id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `variation_id` int(10) UNSIGNED NOT NULL,
  `quantity` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `quantity_returned` decimal(20,4) NOT NULL DEFAULT 0.0000,
  `unit_price_before_discount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `unit_price` decimal(22,4) DEFAULT NULL COMMENT 'Sell price excluding tax',
  `line_discount_type` enum('fixed','percentage') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `line_discount_amount` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `unit_price_inc_tax` decimal(22,4) DEFAULT NULL COMMENT 'Sell price including tax',
  `item_tax` decimal(22,4) NOT NULL COMMENT 'Tax for one quantity',
  `tax_id` int(10) UNSIGNED DEFAULT NULL,
  `discount_id` int(11) DEFAULT NULL,
  `lot_no_line_id` int(11) DEFAULT NULL,
  `sell_line_note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `res_service_staff_id` int(11) DEFAULT NULL,
  `res_line_order_status` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_sell_line_id` int(11) DEFAULT NULL,
  `children_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Type of children for the parent, like modifier or combo',
  `sub_unit_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transaction_sell_lines`
--

INSERT INTO `transaction_sell_lines` (`id`, `transaction_id`, `product_id`, `variation_id`, `quantity`, `quantity_returned`, `unit_price_before_discount`, `unit_price`, `line_discount_type`, `line_discount_amount`, `unit_price_inc_tax`, `item_tax`, `tax_id`, `discount_id`, `lot_no_line_id`, `sell_line_note`, `res_service_staff_id`, `res_line_order_status`, `parent_sell_line_id`, `children_type`, `sub_unit_id`, `created_at`, `updated_at`) VALUES
(101, 103, 46, 46, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-18 02:15:39', '2020-10-18 02:15:39'),
(105, 134, 72, 72, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 00:25:41', '2020-10-19 00:25:41'),
(106, 135, 72, 72, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 00:26:12', '2020-10-19 00:26:12'),
(107, 136, 72, 72, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 00:27:26', '2020-10-19 00:27:26'),
(113, 159, 45, 45, 6.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 16:21:18', '2020-10-19 16:21:18'),
(115, 161, 55, 55, 6.0000, 0.0000, 15.0000, 10.0000, 'fixed', 5.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 16:28:09', '2020-10-19 16:28:09'),
(116, 161, 49, 49, 6.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 16:28:09', '2020-10-19 16:28:09'),
(117, 162, 40, 40, 1.0000, 0.0000, 45.0000, 45.0000, 'fixed', 0.0000, 45.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 16:31:38', '2020-10-19 16:31:38'),
(118, 162, 39, 39, 2.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 16:31:38', '2020-10-19 16:31:38'),
(119, 163, 55, 55, 2.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 16:33:48', '2020-10-19 16:33:48'),
(120, 163, 49, 49, 2.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 16:33:48', '2020-10-19 16:33:48'),
(121, 164, 66, 66, 2.0000, 0.0000, 30.0000, 30.0000, 'fixed', 0.0000, 30.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 16:34:59', '2020-10-19 16:34:59'),
(122, 165, 99, 99, 4.0000, 0.0000, 7.0000, 7.0000, 'fixed', 0.0000, 7.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 16:37:23', '2020-10-19 16:37:23'),
(123, 166, 62, 62, 1.0000, 0.0000, 15.0000, 10.0000, 'fixed', 5.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-19 16:38:44', '2020-10-19 16:38:44'),
(124, 168, 61, 61, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-23 00:24:00', '2020-10-23 00:24:00'),
(125, 169, 65, 65, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-23 20:56:09', '2020-10-23 20:56:09'),
(126, 170, 62, 62, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-23 21:10:10', '2020-10-23 21:10:10'),
(128, 173, 44, 44, 6.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-23 22:50:43', '2020-10-23 22:50:43'),
(129, 174, 53, 53, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-23 22:59:21', '2020-10-23 22:59:21'),
(130, 175, 53, 53, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-23 23:01:52', '2020-10-23 23:01:52'),
(131, 176, 53, 53, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-23 23:02:22', '2020-10-23 23:02:22'),
(132, 177, 88, 88, 2.0000, 0.0000, 30.0000, 30.0000, 'fixed', 0.0000, 30.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-24 22:21:36', '2020-10-24 22:21:36'),
(133, 178, 52, 52, 10.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-25 20:45:16', '2020-10-25 20:45:16'),
(134, 178, 44, 44, 20.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-25 20:45:16', '2020-10-25 20:45:16'),
(135, 179, 64, 64, 1.0000, 0.0000, 5.0000, 5.0000, 'fixed', 0.0000, 5.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-28 00:15:40', '2020-10-28 00:15:40'),
(136, 179, 63, 63, 1.0000, 0.0000, 25.0000, 25.0000, 'fixed', 0.0000, 25.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-28 00:15:40', '2020-10-28 00:15:40'),
(137, 179, 62, 62, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-28 00:15:40', '2020-10-28 00:15:40'),
(140, 181, 43, 43, 2.0000, 0.0000, 45.0000, 30.0000, 'fixed', 15.0000, 30.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-28 02:42:07', '2020-10-28 02:42:07'),
(141, 181, 53, 53, 2.0000, 0.0000, 15.0000, 12.5000, 'fixed', 2.5000, 12.5000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-28 02:42:07', '2020-10-28 02:42:07'),
(142, 182, 64, 64, 5.0000, 0.0000, 5.0000, 5.0000, 'fixed', 0.0000, 5.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-29 00:01:46', '2020-10-29 00:01:46'),
(143, 183, 95, 95, 1.0000, 0.0000, 7.0000, 7.0000, 'fixed', 0.0000, 7.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-29 02:38:58', '2020-10-29 02:38:58'),
(144, 183, 61, 61, 3.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-29 02:38:58', '2020-10-29 02:38:58'),
(145, 183, 42, 42, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-29 02:38:58', '2020-10-29 02:38:58'),
(148, 186, 42, 42, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-30 01:22:29', '2020-10-30 01:22:29'),
(149, 186, 44, 44, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-30 01:22:29', '2020-10-30 01:22:29'),
(150, 187, 68, 68, 1.0000, 0.0000, 20.0000, 20.0000, 'fixed', 0.0000, 20.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-10-31 03:15:01', '2020-10-31 03:15:01'),
(151, 188, 43, 43, 1.0000, 0.0000, 45.0000, 45.0000, 'fixed', 0.0000, 45.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-01 02:44:15', '2020-11-01 02:44:15'),
(152, 189, 40, 40, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-03 21:59:21', '2020-11-03 21:59:21'),
(153, 189, 97, 97, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-03 21:59:21', '2020-11-03 21:59:21'),
(157, 191, 37, 37, 1.0000, 0.0000, 25.0000, 25.0000, 'fixed', 0.0000, 25.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-03 23:45:04', '2020-11-03 23:45:04'),
(158, 191, 95, 95, 3.0000, 0.0000, 7.0000, 7.0000, 'fixed', 0.0000, 7.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-03 23:45:04', '2020-11-03 23:45:04'),
(159, 191, 44, 44, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-03 23:45:04', '2020-11-03 23:45:04'),
(160, 192, 57, 57, 1.0000, 0.0000, 20.0000, 20.0000, 'fixed', 0.0000, 20.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-05 14:55:25', '2020-11-05 14:55:25'),
(161, 193, 42, 42, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-06 03:55:05', '2020-11-06 03:55:05'),
(162, 194, 76, 76, 1.0000, 0.0000, 35.0000, 20.0000, 'fixed', 15.0000, 20.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-06 03:56:29', '2020-11-06 03:56:29'),
(163, 195, 66, 66, 1.0000, 0.0000, 30.0000, 30.0000, 'fixed', 0.0000, 30.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-06 04:08:00', '2020-11-06 04:08:00'),
(164, 195, 55, 55, 1.0000, 0.0000, 15.0000, 13.0000, 'fixed', 2.0000, 13.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-06 04:08:00', '2020-11-06 04:08:00'),
(165, 196, 63, 63, 1.0000, 0.0000, 25.0000, 25.0000, 'fixed', 0.0000, 25.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-06 18:06:56', '2020-11-06 18:06:56'),
(166, 197, 42, 42, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-07 00:01:59', '2020-11-07 00:01:59'),
(167, 197, 79, 79, 1.0000, 0.0000, 40.0000, 40.0000, 'fixed', 0.0000, 40.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-07 00:01:59', '2020-11-07 00:01:59'),
(168, 197, 63, 63, 1.0000, 0.0000, 25.0000, 20.0000, 'fixed', 5.0000, 20.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-07 00:01:59', '2020-11-07 00:01:59'),
(169, 198, 42, 42, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-07 00:34:18', '2020-11-07 00:34:18'),
(170, 199, 42, 42, 1.0000, 0.0000, 50.0000, 40.0000, 'fixed', 10.0000, 40.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-07 04:14:37', '2020-11-07 04:14:37'),
(171, 199, 40, 40, 2.0000, 0.0000, 50.0000, 40.0000, 'fixed', 10.0000, 40.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-07 04:14:37', '2020-11-07 04:14:37'),
(172, 200, 65, 65, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-08 00:21:22', '2020-11-08 00:21:22'),
(175, 202, 48, 48, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-09 00:09:01', '2020-11-09 00:09:01'),
(176, 203, 42, 42, 1.0000, 0.0000, 50.0000, 30.0000, 'fixed', 20.0000, 30.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-09 22:21:58', '2020-11-09 22:21:58'),
(177, 204, 40, 40, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-10 23:58:34', '2020-11-10 23:58:34'),
(178, 205, 65, 65, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-11 00:38:31', '2020-11-11 00:38:31'),
(179, 206, 42, 42, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-11 03:10:55', '2020-11-11 03:10:55'),
(180, 207, 42, 42, 2.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-12 21:41:06', '2020-11-12 21:41:06'),
(183, 210, 73, 73, 1.0000, 0.0000, 16.0000, 16.0000, 'fixed', 0.0000, 16.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-13 23:18:00', '2020-11-13 23:18:00'),
(186, 213, 46, 46, 13.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-14 01:21:43', '2020-11-14 01:21:43'),
(202, 226, 39, 39, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-17 00:43:14', '2020-11-17 00:43:14'),
(203, 227, 65, 65, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-17 00:55:01', '2020-11-17 00:55:01'),
(204, 228, 64, 64, 1.0000, 0.0000, 5.0000, 5.0000, 'fixed', 0.0000, 5.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-17 00:55:51', '2020-11-17 00:55:51'),
(205, 229, 84, 84, 1.0000, 0.0000, 35.0000, 35.0000, 'fixed', 0.0000, 35.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-17 02:23:23', '2020-11-17 02:23:23'),
(206, 230, 84, 84, 1.0000, 0.0000, 35.0000, 35.0000, 'fixed', 0.0000, 35.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-17 02:30:38', '2020-11-17 02:30:38'),
(207, 231, 84, 84, 1.0000, 0.0000, 35.0000, 35.0000, 'fixed', 0.0000, 35.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-17 02:31:54', '2020-11-17 02:31:54'),
(208, 232, 65, 65, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-17 03:55:46', '2020-11-17 03:55:46'),
(210, 239, 95, 95, 2.0000, 0.0000, 7.0000, 7.0000, 'fixed', 0.0000, 7.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-20 22:01:01', '2020-11-20 22:01:01'),
(211, 240, 75, 75, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-21 01:37:26', '2020-11-21 01:37:26'),
(212, 241, 42, 42, 2.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-21 23:35:02', '2020-11-21 23:35:02'),
(213, 242, 98, 98, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-23 01:09:09', '2020-11-23 01:09:09'),
(214, 242, 46, 46, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-23 01:09:09', '2020-11-23 01:09:09'),
(215, 242, 48, 48, 6.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-23 01:09:09', '2020-11-23 01:09:09'),
(216, 243, 40, 40, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-23 16:51:31', '2020-11-23 16:51:31'),
(217, 244, 63, 63, 2.0000, 0.0000, 25.0000, 25.0000, 'fixed', 0.0000, 25.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-23 17:31:51', '2020-11-23 17:31:51'),
(218, 244, 65, 65, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-23 17:31:51', '2020-11-23 17:31:51'),
(219, 244, 39, 39, 2.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-23 17:31:51', '2020-11-23 17:31:51'),
(220, 244, 42, 42, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-23 17:31:51', '2020-11-23 17:31:51'),
(221, 245, 63, 63, 1.0000, 0.0000, 25.0000, 25.0000, 'fixed', 0.0000, 25.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-23 22:49:11', '2020-11-23 22:49:11'),
(222, 246, 39, 39, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-24 02:21:20', '2020-11-24 02:21:20'),
(223, 247, 42, 42, 2.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-24 02:22:11', '2020-11-24 02:22:11'),
(224, 248, 106, 106, 1.0000, 0.0000, 95.0000, 95.0000, 'fixed', 0.0000, 95.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(225, 248, 44, 44, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(226, 248, 70, 70, 1.0000, 0.0000, 30.0000, 30.0000, 'fixed', 0.0000, 30.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(227, 248, 95, 95, 2.0000, 0.0000, 7.0000, 7.0000, 'fixed', 0.0000, 7.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(228, 248, 53, 53, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(229, 249, 106, 106, 1.0000, 0.0000, 95.0000, 95.0000, 'fixed', 0.0000, 95.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-24 17:03:04', '2020-11-24 17:03:04'),
(232, 251, 41, 41, 1.0000, 0.0000, 45.0000, 45.0000, 'fixed', 0.0000, 45.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-25 22:14:33', '2020-11-25 22:14:33'),
(233, 252, 82, 82, 3.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-26 00:09:24', '2020-11-26 00:09:24'),
(234, 252, 53, 53, 4.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-26 00:09:24', '2020-11-26 00:09:24'),
(235, 253, 55, 55, 5.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-26 01:11:47', '2020-11-26 01:11:47'),
(236, 253, 49, 49, 5.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-26 01:11:47', '2020-11-26 01:11:47'),
(237, 254, 95, 95, 1.0000, 0.0000, 7.0000, 7.0000, 'fixed', 0.0000, 7.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-26 01:15:35', '2020-11-26 01:15:35'),
(238, 255, 40, 40, 1.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-26 02:45:18', '2020-11-26 02:45:18'),
(239, 256, 65, 65, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-26 02:46:52', '2020-11-26 02:46:52'),
(240, 257, 77, 77, 3.0000, 0.0000, 50.0000, 50.0000, 'fixed', 0.0000, 50.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-26 22:21:25', '2020-11-26 22:21:25'),
(241, 257, 72, 72, 3.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-26 22:21:25', '2020-11-26 22:21:25'),
(242, 257, 97, 97, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-26 22:21:25', '2020-11-26 22:21:25'),
(243, 258, 74, 74, 1.0000, 0.0000, 10.0000, 10.0000, 'fixed', 0.0000, 10.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-27 01:04:19', '2020-11-27 01:04:19'),
(244, 259, 107, 107, 2.0000, 0.0000, 110.0000, 110.0000, 'fixed', 0.0000, 110.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-27 21:40:52', '2020-11-27 21:40:52'),
(245, 260, 52, 52, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-27 21:48:32', '2020-11-27 21:48:32'),
(246, 260, 48, 48, 1.0000, 0.0000, 15.0000, 15.0000, 'fixed', 0.0000, 15.0000, 0.0000, NULL, NULL, NULL, '', NULL, NULL, NULL, '', NULL, '2020-11-27 21:48:32', '2020-11-27 21:48:32');

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

--
-- Table structure for table `transaction_sell_lines_purchase_lines`
--

CREATE TABLE `transaction_sell_lines_purchase_lines` (
  `id` int(10) UNSIGNED NOT NULL,
  `sell_line_id` int(10) UNSIGNED DEFAULT NULL COMMENT 'id from transaction_sell_lines',
  `stock_adjustment_line_id` int(10) UNSIGNED DEFAULT NULL COMMENT 'id from stock_adjustment_lines',
  `purchase_line_id` int(10) UNSIGNED NOT NULL COMMENT 'id from purchase_lines',
  `quantity` decimal(22,4) NOT NULL,
  `qty_returned` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transaction_sell_lines_purchase_lines`
--

INSERT INTO `transaction_sell_lines_purchase_lines` (`id`, `sell_line_id`, `stock_adjustment_line_id`, `purchase_line_id`, `quantity`, `qty_returned`, `created_at`, `updated_at`) VALUES
(107, 115, NULL, 46, 6.0000, 0.0000, '2020-10-19 16:28:09', '2020-10-19 16:28:09'),
(108, 116, NULL, 39, 6.0000, 0.0000, '2020-10-19 16:28:09', '2020-10-19 16:28:09'),
(109, 117, NULL, 31, 1.0000, 0.0000, '2020-10-19 16:31:38', '2020-10-19 16:31:38'),
(110, 118, NULL, 30, 2.0000, 0.0000, '2020-10-19 16:31:38', '2020-10-19 16:31:38'),
(111, 119, NULL, 46, 2.0000, 0.0000, '2020-10-19 16:33:48', '2020-10-19 16:33:48'),
(112, 120, NULL, 39, 2.0000, 0.0000, '2020-10-19 16:33:48', '2020-10-19 16:33:48'),
(113, 121, NULL, 57, 2.0000, 0.0000, '2020-10-19 16:34:59', '2020-10-19 16:34:59'),
(114, 122, NULL, 90, 4.0000, 0.0000, '2020-10-19 16:37:23', '2020-10-19 16:37:23'),
(115, 123, NULL, 53, 1.0000, 0.0000, '2020-10-19 16:38:44', '2020-10-19 16:38:44'),
(116, 124, NULL, 52, 1.0000, 0.0000, '2020-10-23 00:24:00', '2020-10-23 00:24:00'),
(117, 125, NULL, 56, 1.0000, 0.0000, '2020-10-23 20:56:09', '2020-10-23 20:56:09'),
(118, 126, NULL, 53, 1.0000, 0.0000, '2020-10-23 21:10:10', '2020-10-23 21:10:10'),
(120, 128, NULL, 35, 6.0000, 0.0000, '2020-10-23 22:50:43', '2020-10-23 22:50:43'),
(121, 129, NULL, 44, 1.0000, 0.0000, '2020-10-23 22:59:21', '2020-10-23 22:59:21'),
(122, 130, NULL, 44, 1.0000, 0.0000, '2020-10-23 23:01:52', '2020-10-23 23:01:52'),
(123, 131, NULL, 44, 1.0000, 0.0000, '2020-10-23 23:02:22', '2020-10-23 23:02:22'),
(124, 132, NULL, 79, 2.0000, 0.0000, '2020-10-24 22:21:36', '2020-10-24 22:21:36'),
(125, 133, NULL, 43, 10.0000, 0.0000, '2020-10-25 20:45:16', '2020-10-25 20:45:16'),
(126, 134, NULL, 35, 20.0000, 0.0000, '2020-10-25 20:45:16', '2020-10-25 20:45:16'),
(127, 135, NULL, 55, 1.0000, 0.0000, '2020-10-28 00:15:40', '2020-10-28 00:15:40'),
(128, 136, NULL, 54, 1.0000, 0.0000, '2020-10-28 00:15:40', '2020-10-28 00:15:40'),
(129, 137, NULL, 53, 1.0000, 0.0000, '2020-10-28 00:15:40', '2020-10-28 00:15:40'),
(132, 140, NULL, 34, 2.0000, 0.0000, '2020-10-28 02:42:07', '2020-10-28 02:42:07'),
(133, 141, NULL, 44, 2.0000, 0.0000, '2020-10-28 02:42:07', '2020-10-28 02:42:07'),
(134, 142, NULL, 55, 5.0000, 0.0000, '2020-10-29 00:01:46', '2020-10-29 00:01:46'),
(135, 143, NULL, 86, 1.0000, 0.0000, '2020-10-29 02:38:58', '2020-10-29 02:38:58'),
(136, 144, NULL, 52, 3.0000, 0.0000, '2020-10-29 02:38:58', '2020-10-29 02:38:58'),
(137, 145, NULL, 33, 1.0000, 0.0000, '2020-10-29 02:38:58', '2020-10-29 02:38:58'),
(140, 148, NULL, 33, 1.0000, 0.0000, '2020-10-30 01:22:29', '2020-10-30 01:22:29'),
(141, 149, NULL, 35, 1.0000, 0.0000, '2020-10-30 01:22:29', '2020-10-30 01:22:29'),
(142, 150, NULL, 59, 1.0000, 0.0000, '2020-10-31 03:15:01', '2020-10-31 03:15:01'),
(143, 151, NULL, 34, 1.0000, 0.0000, '2020-11-01 02:44:15', '2020-11-01 02:44:15'),
(144, 152, NULL, 31, 1.0000, 0.0000, '2020-11-03 21:59:21', '2020-11-03 21:59:21'),
(145, 153, NULL, 88, 1.0000, 0.0000, '2020-11-03 21:59:21', '2020-11-03 21:59:21'),
(149, 157, NULL, 28, 1.0000, 0.0000, '2020-11-03 23:45:04', '2020-11-03 23:45:04'),
(150, 158, NULL, 86, 3.0000, 0.0000, '2020-11-03 23:45:04', '2020-11-03 23:45:04'),
(151, 159, NULL, 35, 1.0000, 0.0000, '2020-11-03 23:45:04', '2020-11-03 23:45:04'),
(152, 160, NULL, 48, 1.0000, 0.0000, '2020-11-05 14:55:25', '2020-11-05 14:55:25'),
(153, 161, NULL, 33, 1.0000, 0.0000, '2020-11-06 03:55:05', '2020-11-06 03:55:05'),
(154, 162, NULL, 67, 1.0000, 0.0000, '2020-11-06 03:56:29', '2020-11-06 03:56:29'),
(155, 163, NULL, 57, 1.0000, 0.0000, '2020-11-06 04:08:00', '2020-11-06 04:08:00'),
(156, 164, NULL, 46, 1.0000, 0.0000, '2020-11-06 04:08:00', '2020-11-06 04:08:00'),
(157, 165, NULL, 54, 1.0000, 0.0000, '2020-11-06 18:06:56', '2020-11-06 18:06:56'),
(158, 166, NULL, 33, 1.0000, 0.0000, '2020-11-07 00:01:59', '2020-11-07 00:01:59'),
(159, 167, NULL, 70, 1.0000, 0.0000, '2020-11-07 00:01:59', '2020-11-07 00:01:59'),
(160, 168, NULL, 54, 1.0000, 0.0000, '2020-11-07 00:01:59', '2020-11-07 00:01:59'),
(161, 169, NULL, 33, 1.0000, 0.0000, '2020-11-07 00:34:18', '2020-11-07 00:34:18'),
(162, 170, NULL, 33, 1.0000, 0.0000, '2020-11-07 04:14:37', '2020-11-07 04:14:37'),
(163, 171, NULL, 31, 2.0000, 0.0000, '2020-11-07 04:14:37', '2020-11-07 04:14:37'),
(164, 172, NULL, 56, 1.0000, 0.0000, '2020-11-08 00:21:22', '2020-11-08 00:21:22'),
(167, 175, NULL, 38, 1.0000, 0.0000, '2020-11-09 00:09:01', '2020-11-09 00:09:01'),
(168, 176, NULL, 33, 1.0000, 0.0000, '2020-11-09 22:21:58', '2020-11-09 22:21:58'),
(169, 177, NULL, 31, 1.0000, 0.0000, '2020-11-10 23:58:34', '2020-11-10 23:58:34'),
(170, 178, NULL, 56, 1.0000, 0.0000, '2020-11-11 00:38:31', '2020-11-11 00:38:31'),
(171, 179, NULL, 33, 1.0000, 0.0000, '2020-11-11 03:10:55', '2020-11-11 03:10:55'),
(172, 180, NULL, 33, 2.0000, 0.0000, '2020-11-12 21:41:06', '2020-11-12 21:41:06'),
(175, 183, NULL, 64, 1.0000, 0.0000, '2020-11-13 23:18:00', '2020-11-13 23:18:00'),
(178, 186, NULL, 37, 13.0000, 0.0000, '2020-11-14 01:21:43', '2020-11-14 01:21:43'),
(194, 202, NULL, 30, 1.0000, 0.0000, '2020-11-17 00:43:14', '2020-11-17 00:43:14'),
(195, 207, NULL, 75, 1.0000, 0.0000, '2020-11-17 02:31:54', '2020-11-17 02:31:54'),
(196, 208, NULL, 56, 1.0000, 0.0000, '2020-11-17 03:55:46', '2020-11-17 03:55:46'),
(198, 210, NULL, 86, 2.0000, 0.0000, '2020-11-20 22:01:01', '2020-11-20 22:01:01'),
(199, 211, NULL, 66, 1.0000, 0.0000, '2020-11-21 01:37:26', '2020-11-21 01:37:26'),
(200, 212, NULL, 33, 2.0000, 0.0000, '2020-11-21 23:35:02', '2020-11-21 23:35:02'),
(201, 213, NULL, 89, 1.0000, 0.0000, '2020-11-23 01:09:09', '2020-11-23 01:09:09'),
(202, 214, NULL, 37, 1.0000, 0.0000, '2020-11-23 01:09:09', '2020-11-23 01:09:09'),
(203, 215, NULL, 38, 6.0000, 0.0000, '2020-11-23 01:09:09', '2020-11-23 01:09:09'),
(204, 216, NULL, 31, 1.0000, 0.0000, '2020-11-23 16:51:31', '2020-11-23 16:51:31'),
(205, 217, NULL, 54, 2.0000, 0.0000, '2020-11-23 17:31:51', '2020-11-23 17:31:51'),
(206, 218, NULL, 56, 1.0000, 0.0000, '2020-11-23 17:31:51', '2020-11-23 17:31:51'),
(207, 219, NULL, 30, 2.0000, 0.0000, '2020-11-23 17:31:51', '2020-11-23 17:31:51'),
(208, 220, NULL, 33, 1.0000, 0.0000, '2020-11-23 17:31:51', '2020-11-23 17:31:51'),
(209, 221, NULL, 54, 1.0000, 0.0000, '2020-11-23 22:49:11', '2020-11-23 22:49:11'),
(210, 222, NULL, 30, 1.0000, 0.0000, '2020-11-24 02:21:20', '2020-11-24 02:21:20'),
(211, 223, NULL, 33, 2.0000, 0.0000, '2020-11-24 02:22:11', '2020-11-24 02:22:11'),
(212, 224, NULL, 96, 1.0000, 0.0000, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(213, 225, NULL, 35, 1.0000, 0.0000, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(214, 226, NULL, 61, 1.0000, 0.0000, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(215, 227, NULL, 86, 2.0000, 0.0000, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(216, 228, NULL, 44, 1.0000, 0.0000, '2020-11-24 03:11:03', '2020-11-24 03:11:03'),
(217, 229, NULL, 96, 1.0000, 0.0000, '2020-11-24 17:03:04', '2020-11-24 17:03:04'),
(220, 232, NULL, 32, 1.0000, 0.0000, '2020-11-25 22:14:33', '2020-11-25 22:14:33'),
(221, 233, NULL, 73, 3.0000, 0.0000, '2020-11-26 00:09:24', '2020-11-26 00:09:24'),
(222, 234, NULL, 44, 4.0000, 0.0000, '2020-11-26 00:09:24', '2020-11-26 00:09:24'),
(223, 235, NULL, 46, 5.0000, 0.0000, '2020-11-26 01:11:47', '2020-11-26 01:11:47'),
(224, 236, NULL, 39, 5.0000, 0.0000, '2020-11-26 01:11:47', '2020-11-26 01:11:47'),
(225, 237, NULL, 86, 1.0000, 0.0000, '2020-11-26 01:15:35', '2020-11-26 01:15:35'),
(226, 238, NULL, 31, 1.0000, 0.0000, '2020-11-26 02:45:18', '2020-11-26 02:45:18'),
(227, 239, NULL, 56, 1.0000, 0.0000, '2020-11-26 02:46:52', '2020-11-26 02:46:52'),
(228, 240, NULL, 68, 3.0000, 0.0000, '2020-11-26 22:21:25', '2020-11-26 22:21:25'),
(229, 241, NULL, 63, 3.0000, 0.0000, '2020-11-26 22:21:25', '2020-11-26 22:21:25'),
(230, 242, NULL, 88, 1.0000, 0.0000, '2020-11-26 22:21:25', '2020-11-26 22:21:25'),
(231, 243, NULL, 65, 1.0000, 0.0000, '2020-11-27 01:04:19', '2020-11-27 01:04:19'),
(232, 244, NULL, 97, 2.0000, 0.0000, '2020-11-27 21:40:52', '2020-11-27 21:40:52'),
(233, 245, NULL, 43, 1.0000, 0.0000, '2020-11-27 21:48:32', '2020-11-27 21:48:32'),
(234, 246, NULL, 38, 1.0000, 0.0000, '2020-11-27 21:48:32', '2020-11-27 21:48:32');

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

--
-- Table structure for table `types_of_services`
--

CREATE TABLE `types_of_services` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `business_id` int(11) NOT NULL,
  `location_price_group` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `packing_charge` decimal(22,4) DEFAULT NULL,
  `packing_charge_type` enum('fixed','percent') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enable_custom_fields` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `units`
--

CREATE TABLE `units` (
  `id` int(10) UNSIGNED NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `actual_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `short_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `allow_decimal` tinyint(1) NOT NULL,
  `base_unit_id` int(11) DEFAULT NULL,
  `base_unit_multiplier` decimal(20,4) DEFAULT NULL,
  `created_by` int(10) UNSIGNED NOT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `units`
--

INSERT INTO `units` (`id`, `business_id`, `actual_name`, `short_name`, `allow_decimal`, `base_unit_id`, `base_unit_multiplier`, `created_by`, `deleted_at`, `created_at`, `updated_at`) VALUES
(1, 1, 'Pieces', 'Pc(s)', 0, NULL, NULL, 1, NULL, '2020-10-07 03:13:48', '2020-10-07 03:13:48'),
(2, 1, 'غرام', 'غ', 1, NULL, NULL, 2, NULL, '2020-10-10 23:26:23', '2020-10-10 23:26:23'),
(3, 1, 'كيلوغرام', 'كغ', 1, NULL, NULL, 2, NULL, '2020-10-10 23:26:39', '2020-10-10 23:26:39');

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

--
-- Table structure for table `user_contact_access`
--

CREATE TABLE `user_contact_access` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `contact_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `variations`
--

CREATE TABLE `variations` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `sub_sku` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_variation_id` int(10) UNSIGNED NOT NULL,
  `variation_value_id` int(11) DEFAULT NULL,
  `default_purchase_price` decimal(22,4) DEFAULT NULL,
  `dpp_inc_tax` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `profit_percent` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `default_sell_price` decimal(22,4) DEFAULT NULL,
  `sell_price_inc_tax` decimal(22,4) DEFAULT NULL COMMENT 'Sell price including tax',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `combo_variations` text COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Contains the combo variation details'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `variations`
--

INSERT INTO `variations` (`id`, `name`, `product_id`, `sub_sku`, `product_variation_id`, `variation_value_id`, `default_purchase_price`, `dpp_inc_tax`, `profit_percent`, `default_sell_price`, `sell_price_inc_tax`, `created_at`, `updated_at`, `deleted_at`, `combo_variations`) VALUES
(3, 'DUMMY', 3, '0003', 3, NULL, 45.0000, 45.0000, 166.6700, 120.0000, 120.0000, '2020-10-10 23:47:05', '2020-10-11 21:21:07', NULL, '[]'),
(4, 'DUMMY', 4, '0004', 4, NULL, 19.0000, 19.0000, 163.1600, 50.0000, 50.0000, '2020-10-11 20:42:43', '2020-10-11 21:27:06', NULL, '[]'),
(9, 'DUMMY', 9, '0009', 9, NULL, 20.0000, 20.0000, 150.0000, 50.0000, 50.0000, '2020-10-15 01:00:59', '2020-10-16 03:54:54', NULL, '[]'),
(16, 'DUMMY', 16, '0016', 16, NULL, 0.0100, 0.0100, 160.0000, 0.0300, 0.0300, '2020-10-15 05:02:36', '2020-10-15 08:10:34', NULL, '[]'),
(17, 'DUMMY', 17, '0017', 17, NULL, 0.0300, 0.0300, 116.6667, 0.0650, 0.0650, '2020-10-15 08:18:22', '2020-10-16 01:44:46', NULL, '[]'),
(18, 'DUMMY', 18, '0018', 18, NULL, 0.0300, 0.0300, 110.5300, 0.0600, 0.0600, '2020-10-15 08:33:02', '2020-10-15 08:41:03', NULL, '[]'),
(20, 'DUMMY', 20, '0020', 20, NULL, 0.0340, 0.0300, 135.2900, 0.0800, 0.0800, '2020-10-15 08:46:00', '2020-10-15 08:46:00', NULL, '[]'),
(21, 'DUMMY', 21, '0021', 21, NULL, 0.0550, 0.0600, 118.1800, 0.1200, 0.1200, '2020-10-15 08:49:22', '2020-10-15 08:49:22', NULL, '[]'),
(22, 'DUMMY', 22, '0022', 22, NULL, 0.0500, 0.0500, 0.0000, 0.0500, 0.0500, '2020-10-16 01:18:12', '2020-10-16 01:22:42', NULL, '[]'),
(23, 'DUMMY', 23, '0023', 23, NULL, 0.0300, 0.0300, 83.3300, 0.0550, 0.0600, '2020-10-16 01:43:59', '2020-10-16 01:43:59', NULL, '[]'),
(24, 'DUMMY', 24, '0024', 24, NULL, 0.0180, 0.0180, 100.0000, 0.0360, 0.0360, '2020-10-16 02:11:15', '2020-10-16 04:29:16', NULL, '[]'),
(26, 'DUMMY', 26, '0026', 26, NULL, 10.0000, 10.0000, 150.0000, 25.0000, 25.0000, '2020-10-16 03:51:40', '2020-10-16 03:56:05', NULL, '[]'),
(27, 'DUMMY', 27, '0027', 27, NULL, 5.0000, 5.0000, 200.0000, 15.0000, 15.0000, '2020-10-16 03:57:54', '2020-10-16 03:57:54', NULL, '[]'),
(28, 'DUMMY', 28, '0028', 28, NULL, 11.2500, 11.2500, 166.6667, 30.0000, 30.0000, '2020-10-16 04:10:48', '2020-10-16 04:10:48', NULL, '[]'),
(29, 'DUMMY', 29, '0029', 29, NULL, 22.5000, 22.5000, 166.6667, 60.0000, 60.0000, '2020-10-16 04:11:39', '2020-10-16 04:11:39', NULL, '[]'),
(30, 'DUMMY', 30, '0030', 30, NULL, 0.0300, 0.0300, 100.0000, 0.0600, 0.0600, '2020-10-16 04:19:47', '2020-10-16 04:19:47', NULL, '[]'),
(31, 'DUMMY', 31, '0031', 31, NULL, 0.0300, 0.0300, 83.3333, 0.0550, 0.0550, '2020-10-16 04:24:46', '2020-10-16 04:25:27', NULL, '[]'),
(32, 'DUMMY', 32, '0032', 32, NULL, 0.0100, 0.0100, 260.0000, 0.0360, 0.0360, '2020-10-16 04:27:51', '2020-10-16 04:27:51', NULL, '[]'),
(33, 'DUMMY', 33, '0033', 33, NULL, 0.0400, 0.0400, 112.5000, 0.0850, 0.0850, '2020-10-16 04:32:39', '2020-10-16 04:35:04', NULL, '[]'),
(34, 'DUMMY', 34, '0034', 34, NULL, 0.0090, 0.0090, 122.2222, 0.0200, 0.0200, '2020-10-16 04:42:39', '2020-10-16 04:42:39', NULL, '[]'),
(36, 'DUMMY', 36, '0036', 36, NULL, 23.0000, 23.0000, 117.3900, 50.0000, 50.0000, '2020-10-17 20:53:25', '2020-10-22 01:22:55', NULL, '[]'),
(37, 'DUMMY', 37, '0037', 37, NULL, 16.0000, 16.0000, 87.5000, 30.0000, 30.0000, '2020-10-17 21:21:33', '2020-11-04 01:51:14', NULL, '[]'),
(38, 'DUMMY', 38, '0038', 38, NULL, 23.0000, 23.0000, 117.3900, 50.0000, 50.0000, '2020-10-17 21:32:30', '2020-10-22 01:28:07', NULL, '[]'),
(39, 'DUMMY', 39, '0039', 39, NULL, 28.5000, 28.5000, 75.4400, 50.0000, 50.0000, '2020-10-17 21:47:03', '2020-10-18 00:32:39', NULL, '[]'),
(40, 'DUMMY', 40, '0040', 40, NULL, 26.6600, 26.6600, 87.5500, 50.0000, 50.0000, '2020-10-17 21:56:45', '2020-10-24 23:35:21', NULL, '[]'),
(41, 'DUMMY', 41, '0041', 41, NULL, 25.0000, 25.0000, 80.0000, 45.0000, 45.0000, '2020-10-17 22:00:44', '2020-10-24 23:42:49', NULL, '[]'),
(42, 'DUMMY', 42, '0042', 42, NULL, 25.0000, 25.0000, 100.0000, 50.0000, 50.0000, '2020-10-17 22:39:38', '2020-10-17 22:39:38', NULL, '[]'),
(43, 'DUMMY', 43, '0043', 43, NULL, 23.3000, 23.3000, 93.1300, 45.0000, 45.0000, '2020-10-17 23:42:59', '2020-10-25 00:08:59', NULL, '[]'),
(44, 'DUMMY', 44, '0050', 44, NULL, 7.5000, 7.5000, 100.0000, 15.0000, 15.0000, '2020-10-18 00:29:49', '2020-10-18 00:29:49', NULL, '[]'),
(45, 'DUMMY', 45, '0045', 45, NULL, 7.5000, 7.5000, 100.0000, 15.0000, 15.0000, '2020-10-18 00:54:52', '2020-10-18 00:54:52', NULL, '[]'),
(46, 'DUMMY', 46, '0046', 46, NULL, 7.0000, 7.0000, 114.2900, 15.0000, 15.0000, '2020-10-18 01:01:03', '2020-10-18 01:01:03', NULL, '[]'),
(48, 'DUMMY', 48, '0048', 48, NULL, 7.0000, 7.0000, 114.2900, 15.0000, 15.0000, '2020-10-18 01:16:02', '2020-10-18 01:16:02', NULL, '[]'),
(49, 'DUMMY', 49, '0049', 49, NULL, 5.0000, 5.0000, 100.0000, 10.0000, 10.0000, '2020-10-18 01:23:51', '2020-10-18 01:23:51', NULL, '[]'),
(51, 'DUMMY', 51, '0051', 51, NULL, 6.0000, 6.0000, 66.6700, 10.0000, 10.0000, '2020-10-18 01:36:31', '2020-10-18 01:36:31', NULL, '[]'),
(52, 'DUMMY', 52, '0052', 52, NULL, 11.0000, 11.0000, 36.3600, 15.0000, 15.0000, '2020-10-18 01:43:34', '2020-10-18 01:43:34', NULL, '[]'),
(53, 'DUMMY', 53, '0053', 53, NULL, 11.0000, 11.0000, 36.3600, 15.0000, 15.0000, '2020-10-18 01:50:43', '2020-10-18 01:50:43', NULL, '[]'),
(54, 'DUMMY', 54, '0054', 54, NULL, 8.2500, 8.2500, 81.8200, 15.0000, 15.0000, '2020-10-18 01:57:40', '2020-10-18 01:57:40', NULL, '[]'),
(55, 'DUMMY', 55, '0055', 55, NULL, 6.7500, 6.7500, 122.2200, 15.0000, 15.0000, '2020-10-18 02:03:19', '2020-10-18 02:03:19', NULL, '[]'),
(56, 'DUMMY', 56, '0056', 56, NULL, 3.3300, 3.3300, 200.3000, 10.0000, 10.0000, '2020-10-18 15:09:28', '2020-10-18 15:09:28', NULL, '[]'),
(57, 'DUMMY', 57, '0057', 57, NULL, 6.5000, 6.5000, 207.6900, 20.0000, 20.0000, '2020-10-18 15:23:39', '2020-10-21 00:06:53', NULL, '[]'),
(58, 'DUMMY', 58, '0058', 58, NULL, 3.7500, 3.7500, 113.3300, 8.0000, 8.0000, '2020-10-18 15:36:08', '2020-10-18 15:36:08', NULL, '[]'),
(59, 'DUMMY', 59, '0059', 59, NULL, 4.5000, 4.5000, 233.3300, 15.0000, 15.0000, '2020-10-18 15:43:57', '2020-10-18 15:43:57', NULL, '[]'),
(60, 'DUMMY', 60, '0060', 60, NULL, 3.0000, 3.0000, 166.6700, 8.0000, 8.0000, '2020-10-18 15:57:57', '2020-10-18 15:57:57', NULL, '[]'),
(61, 'DUMMY', 61, '0061', 61, NULL, 4.0000, 4.0000, 150.0000, 10.0000, 10.0000, '2020-10-18 16:06:46', '2020-10-18 16:06:46', NULL, '[]'),
(62, 'DUMMY', 62, '0062', 62, NULL, 5.7000, 5.7000, 163.1600, 15.0000, 15.0000, '2020-10-18 16:13:46', '2020-10-18 16:13:46', NULL, '[]'),
(63, 'DUMMY', 63, '0063', 63, NULL, 5.5000, 5.5000, 354.5500, 25.0000, 25.0000, '2020-10-18 16:33:33', '2020-10-21 02:15:57', NULL, '[]'),
(64, 'DUMMY', 64, '0064', 64, NULL, 1.7000, 1.7000, 194.1200, 5.0000, 5.0000, '2020-10-18 16:52:11', '2020-10-18 16:52:11', NULL, '[]'),
(65, 'DUMMY', 65, '0065', 65, NULL, 2.5000, 2.5000, 300.0000, 10.0000, 10.0000, '2020-10-18 16:59:46', '2020-10-18 16:59:46', NULL, '[]'),
(66, 'DUMMY', 66, '0066', 66, NULL, 15.0000, 15.0000, 100.0000, 30.0000, 30.0000, '2020-10-18 17:16:35', '2020-10-18 17:16:35', NULL, '[]'),
(67, 'DUMMY', 67, '0067', 67, NULL, 20.0000, 20.0000, 100.0000, 40.0000, 40.0000, '2020-10-18 17:31:15', '2020-10-18 17:31:15', NULL, '[]'),
(68, 'DUMMY', 68, '0068', 68, NULL, 9.0000, 9.0000, 122.2200, 20.0000, 20.0000, '2020-10-18 17:41:00', '2020-10-19 01:40:37', NULL, '[]'),
(69, 'DUMMY', 69, '0069', 69, NULL, 5.0000, 5.0000, 100.0000, 10.0000, 10.0000, '2020-10-18 17:47:22', '2020-11-21 02:12:12', NULL, '[]'),
(70, 'DUMMY', 70, '0070', 70, NULL, 17.0000, 17.0000, 76.4700, 30.0000, 30.0000, '2020-10-18 17:55:37', '2020-10-18 17:55:37', NULL, '[]'),
(71, 'DUMMY', 71, '0071', 71, NULL, 2.0000, 2.0000, 150.0000, 5.0000, 5.0000, '2020-10-18 18:05:48', '2020-10-18 18:05:48', NULL, '[]'),
(72, 'DUMMY', 72, '0072', 72, NULL, 4.6000, 4.6000, 117.3900, 10.0000, 10.0000, '2020-10-18 18:11:35', '2020-10-18 21:47:35', NULL, '[]'),
(73, 'DUMMY', 73, '0073', 73, NULL, 4.6600, 4.6600, 243.3500, 16.0000, 16.0000, '2020-10-18 18:18:55', '2020-10-18 18:18:55', NULL, '[]'),
(74, 'DUMMY', 74, '0074', 74, NULL, 4.5000, 4.5000, 122.2200, 10.0000, 10.0000, '2020-10-18 20:35:53', '2020-10-18 20:35:53', NULL, '[]'),
(75, 'DUMMY', 75, '0075', 75, NULL, 4.0000, 4.0000, 150.0000, 10.0000, 10.0000, '2020-10-18 20:43:54', '2020-11-21 02:15:19', NULL, '[]'),
(76, 'DUMMY', 76, '0076', 76, NULL, 14.2000, 14.2000, 146.4800, 35.0000, 35.0000, '2020-10-18 21:00:01', '2020-10-25 22:57:10', NULL, '[]'),
(77, 'DUMMY', 77, '0077', 77, NULL, 25.0000, 25.0000, 100.0000, 50.0000, 50.0000, '2020-10-18 21:16:39', '2020-10-25 23:04:16', NULL, '[]'),
(78, 'DUMMY', 78, '0078', 78, NULL, 2.5000, 2.5000, 100.0000, 5.0000, 5.0000, '2020-10-18 21:31:49', '2020-10-18 21:31:49', NULL, '[]'),
(79, 'DUMMY', 79, '0079', 79, NULL, 15.0000, 15.0000, 166.6700, 40.0000, 40.0000, '2020-10-18 22:01:23', '2020-10-22 22:46:40', NULL, '[]'),
(80, 'DUMMY', 80, '0080', 80, NULL, 23.3300, 23.3300, 71.4500, 40.0000, 40.0000, '2020-10-18 22:20:47', '2020-10-18 22:20:47', NULL, '[]'),
(81, 'DUMMY', 81, '0081', 81, NULL, 12.5000, 12.5000, 60.0000, 20.0000, 20.0000, '2020-10-18 22:32:08', '2020-10-18 22:32:08', NULL, '[]'),
(82, 'DUMMY', 82, '0082', 82, NULL, 9.1165, 9.1200, 64.5400, 15.0000, 15.0000, '2020-10-18 22:47:07', '2020-10-18 22:47:07', NULL, '[]'),
(83, 'DUMMY', 83, '0083', 83, NULL, 13.3500, 13.3500, 124.7200, 30.0000, 30.0000, '2020-10-18 23:04:40', '2020-10-18 23:04:40', NULL, '[]'),
(84, 'DUMMY', 84, '0084', 84, NULL, 7.5000, 7.5000, 366.6700, 35.0000, 35.0000, '2020-10-19 00:35:32', '2020-11-17 02:20:28', NULL, '[]'),
(85, 'DUMMY', 85, '0085', 85, NULL, 4.5000, 4.5000, 233.3300, 15.0000, 15.0000, '2020-10-19 00:42:06', '2020-10-19 00:42:06', NULL, '[]'),
(86, 'DUMMY', 86, '0086', 86, NULL, 15.0000, 15.0000, 100.0000, 30.0000, 30.0000, '2020-10-19 00:49:34', '2020-10-19 00:49:34', NULL, '[]'),
(87, 'DUMMY', 87, '0087', 87, NULL, 8.0000, 8.0000, 87.5000, 15.0000, 15.0000, '2020-10-19 01:51:59', '2020-10-19 01:51:59', NULL, '[]'),
(88, 'DUMMY', 88, '0088', 88, NULL, 21.0000, 21.0000, 42.8600, 30.0000, 30.0000, '2020-10-19 01:58:13', '2020-10-19 01:58:13', NULL, '[]'),
(90, 'DUMMY', 90, '0090', 90, NULL, 13.0000, 13.0000, 92.3100, 25.0000, 25.0000, '2020-10-19 02:06:09', '2020-10-19 02:06:09', NULL, '[]'),
(92, 'DUMMY', 92, '0092', 92, NULL, 13.3400, 13.3400, 49.9300, 20.0000, 20.0000, '2020-10-19 02:25:49', '2020-10-19 02:25:49', NULL, '[]'),
(93, 'DUMMY', 93, '0093', 93, NULL, 31.6600, 31.6600, 73.7200, 55.0000, 55.0000, '2020-10-19 02:31:41', '2020-10-19 02:31:41', NULL, '[]'),
(94, 'DUMMY', 94, '0094', 94, NULL, 22.5000, 22.5000, 55.5600, 35.0000, 35.0000, '2020-10-19 02:39:00', '2020-10-19 02:39:00', NULL, '[]'),
(95, 'DUMMY', 95, '0095', 95, NULL, 2.7500, 2.7500, 154.5500, 7.0000, 7.0000, '2020-10-19 02:58:11', '2020-10-19 02:58:11', NULL, '[]'),
(96, 'DUMMY', 96, '0096', 96, NULL, 6.0000, 6.0000, 66.6700, 10.0000, 10.0000, '2020-10-19 03:05:43', '2020-10-19 03:05:43', NULL, '[]'),
(97, 'DUMMY', 97, '0097', 97, NULL, 4.0000, 4.0000, 150.0000, 10.0000, 10.0000, '2020-10-19 03:09:07', '2020-10-19 03:09:07', NULL, '[]'),
(98, 'DUMMY', 98, '0098', 98, NULL, 32.5000, 32.5000, 53.8500, 50.0000, 50.0000, '2020-10-19 03:15:33', '2020-10-22 14:24:24', NULL, '[]'),
(99, 'DUMMY', 99, '0099', 99, NULL, 3.7500, 3.7500, 86.6700, 7.0000, 7.0000, '2020-10-19 03:18:56', '2020-10-19 03:18:56', NULL, '[]'),
(100, 'DUMMY', 100, '0100', 100, NULL, 6.6600, 6.6600, 50.1500, 10.0000, 10.0000, '2020-10-19 03:21:36', '2020-10-19 03:21:36', NULL, '[]'),
(101, 'DUMMY', 101, '0101', 101, NULL, 7.9100, 7.9100, 152.8400, 20.0000, 20.0000, '2020-10-21 22:12:17', '2020-10-21 22:19:10', NULL, '[]'),
(102, 'DUMMY', 102, '0102', 102, NULL, 5.7500, 5.7500, 73.9100, 10.0000, 10.0000, '2020-10-23 22:23:09', '2020-10-23 22:32:12', NULL, '[]'),
(103, 'DUMMY', 103, '0103', 103, NULL, 7.5000, 7.5000, 166.6700, 20.0000, 20.0000, '2020-10-31 21:54:48', '2020-10-31 21:54:48', NULL, '[]'),
(104, 'DUMMY', 104, '0104', 104, NULL, 50.0000, 50.0000, 90.0000, 95.0000, 95.0000, '2020-11-17 17:38:11', '2020-11-17 17:45:03', NULL, '[]'),
(105, 'DUMMY', 105, '0105', 105, NULL, 50.0000, 50.0000, 90.0000, 95.0000, 95.0000, '2020-11-17 17:51:45', '2020-11-17 17:51:45', NULL, '[]'),
(106, 'DUMMY', 106, '0106', 106, NULL, 50.0000, 50.0000, 90.0000, 95.0000, 95.0000, '2020-11-17 17:58:54', '2020-11-17 17:58:54', NULL, '[]'),
(107, 'DUMMY', 107, '0107', 107, NULL, 50.0000, 50.0000, 120.0000, 110.0000, 110.0000, '2020-11-17 18:04:26', '2020-11-17 18:04:26', NULL, '[]'),
(108, 'DUMMY', 108, '0108', 108, NULL, 20.0000, 20.0000, 200.0000, 60.0000, 60.0000, '2020-11-17 18:08:50', '2020-11-17 18:08:50', NULL, '[]'),
(109, 'DUMMY', 109, '0109', 109, NULL, 24.0000, 24.0000, 275.0000, 90.0000, 90.0000, '2020-11-28 16:52:25', '2020-11-28 16:52:25', NULL, '[]');

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

--
-- Table structure for table `variation_group_prices`
--

CREATE TABLE `variation_group_prices` (
  `id` int(10) UNSIGNED NOT NULL,
  `variation_id` int(10) UNSIGNED NOT NULL,
  `price_group_id` int(10) UNSIGNED NOT NULL,
  `price_inc_tax` decimal(22,4) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `variation_location_details`
--

CREATE TABLE `variation_location_details` (
  `id` int(10) UNSIGNED NOT NULL,
  `product_id` int(10) UNSIGNED NOT NULL,
  `product_variation_id` int(10) UNSIGNED NOT NULL COMMENT 'id from product_variations table',
  `variation_id` int(10) UNSIGNED NOT NULL,
  `location_id` int(10) UNSIGNED NOT NULL,
  `qty_available` decimal(22,4) NOT NULL DEFAULT 0.0000,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `variation_location_details`
--

INSERT INTO `variation_location_details` (`id`, `product_id`, `product_variation_id`, `variation_id`, `location_id`, `qty_available`, `created_at`, `updated_at`) VALUES
(2, 3, 3, 3, 2, 50.0000, '2020-10-10 23:48:30', '2020-10-17 21:11:06'),
(3, 4, 4, 4, 2, 15.0000, '2020-10-11 21:07:44', '2020-10-17 21:11:06'),
(4, 16, 16, 16, 2, 10000.0000, '2020-10-15 05:05:58', '2020-10-17 21:11:06'),
(5, 9, 9, 9, 2, 13.0000, '2020-10-15 05:08:13', '2020-10-17 21:11:06'),
(6, 17, 17, 17, 2, 10000.0000, '2020-10-15 08:18:50', '2020-10-16 01:57:55'),
(7, 18, 18, 18, 2, 10000.0000, '2020-10-15 08:33:59', '2020-10-17 21:09:54'),
(9, 20, 20, 20, 2, 1000.0000, '2020-10-15 08:47:05', '2020-10-15 18:52:20'),
(10, 21, 21, 21, 2, 10000.0000, '2020-10-15 08:50:12', '2020-10-15 19:18:22'),
(11, 22, 22, 22, 2, 10000.0000, '2020-10-16 01:22:53', '2020-10-16 01:22:53'),
(12, 23, 23, 23, 2, 10000.0000, '2020-10-16 01:44:07', '2020-10-16 01:50:56'),
(13, 24, 24, 24, 2, 10000.0000, '2020-10-16 02:11:28', '2020-10-16 02:11:28'),
(15, 26, 26, 26, 2, 10.0000, '2020-10-16 03:52:02', '2020-10-16 03:52:02'),
(16, 27, 27, 27, 2, 10.0000, '2020-10-16 04:04:21', '2020-10-16 04:04:21'),
(17, 28, 28, 28, 2, 10.0000, '2020-10-16 04:10:57', '2020-10-16 04:10:57'),
(18, 29, 29, 29, 2, 10.0000, '2020-10-16 04:11:45', '2020-10-16 04:11:45'),
(19, 30, 30, 30, 2, 10000.0000, '2020-10-16 04:19:58', '2020-10-16 04:19:58'),
(20, 31, 31, 31, 2, 10000.0000, '2020-10-16 04:25:35', '2020-10-16 04:25:35'),
(21, 32, 32, 32, 2, 10000.0000, '2020-10-16 04:27:57', '2020-10-16 04:27:57'),
(22, 33, 33, 33, 2, 10000.0000, '2020-10-16 04:32:50', '2020-10-17 21:10:41'),
(23, 34, 34, 34, 2, 10000.0000, '2020-10-16 04:42:48', '2020-10-16 04:42:48'),
(25, 36, 36, 36, 3, 380.0000, '2020-10-17 20:53:42', '2020-11-13 02:06:40'),
(26, 37, 37, 37, 3, 199.0000, '2020-10-17 21:21:56', '2020-11-03 23:45:04'),
(27, 38, 38, 38, 3, 400.0000, '2020-10-17 21:33:05', '2020-10-18 00:26:32'),
(28, 39, 39, 39, 3, 30.0000, '2020-10-17 21:47:50', '2020-11-25 03:01:57'),
(29, 40, 40, 40, 3, 17.0000, '2020-10-17 21:57:10', '2020-11-26 02:45:18'),
(30, 41, 41, 41, 3, 11.0000, '2020-10-17 22:01:01', '2020-11-25 22:14:33'),
(31, 42, 42, 42, 3, 21.0000, '2020-10-17 22:39:53', '2020-11-24 02:22:11'),
(32, 43, 43, 43, 3, 9.0000, '2020-10-17 23:43:19', '2020-11-01 02:44:15'),
(33, 44, 44, 44, 3, 259.0000, '2020-10-18 00:30:01', '2020-11-24 03:11:03'),
(34, 45, 45, 45, 3, 144.0000, '2020-10-18 00:55:22', '2020-10-23 21:25:19'),
(35, 46, 46, 46, 3, 274.0000, '2020-10-18 01:01:44', '2020-11-23 01:09:09'),
(36, 48, 48, 48, 3, 184.0000, '2020-10-18 01:17:33', '2020-11-27 21:48:32'),
(37, 49, 49, 49, 3, 179.0000, '2020-10-18 01:24:58', '2020-11-26 01:11:47'),
(39, 51, 51, 51, 3, 144.0000, '2020-10-18 01:36:48', '2020-10-18 01:36:48'),
(40, 52, 52, 52, 3, 385.0000, '2020-10-18 01:44:31', '2020-11-27 21:48:32'),
(41, 53, 53, 53, 3, 386.0000, '2020-10-18 01:51:12', '2020-11-26 00:09:24'),
(42, 54, 54, 54, 3, 144.0000, '2020-10-18 01:57:54', '2020-10-18 01:57:54'),
(43, 55, 55, 55, 3, 130.0000, '2020-10-18 02:03:38', '2020-11-26 01:11:47'),
(44, 56, 56, 56, 3, 12.0000, '2020-10-18 15:09:58', '2020-10-18 15:09:58'),
(45, 57, 57, 57, 3, 11.0000, '2020-10-18 15:23:57', '2020-11-05 14:55:25'),
(46, 58, 58, 58, 3, 12.0000, '2020-10-18 15:36:20', '2020-10-18 15:36:20'),
(47, 59, 59, 59, 3, 24.0000, '2020-10-18 15:44:15', '2020-11-14 04:23:36'),
(48, 60, 60, 60, 3, 24.0000, '2020-10-18 15:58:08', '2020-10-18 15:58:08'),
(49, 61, 61, 61, 3, 20.0000, '2020-10-18 16:07:01', '2020-11-25 03:01:57'),
(50, 62, 62, 62, 3, 9.0000, '2020-10-18 16:14:00', '2020-10-28 00:15:40'),
(51, 63, 63, 63, 3, 46.0000, '2020-10-18 16:34:25', '2020-11-23 22:49:11'),
(52, 64, 64, 64, 3, 30.0000, '2020-10-18 16:52:30', '2020-11-14 04:27:49'),
(53, 65, 65, 65, 3, 6.0000, '2020-10-18 17:00:01', '2020-11-26 02:46:52'),
(54, 66, 66, 66, 3, 21.0000, '2020-10-18 17:17:43', '2020-11-06 04:08:00'),
(55, 67, 67, 67, 3, 12.0000, '2020-10-18 17:32:04', '2020-10-18 17:32:04'),
(56, 68, 68, 68, 3, 19.0000, '2020-10-18 17:41:16', '2020-10-31 03:15:01'),
(57, 69, 69, 69, 3, 24.0000, '2020-10-18 17:47:46', '2020-10-24 16:21:10'),
(58, 70, 70, 70, 3, 5.0000, '2020-10-18 17:55:50', '2020-11-24 03:11:03'),
(59, 71, 71, 71, 3, 12.0000, '2020-10-18 18:06:08', '2020-10-18 18:06:08'),
(60, 72, 72, 72, 3, 45.0000, '2020-10-18 18:11:52', '2020-11-26 22:21:25'),
(61, 73, 73, 73, 3, 11.0000, '2020-10-18 18:19:29', '2020-11-13 23:18:00'),
(62, 74, 74, 74, 3, 11.0000, '2020-10-18 20:36:09', '2020-11-27 01:04:19'),
(63, 75, 75, 75, 3, 35.0000, '2020-10-18 20:44:12', '2020-11-21 02:16:34'),
(64, 76, 76, 76, 3, 11.0000, '2020-10-18 21:00:18', '2020-11-06 03:56:29'),
(65, 77, 77, 77, 3, 9.0000, '2020-10-18 21:16:49', '2020-11-26 22:21:25'),
(66, 78, 78, 78, 3, 8.0000, '2020-10-18 21:32:01', '2020-10-18 21:32:01'),
(67, 79, 79, 79, 3, 11.0000, '2020-10-18 22:01:34', '2020-11-07 00:01:59'),
(68, 80, 80, 80, 3, 12.0000, '2020-10-18 22:21:02', '2020-10-18 22:21:02'),
(69, 81, 81, 81, 3, 12.0000, '2020-10-18 22:32:19', '2020-10-18 22:32:19'),
(70, 82, 82, 82, 3, 9.0000, '2020-10-18 22:47:18', '2020-11-26 00:09:24'),
(71, 83, 83, 83, 3, 12.0000, '2020-10-18 23:04:51', '2020-10-18 23:04:51'),
(72, 84, 84, 84, 3, 11.0000, '2020-10-19 00:35:44', '2020-11-17 02:31:54'),
(73, 85, 85, 85, 3, 20.0000, '2020-10-19 00:42:23', '2020-10-19 00:42:23'),
(74, 86, 86, 86, 3, 10.0000, '2020-10-19 00:49:48', '2020-10-19 00:49:48'),
(75, 87, 87, 87, 3, 6.0000, '2020-10-19 01:52:14', '2020-10-19 01:52:14'),
(76, 88, 88, 88, 3, 4.0000, '2020-10-19 01:58:31', '2020-10-24 22:21:36'),
(78, 90, 90, 90, 3, 6.0000, '2020-10-19 02:06:27', '2020-10-19 02:06:27'),
(80, 92, 92, 92, 3, 6.0000, '2020-10-19 02:26:00', '2020-10-19 02:26:00'),
(81, 93, 93, 93, 3, 6.0000, '2020-10-19 02:31:56', '2020-10-19 02:31:56'),
(82, 94, 94, 94, 3, 6.0000, '2020-10-19 02:39:08', '2020-10-19 02:39:08'),
(83, 95, 95, 95, 3, 46.0000, '2020-10-19 02:58:31', '2020-11-26 01:15:35'),
(84, 96, 96, 96, 3, 20.0000, '2020-10-19 03:05:55', '2020-10-19 03:05:55'),
(85, 97, 97, 97, 3, 46.0000, '2020-10-19 03:09:30', '2020-11-26 22:21:25'),
(86, 98, 98, 98, 3, 10.0000, '2020-10-19 03:15:44', '2020-11-23 01:09:09'),
(87, 99, 99, 99, 3, 20.0000, '2020-10-19 03:19:16', '2020-10-19 16:37:23'),
(88, 100, 100, 100, 3, 12.0000, '2020-10-19 03:21:50', '2020-10-19 03:21:50'),
(89, 101, 101, 101, 3, 12.0000, '2020-10-21 22:19:25', '2020-10-21 22:19:25'),
(90, 102, 102, 102, 3, 48.0000, '2020-10-23 22:33:07', '2020-10-23 22:33:07'),
(91, 104, 104, 104, 3, 15.0000, '2020-11-17 17:38:59', '2020-11-17 17:38:59'),
(92, 105, 105, 105, 3, 10.0000, '2020-11-17 17:52:26', '2020-11-17 17:52:26'),
(93, 106, 106, 106, 3, 13.0000, '2020-11-17 17:59:20', '2020-11-24 17:03:04'),
(94, 107, 107, 107, 3, 8.0000, '2020-11-17 18:04:45', '2020-11-27 21:40:52'),
(95, 108, 108, 108, 3, 10.0000, '2020-11-17 18:09:06', '2020-11-17 18:09:06'),
(96, 109, 109, 109, 3, 10.0000, '2020-11-28 16:52:41', '2020-11-28 16:52:41');

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

--
-- Table structure for table `variation_templates`
--

CREATE TABLE `variation_templates` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `variation_value_templates`
--

CREATE TABLE `variation_value_templates` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `variation_template_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

CREATE TABLE `warranties` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `business_id` int(11) NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `duration` int(11) NOT NULL,
  `duration_type` enum('days','months','years') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `account_transactions`
--
ALTER TABLE `account_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_transactions_account_id_index` (`account_id`),
  ADD KEY `account_transactions_transaction_id_index` (`transaction_id`),
  ADD KEY `account_transactions_transaction_payment_id_index` (`transaction_payment_id`),
  ADD KEY `account_transactions_transfer_transaction_id_index` (`transfer_transaction_id`),
  ADD KEY `account_transactions_created_by_index` (`created_by`);

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

--
-- Indexes for table `activity_log`
--
ALTER TABLE `activity_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `activity_log_log_name_index` (`log_name`);

--
-- Indexes for table `barcodes`
--
ALTER TABLE `barcodes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `barcodes_business_id_foreign` (`business_id`);

--
-- Indexes for table `bookings`
--
ALTER TABLE `bookings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bookings_contact_id_foreign` (`contact_id`),
  ADD KEY `bookings_business_id_foreign` (`business_id`),
  ADD KEY `bookings_created_by_foreign` (`created_by`),
  ADD KEY `bookings_table_id_index` (`table_id`),
  ADD KEY `bookings_waiter_id_index` (`waiter_id`),
  ADD KEY `bookings_location_id_index` (`location_id`),
  ADD KEY `bookings_booking_status_index` (`booking_status`);

--
-- Indexes for table `brands`
--
ALTER TABLE `brands`
  ADD PRIMARY KEY (`id`),
  ADD KEY `brands_business_id_foreign` (`business_id`),
  ADD KEY `brands_created_by_foreign` (`created_by`);

--
-- Indexes for table `business`
--
ALTER TABLE `business`
  ADD PRIMARY KEY (`id`),
  ADD KEY `business_owner_id_foreign` (`owner_id`),
  ADD KEY `business_currency_id_foreign` (`currency_id`),
  ADD KEY `business_default_sales_tax_foreign` (`default_sales_tax`);

--
-- Indexes for table `business_locations`
--
ALTER TABLE `business_locations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `business_locations_business_id_index` (`business_id`),
  ADD KEY `business_locations_invoice_scheme_id_foreign` (`invoice_scheme_id`),
  ADD KEY `business_locations_invoice_layout_id_foreign` (`invoice_layout_id`);

--
-- Indexes for table `cash_registers`
--
ALTER TABLE `cash_registers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cash_registers_business_id_foreign` (`business_id`),
  ADD KEY `cash_registers_user_id_foreign` (`user_id`),
  ADD KEY `cash_registers_location_id_index` (`location_id`);

--
-- Indexes for table `cash_register_transactions`
--
ALTER TABLE `cash_register_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cash_register_transactions_cash_register_id_foreign` (`cash_register_id`),
  ADD KEY `cash_register_transactions_transaction_id_index` (`transaction_id`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `categories_business_id_foreign` (`business_id`),
  ADD KEY `categories_created_by_foreign` (`created_by`);

--
-- Indexes for table `categorizables`
--
ALTER TABLE `categorizables`
  ADD KEY `categorizables_categorizable_type_categorizable_id_index` (`categorizable_type`,`categorizable_id`);

--
-- Indexes for table `contacts`
--
ALTER TABLE `contacts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `contacts_business_id_foreign` (`business_id`),
  ADD KEY `contacts_created_by_foreign` (`created_by`),
  ADD KEY `contacts_type_index` (`type`),
  ADD KEY `contacts_contact_status_index` (`contact_status`);

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

--
-- Indexes for table `customer_groups`
--
ALTER TABLE `customer_groups`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_groups_business_id_foreign` (`business_id`);

--
-- Indexes for table `dashboard_configurations`
--
ALTER TABLE `dashboard_configurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `dashboard_configurations_business_id_foreign` (`business_id`);

--
-- Indexes for table `discounts`
--
ALTER TABLE `discounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `discounts_business_id_index` (`business_id`),
  ADD KEY `discounts_brand_id_index` (`brand_id`),
  ADD KEY `discounts_category_id_index` (`category_id`),
  ADD KEY `discounts_location_id_index` (`location_id`),
  ADD KEY `discounts_priority_index` (`priority`);

--
-- Indexes for table `document_and_notes`
--
ALTER TABLE `document_and_notes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `document_and_notes_business_id_index` (`business_id`),
  ADD KEY `document_and_notes_notable_id_index` (`notable_id`),
  ADD KEY `document_and_notes_created_by_index` (`created_by`);

--
-- Indexes for table `expense_categories`
--
ALTER TABLE `expense_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `expense_categories_business_id_foreign` (`business_id`);

--
-- Indexes for table `group_sub_taxes`
--
ALTER TABLE `group_sub_taxes`
  ADD KEY `group_sub_taxes_group_tax_id_foreign` (`group_tax_id`),
  ADD KEY `group_sub_taxes_tax_id_foreign` (`tax_id`);

--
-- Indexes for table `invoice_layouts`
--
ALTER TABLE `invoice_layouts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoice_layouts_business_id_foreign` (`business_id`);

--
-- Indexes for table `invoice_schemes`
--
ALTER TABLE `invoice_schemes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoice_schemes_business_id_foreign` (`business_id`);

--
-- Indexes for table `media`
--
ALTER TABLE `media`
  ADD PRIMARY KEY (`id`),
  ADD KEY `media_model_type_model_id_index` (`model_type`,`model_id`);

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

--
-- Indexes for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  ADD KEY `model_has_permissions_model_type_model_id_index` (`model_type`,`model_id`);

--
-- Indexes for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  ADD KEY `model_has_roles_model_type_model_id_index` (`model_type`,`model_id`);

--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`);

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

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

--
-- Indexes for table `oauth_personal_access_clients`
--
ALTER TABLE `oauth_personal_access_clients`
  ADD PRIMARY KEY (`id`),
  ADD KEY `oauth_personal_access_clients_client_id_index` (`client_id`);

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

--
-- Indexes for table `printers`
--
ALTER TABLE `printers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `printers_business_id_foreign` (`business_id`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `products_brand_id_foreign` (`brand_id`),
  ADD KEY `products_category_id_foreign` (`category_id`),
  ADD KEY `products_sub_category_id_foreign` (`sub_category_id`),
  ADD KEY `products_tax_foreign` (`tax`),
  ADD KEY `products_name_index` (`name`),
  ADD KEY `products_business_id_index` (`business_id`),
  ADD KEY `products_unit_id_index` (`unit_id`),
  ADD KEY `products_created_by_index` (`created_by`),
  ADD KEY `products_warranty_id_index` (`warranty_id`);

--
-- Indexes for table `product_locations`
--
ALTER TABLE `product_locations`
  ADD KEY `product_locations_product_id_index` (`product_id`),
  ADD KEY `product_locations_location_id_index` (`location_id`);

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

--
-- Indexes for table `product_variations`
--
ALTER TABLE `product_variations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_variations_name_index` (`name`),
  ADD KEY `product_variations_product_id_index` (`product_id`);

--
-- Indexes for table `purchase_lines`
--
ALTER TABLE `purchase_lines`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchase_lines_transaction_id_foreign` (`transaction_id`),
  ADD KEY `purchase_lines_product_id_foreign` (`product_id`),
  ADD KEY `purchase_lines_variation_id_foreign` (`variation_id`),
  ADD KEY `purchase_lines_tax_id_foreign` (`tax_id`),
  ADD KEY `purchase_lines_sub_unit_id_index` (`sub_unit_id`),
  ADD KEY `purchase_lines_lot_number_index` (`lot_number`);

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

--
-- Indexes for table `res_product_modifier_sets`
--
ALTER TABLE `res_product_modifier_sets`
  ADD KEY `res_product_modifier_sets_modifier_set_id_foreign` (`modifier_set_id`);

--
-- Indexes for table `res_tables`
--
ALTER TABLE `res_tables`
  ADD PRIMARY KEY (`id`),
  ADD KEY `res_tables_business_id_foreign` (`business_id`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `roles_business_id_foreign` (`business_id`);

--
-- Indexes for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `role_has_permissions_role_id_foreign` (`role_id`);

--
-- Indexes for table `selling_price_groups`
--
ALTER TABLE `selling_price_groups`
  ADD PRIMARY KEY (`id`),
  ADD KEY `selling_price_groups_business_id_foreign` (`business_id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD UNIQUE KEY `sessions_id_unique` (`id`);

--
-- Indexes for table `stock_adjustment_lines`
--
ALTER TABLE `stock_adjustment_lines`
  ADD PRIMARY KEY (`id`),
  ADD KEY `stock_adjustment_lines_product_id_foreign` (`product_id`),
  ADD KEY `stock_adjustment_lines_variation_id_foreign` (`variation_id`),
  ADD KEY `stock_adjustment_lines_transaction_id_index` (`transaction_id`);

--
-- Indexes for table `tax_rates`
--
ALTER TABLE `tax_rates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tax_rates_business_id_foreign` (`business_id`),
  ADD KEY `tax_rates_created_by_foreign` (`created_by`);

--
-- Indexes for table `transaction_sell_lines`
--
ALTER TABLE `transaction_sell_lines`
  ADD PRIMARY KEY (`id`),
  ADD KEY `transaction_sell_lines_transaction_id_foreign` (`transaction_id`),
  ADD KEY `transaction_sell_lines_product_id_foreign` (`product_id`),
  ADD KEY `transaction_sell_lines_variation_id_foreign` (`variation_id`),
  ADD KEY `transaction_sell_lines_tax_id_foreign` (`tax_id`),
  ADD KEY `transaction_sell_lines_children_type_index` (`children_type`),
  ADD KEY `transaction_sell_lines_parent_sell_line_id_index` (`parent_sell_line_id`);

--
-- Indexes for table `transaction_sell_lines_purchase_lines`
--
ALTER TABLE `transaction_sell_lines_purchase_lines`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sell_line_id` (`sell_line_id`),
  ADD KEY `stock_adjustment_line_id` (`stock_adjustment_line_id`),
  ADD KEY `purchase_line_id` (`purchase_line_id`);

--
-- Indexes for table `types_of_services`
--
ALTER TABLE `types_of_services`
  ADD PRIMARY KEY (`id`),
  ADD KEY `types_of_services_business_id_index` (`business_id`);

--
-- Indexes for table `units`
--
ALTER TABLE `units`
  ADD PRIMARY KEY (`id`),
  ADD KEY `units_business_id_foreign` (`business_id`),
  ADD KEY `units_created_by_foreign` (`created_by`),
  ADD KEY `units_base_unit_id_index` (`base_unit_id`);

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

--
-- Indexes for table `variations`
--
ALTER TABLE `variations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `variations_product_id_foreign` (`product_id`),
  ADD KEY `variations_product_variation_id_foreign` (`product_variation_id`),
  ADD KEY `variations_name_index` (`name`),
  ADD KEY `variations_sub_sku_index` (`sub_sku`),
  ADD KEY `variations_variation_value_id_index` (`variation_value_id`);

--
-- Indexes for table `variation_group_prices`
--
ALTER TABLE `variation_group_prices`
  ADD PRIMARY KEY (`id`),
  ADD KEY `variation_group_prices_variation_id_foreign` (`variation_id`),
  ADD KEY `variation_group_prices_price_group_id_foreign` (`price_group_id`);

--
-- Indexes for table `variation_location_details`
--
ALTER TABLE `variation_location_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `variation_location_details_location_id_foreign` (`location_id`),
  ADD KEY `variation_location_details_product_id_index` (`product_id`),
  ADD KEY `variation_location_details_product_variation_id_index` (`product_variation_id`),
  ADD KEY `variation_location_details_variation_id_index` (`variation_id`);

--
-- Indexes for table `variation_templates`
--
ALTER TABLE `variation_templates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `variation_templates_business_id_foreign` (`business_id`);

--
-- Indexes for table `variation_value_templates`
--
ALTER TABLE `variation_value_templates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `variation_value_templates_name_index` (`name`),
  ADD KEY `variation_value_templates_variation_template_id_index` (`variation_template_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `accounts`
--
ALTER TABLE `accounts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `account_transactions`
--
ALTER TABLE `account_transactions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `account_types`
--
ALTER TABLE `account_types`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `activity_log`
--
ALTER TABLE `activity_log`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=161;

--
-- AUTO_INCREMENT for table `barcodes`
--
ALTER TABLE `barcodes`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `bookings`
--
ALTER TABLE `bookings`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `brands`
--
ALTER TABLE `brands`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `business`
--
ALTER TABLE `business`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `business_locations`
--
ALTER TABLE `business_locations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `cash_registers`
--
ALTER TABLE `cash_registers`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53;

--
-- AUTO_INCREMENT for table `cash_register_transactions`
--
ALTER TABLE `cash_register_transactions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=394;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `contacts`
--
ALTER TABLE `contacts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `currencies`
--
ALTER TABLE `currencies`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=142;

--
-- AUTO_INCREMENT for table `customer_groups`
--
ALTER TABLE `customer_groups`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dashboard_configurations`
--
ALTER TABLE `dashboard_configurations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `discounts`
--
ALTER TABLE `discounts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `document_and_notes`
--
ALTER TABLE `document_and_notes`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `expense_categories`
--
ALTER TABLE `expense_categories`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `invoice_layouts`
--
ALTER TABLE `invoice_layouts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `invoice_schemes`
--
ALTER TABLE `invoice_schemes`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `media`
--
ALTER TABLE `media`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=249;

--
-- AUTO_INCREMENT for table `notification_templates`
--
ALTER TABLE `notification_templates`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `oauth_personal_access_clients`
--
ALTER TABLE `oauth_personal_access_clients`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=84;

--
-- AUTO_INCREMENT for table `printers`
--
ALTER TABLE `printers`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=110;

--
-- AUTO_INCREMENT for table `product_racks`
--
ALTER TABLE `product_racks`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `product_variations`
--
ALTER TABLE `product_variations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=110;

--
-- AUTO_INCREMENT for table `purchase_lines`
--
ALTER TABLE `purchase_lines`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=100;

--
-- AUTO_INCREMENT for table `reference_counts`
--
ALTER TABLE `reference_counts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `res_tables`
--
ALTER TABLE `res_tables`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `selling_price_groups`
--
ALTER TABLE `selling_price_groups`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stock_adjustment_lines`
--
ALTER TABLE `stock_adjustment_lines`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tax_rates`
--
ALTER TABLE `tax_rates`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `transaction_sell_lines`
--
ALTER TABLE `transaction_sell_lines`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=266;

--
-- AUTO_INCREMENT for table `transaction_sell_lines_purchase_lines`
--
ALTER TABLE `transaction_sell_lines_purchase_lines`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=254;

--
-- AUTO_INCREMENT for table `types_of_services`
--
ALTER TABLE `types_of_services`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `units`
--
ALTER TABLE `units`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `user_contact_access`
--
ALTER TABLE `user_contact_access`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `variations`
--
ALTER TABLE `variations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=110;

--
-- AUTO_INCREMENT for table `variation_group_prices`
--
ALTER TABLE `variation_group_prices`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `variation_location_details`
--
ALTER TABLE `variation_location_details`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=97;

--
-- AUTO_INCREMENT for table `variation_templates`
--
ALTER TABLE `variation_templates`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `variation_value_templates`
--
ALTER TABLE `variation_value_templates`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `warranties`
--
ALTER TABLE `warranties`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `barcodes`
--
ALTER TABLE `barcodes`
  ADD CONSTRAINT `barcodes_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `bookings`
--
ALTER TABLE `bookings`
  ADD CONSTRAINT `bookings_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bookings_contact_id_foreign` FOREIGN KEY (`contact_id`) REFERENCES `contacts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bookings_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `brands`
--
ALTER TABLE `brands`
  ADD CONSTRAINT `brands_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `brands_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `business`
--
ALTER TABLE `business`
  ADD CONSTRAINT `business_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`),
  ADD CONSTRAINT `business_default_sales_tax_foreign` FOREIGN KEY (`default_sales_tax`) REFERENCES `tax_rates` (`id`),
  ADD CONSTRAINT `business_owner_id_foreign` FOREIGN KEY (`owner_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `business_locations`
--
ALTER TABLE `business_locations`
  ADD CONSTRAINT `business_locations_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `business_locations_invoice_layout_id_foreign` FOREIGN KEY (`invoice_layout_id`) REFERENCES `invoice_layouts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `business_locations_invoice_scheme_id_foreign` FOREIGN KEY (`invoice_scheme_id`) REFERENCES `invoice_schemes` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `cash_registers`
--
ALTER TABLE `cash_registers`
  ADD CONSTRAINT `cash_registers_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cash_registers_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `cash_register_transactions`
--
ALTER TABLE `cash_register_transactions`
  ADD CONSTRAINT `cash_register_transactions_cash_register_id_foreign` FOREIGN KEY (`cash_register_id`) REFERENCES `cash_registers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `categories`
--
ALTER TABLE `categories`
  ADD CONSTRAINT `categories_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `categories_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `contacts`
--
ALTER TABLE `contacts`
  ADD CONSTRAINT `contacts_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `contacts_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `customer_groups`
--
ALTER TABLE `customer_groups`
  ADD CONSTRAINT `customer_groups_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `dashboard_configurations`
--
ALTER TABLE `dashboard_configurations`
  ADD CONSTRAINT `dashboard_configurations_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `expense_categories`
--
ALTER TABLE `expense_categories`
  ADD CONSTRAINT `expense_categories_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `group_sub_taxes`
--
ALTER TABLE `group_sub_taxes`
  ADD CONSTRAINT `group_sub_taxes_group_tax_id_foreign` FOREIGN KEY (`group_tax_id`) REFERENCES `tax_rates` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `group_sub_taxes_tax_id_foreign` FOREIGN KEY (`tax_id`) REFERENCES `tax_rates` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `invoice_layouts`
--
ALTER TABLE `invoice_layouts`
  ADD CONSTRAINT `invoice_layouts_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `invoice_schemes`
--
ALTER TABLE `invoice_schemes`
  ADD CONSTRAINT `invoice_schemes_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `printers`
--
ALTER TABLE `printers`
  ADD CONSTRAINT `printers_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `products`
--
ALTER TABLE `products`
  ADD CONSTRAINT `products_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `products_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `products_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `products_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `products_sub_category_id_foreign` FOREIGN KEY (`sub_category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `products_tax_foreign` FOREIGN KEY (`tax`) REFERENCES `tax_rates` (`id`),
  ADD CONSTRAINT `products_unit_id_foreign` FOREIGN KEY (`unit_id`) REFERENCES `units` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `product_variations`
--
ALTER TABLE `product_variations`
  ADD CONSTRAINT `product_variations_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `purchase_lines`
--
ALTER TABLE `purchase_lines`
  ADD CONSTRAINT `purchase_lines_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `purchase_lines_tax_id_foreign` FOREIGN KEY (`tax_id`) REFERENCES `tax_rates` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `purchase_lines_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `purchase_lines_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `res_product_modifier_sets`
--
ALTER TABLE `res_product_modifier_sets`
  ADD CONSTRAINT `res_product_modifier_sets_modifier_set_id_foreign` FOREIGN KEY (`modifier_set_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `res_tables`
--
ALTER TABLE `res_tables`
  ADD CONSTRAINT `res_tables_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `roles`
--
ALTER TABLE `roles`
  ADD CONSTRAINT `roles_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `selling_price_groups`
--
ALTER TABLE `selling_price_groups`
  ADD CONSTRAINT `selling_price_groups_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `stock_adjustment_lines`
--
ALTER TABLE `stock_adjustment_lines`
  ADD CONSTRAINT `stock_adjustment_lines_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `stock_adjustment_lines_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `stock_adjustment_lines_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tax_rates`
--
ALTER TABLE `tax_rates`
  ADD CONSTRAINT `tax_rates_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tax_rates_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `transaction_sell_lines`
--
ALTER TABLE `transaction_sell_lines`
  ADD CONSTRAINT `transaction_sell_lines_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `transaction_sell_lines_tax_id_foreign` FOREIGN KEY (`tax_id`) REFERENCES `tax_rates` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `transaction_sell_lines_transaction_id_foreign` FOREIGN KEY (`transaction_id`) REFERENCES `transactions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `transaction_sell_lines_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `units`
--
ALTER TABLE `units`
  ADD CONSTRAINT `units_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `units_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `variations`
--
ALTER TABLE `variations`
  ADD CONSTRAINT `variations_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `variations_product_variation_id_foreign` FOREIGN KEY (`product_variation_id`) REFERENCES `product_variations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `variation_group_prices`
--
ALTER TABLE `variation_group_prices`
  ADD CONSTRAINT `variation_group_prices_price_group_id_foreign` FOREIGN KEY (`price_group_id`) REFERENCES `selling_price_groups` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `variation_group_prices_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `variation_location_details`
--
ALTER TABLE `variation_location_details`
  ADD CONSTRAINT `variation_location_details_location_id_foreign` FOREIGN KEY (`location_id`) REFERENCES `business_locations` (`id`),
  ADD CONSTRAINT `variation_location_details_variation_id_foreign` FOREIGN KEY (`variation_id`) REFERENCES `variations` (`id`);

--
-- Constraints for table `variation_templates`
--
ALTER TABLE `variation_templates`
  ADD CONSTRAINT `variation_templates_business_id_foreign` FOREIGN KEY (`business_id`) REFERENCES `business` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `variation_value_templates`
--
ALTER TABLE `variation_value_templates`
  ADD CONSTRAINT `variation_value_templates_variation_template_id_foreign` FOREIGN KEY (`variation_template_id`) REFERENCES `variation_templates` (`id`) ON DELETE CASCADE;
COMMIT;

