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

START TRANSACTION;



--
-- Database: `ringererp_new_pos`
--

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

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

CREATE TABLE `accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `account_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_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 `accounts`
--

INSERT INTO `accounts` (`id`, `account_id`, `account_name`, `description`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, 'A0001', 'Office expense', NULL, 1, '2021-12-26 03:03:23', '2021-12-26 03:03:23'),
(2, 'A0002', 'Electric Bill', 'Electricity Bill of Show Room & Office', 1, '2021-12-26 03:04:07', '2021-12-26 03:04:07'),
(3, 'A0003', 'Rent', 'Office Rent', 1, '2021-12-26 03:04:27', '2021-12-26 03:10:19'),
(5, NULL, 'Electric Bill', NULL, 1, '2022-01-20 07:13:23', '2022-01-20 07:13:23'),
(6, 'dfgh', 'gfghvgh', 'vhvj', 1, '2023-01-31 19:26:01', '2023-01-31 19:26:01');

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

--
-- Table structure for table `areas`
--

CREATE TABLE `areas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branch_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 `areas`
--

INSERT INTO `areas` (`id`, `name`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, 'Dhaka', 1, '2021-12-26 07:08:47', '2021-12-26 07:08:47'),
(2, 'Chittagong', 1, '2021-12-26 07:09:06', '2021-12-26 07:09:06'),
(3, 'Sylhet', 1, '2021-12-26 07:09:14', '2021-12-26 07:09:14');

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

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

CREATE TABLE `bank_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `account_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `initial_balance` int(11) NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `branch_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 `bank_accounts`
--

INSERT INTO `bank_accounts` (`id`, `account_name`, `account_number`, `bank_name`, `account_type`, `initial_balance`, `description`, `status`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, 'qwer', '345', 'drfgdfg', 'ert', 45, 'dfgdfgdf', 'active', 2, '2023-01-31 18:29:17', '2023-01-31 18:29:17');

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

--
-- Table structure for table `bank_transactions`
--

CREATE TABLE `bank_transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `transaction_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transaction_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` int(11) NOT NULL DEFAULT '0',
  `deposit` int(11) NOT NULL DEFAULT '0',
  `withdraw` int(11) NOT NULL DEFAULT '0',
  `saved_by` bigint(20) UNSIGNED NOT NULL,
  `branch_id` bigint(20) UNSIGNED NOT NULL,
  `bank_account_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;

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

--
-- Table structure for table `branches`
--

CREATE TABLE `branches` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` longtext COLLATE utf8mb4_unicode_ci,
  `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 `branches`
--

INSERT INTO `branches` (`id`, `name`, `title`, `address`, `created_at`, `updated_at`) VALUES
(1, 'Main Branch', 'main branch', NULL, '2021-12-19 07:43:27', '2021-12-19 07:43:27'),
(2, 'Simco Branch', 'simco branch', NULL, '2021-12-19 07:43:27', '2021-12-19 07:43:27');

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

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

CREATE TABLE `brands` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branch_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 `brands`
--

INSERT INTO `brands` (`id`, `name`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, 'Ozifa Int', 1, '2021-12-27 04:10:15', '2021-12-27 04:10:15'),
(2, 'Romantic Bird', 1, '2021-12-27 04:10:20', '2021-12-27 04:10:20'),
(3, 'UiiSii', 1, '2021-12-27 04:10:24', '2021-12-27 04:10:24'),
(4, 'A4-tech', 1, '2021-12-27 04:10:28', '2021-12-27 04:10:28'),
(5, 'Apex', 1, '2021-12-27 04:10:40', '2021-12-27 04:10:40'),
(6, 'Apple', 1, '2021-12-27 04:10:47', '2021-12-27 04:10:47');

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

--
-- Table structure for table `cash_transactions`
--

CREATE TABLE `cash_transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `transaction_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transaction_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `received_amount` int(11) DEFAULT NULL,
  `paid_amount` int(11) DEFAULT NULL,
  `branch_id` bigint(20) UNSIGNED NOT NULL,
  `saved_by` 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 `cash_transactions`
--

INSERT INTO `cash_transactions` (`id`, `transaction_id`, `transaction_type`, `account_name`, `date`, `description`, `received_amount`, `paid_amount`, `branch_id`, `saved_by`, `created_at`, `updated_at`) VALUES
(1, '121212', 'recieve', 'Electric Bill', '2023-02-15', 'sdsdsd', 121, 0, 1, 1, '2023-01-31 18:27:14', '2023-01-31 18:27:14');

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

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

CREATE TABLE `categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branch_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 `categories`
--

INSERT INTO `categories` (`id`, `name`, `description`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, 'Aator Corner', 'Sunnah Corner', 1, '2021-12-26 07:43:21', '2021-12-26 07:43:21'),
(2, 'Baby Section', 'Baby Section', 1, '2021-12-26 07:43:28', '2021-12-26 07:43:28'),
(3, 'Cameras Section', 'Photo Graph Section', 1, '2021-12-26 07:43:39', '2021-12-26 07:43:39');

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

--
-- Table structure for table `cheque_entries`
--

CREATE TABLE `cheque_entries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `bank_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cheque_amount` int(11) DEFAULT NULL,
  `cheque_status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cheque_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reminder_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `submit_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_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;

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

--
-- Table structure for table `corporate_quotations`
--

CREATE TABLE `corporate_quotations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `toInformation` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dear` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `termsCondition` varchar(255) 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 `corporate_quotations`
--

INSERT INTO `corporate_quotations` (`id`, `branch_id`, `customer_id`, `user_id`, `employee_id`, `invoice_id`, `invoice_no`, `total_amount`, `toInformation`, `subject`, `dear`, `termsCondition`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, NULL, 26, '220000011', NULL, 'Adena,Dhaka,0171111', 'sdfsdf', 'Hello', 'fdfsdf', '2023-01-31 16:44:01', '2023-01-31 16:44:01');

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

--
-- Table structure for table `corporate_quotation_details`
--

CREATE TABLE `corporate_quotation_details` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` bigint(20) UNSIGNED NOT NULL,
  `invoice_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `corporationQuotation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `unit` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `brand` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `qty` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `rate` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `remarks` varchar(255) 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 `corporate_quotation_details`
--

INSERT INTO `corporate_quotation_details` (`id`, `branch_id`, `invoice_id`, `customer_id`, `corporationQuotation_id`, `description`, `unit`, `brand`, `qty`, `rate`, `total`, `remarks`, `created_at`, `updated_at`) VALUES
(1, 1, 26, 1, 1, 'desc', 'KG', '1', '2', '3', '6', 'hjkhjk', '2023-01-31 16:44:01', '2023-01-31 16:44:01');

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

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

CREATE TABLE `customers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_person` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` longtext COLLATE utf8mb4_unicode_ci,
  `area` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dob` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `marriage` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mobile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `office_phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `previous_due` int(11) DEFAULT NULL,
  `credit_limit` int(11) DEFAULT NULL,
  `branch_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 `customers`
--

INSERT INTO `customers` (`id`, `customer_id`, `customer_name`, `customer_type`, `contact_person`, `address`, `area`, `dob`, `marriage`, `mobile`, `office_phone`, `image`, `previous_due`, `credit_limit`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, 'cus-001', 'Adena', 'wholesale', 'Miriam', 'Steel', 'Dhaka', '1986-07-18', '2012-09-13', '0171111', 'jifuzyc', NULL, 30, 66, 1, '2021-12-27 03:19:35', '2021-12-27 03:19:35'),
(3, 'cus-003', 'aumlan', 'retail', 'abrar', 'dhaka', 'Sylhet', '2021-12-03', '2021-12-31', '014444', '017557757', NULL, NULL, NULL, 1, '2021-12-27 03:25:49', '2021-12-27 03:32:40'),
(4, '4', 'Rezaul Hoque', 'retail', 'Raaz', 'Chittagong,cox bazar', 'Chittagong', '2022-01-21', '2022-01-30', '017898', '018251', NULL, 500, NULL, 1, '2022-01-20 01:15:55', '2023-05-15 04:41:33'),
(5, 'Urielle', 'Oren', NULL, 'Alvin', 'Gary', 'Dhaka', '2010-09-11', '1984-09-04', '10', 'tepomive', NULL, 87, 77, 1, '2023-01-31 23:36:39', '2023-01-31 23:36:39');

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

--
-- Table structure for table `customer_payments`
--

CREATE TABLE `customer_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `transaction_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transaction_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `due` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  `bank_account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `saved_by` bigint(20) UNSIGNED NOT NULL,
  `branch_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;

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

--
-- Table structure for table `damage_entries`
--

CREATE TABLE `damage_entries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `category_id` bigint(20) UNSIGNED DEFAULT NULL,
  `quantity` int(11) DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  `description` longtext COLLATE utf8mb4_unicode_ci,
  `branch_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;

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

--
-- Table structure for table `departments`
--

CREATE TABLE `departments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branch_id` bigint(20) UNSIGNED NOT NULL,
  `description` varchar(255) 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 `departments`
--

INSERT INTO `departments` (`id`, `name`, `branch_id`, `description`, `created_at`, `updated_at`) VALUES
(2, 'Cash Counter', 1, 'Cash Counter', '2021-12-23 07:20:06', '2021-12-23 07:20:06'),
(3, 'Marketing', 1, 'Marketing', '2021-12-23 07:20:14', '2021-12-23 07:20:14'),
(4, 'Driving', 1, 'Driving', '2021-12-23 07:20:21', '2021-12-23 07:20:21'),
(5, 'HR', 1, 'HR', '2023-01-31 19:10:32', '2023-01-31 19:10:32');

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

--
-- Table structure for table `designations`
--

CREATE TABLE `designations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branch_id` bigint(20) UNSIGNED NOT NULL,
  `description` varchar(255) 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 `designations`
--

INSERT INTO `designations` (`id`, `name`, `branch_id`, `description`, `created_at`, `updated_at`) VALUES
(2, 'Accountant', 1, 'Accountant', '2021-12-23 07:19:45', '2021-12-23 07:19:45'),
(3, 'Car Driver', 1, 'Car Driver', '2021-12-23 07:19:55', '2021-12-23 07:19:55'),
(4, 'Software Engineer', 1, 'Software Engineer', '2023-01-31 19:10:24', '2023-01-31 19:10:24');

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

--
-- Table structure for table `employees`
--

CREATE TABLE `employees` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `emp_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `designation` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `department` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `join_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `salary_range` int(11) DEFAULT NULL,
  `activation_status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `present_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `permanent_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `photo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fathers_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mothers_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gender` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dob` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `marital_status` varchar(255) 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 `employees`
--

INSERT INTO `employees` (`id`, `emp_id`, `name`, `designation`, `department`, `join_date`, `salary_range`, `activation_status`, `present_address`, `permanent_address`, `contact`, `email`, `photo`, `fathers_name`, `mothers_name`, `gender`, `dob`, `marital_status`, `created_at`, `updated_at`) VALUES
(1, '2000', 'Rezaul Hoque', 'Car Driver', 'Marketing', '2022-09-07', 20000, 'active', NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, '2022-09-06 13:57:17', '2022-09-06 13:57:17'),
(2, 'Courtney', 'Maya', 'Accountant', 'Cash Counter', '2018-03-19', 93, 'active', 'saxitizuto', 'fopas', 'gizoc', 'wapaxi@mailinator.com', '', 'Wallace', 'Kelsey', NULL, '1991-11-04', NULL, '2023-01-31 19:10:01', '2023-01-31 19:10:01');

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `invoices`
--

CREATE TABLE `invoices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `total_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_less` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_paid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_due` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_transport_cost` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_balance` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_return` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_discount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_vat` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_vat_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_making_charge` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_qty` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ref1` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ref2` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `s_invoice` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `s_invoice_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_trxid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cash` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mobile_banking_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mobile_banking_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mobile_banking_trx_id``` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `card_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `card_trx` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cheque_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cheque_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ins_month` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ins_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ins_down_payment` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_note` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_deadline` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` varchar(255) 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 `invoices`
--

INSERT INTO `invoices` (`id`, `invoice_no`, `invoice_date`, `type`, `status`, `branch_id`, `supplier_id`, `user_id`, `customer_id`, `employee_id`, `total_amount`, `total_less`, `total_paid`, `total_due`, `total_transport_cost`, `total_balance`, `total_return`, `total_discount`, `total_vat`, `total_vat_amount`, `total_making_charge`, `total_qty`, `ref1`, `ref2`, `barcode`, `s_invoice`, `s_invoice_date`, `payment_type`, `payment_trxid`, `cash`, `mobile_banking_type`, `mobile_banking_amount`, `mobile_banking_trx_id```, `card_amount`, `card_trx`, `cheque_amount`, `cheque_number`, `ins_month`, `ins_amount`, `ins_down_payment`, `payment_note`, `payment_deadline`, `note`, `created_at`, `updated_at`) VALUES
(1, '220000000', '2022-04-07', 'purchase', 'active', 1, 4, 1, NULL, NULL, '54900', NULL, '54900', '0', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2022-04-07 06:54:24', '2022-04-07 06:54:24'),
(2, '220000001', '2022-04-07', 'sale', 'active', 1, NULL, 1, 1, NULL, '71500', NULL, '71500', '0', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2022-04-07 06:56:18', '2022-04-07 06:56:18'),
(3, '220000002', '2022-04-07', 'sale', 'active', 1, NULL, 1, 3, NULL, '3200', NULL, '3200', '0', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2022-04-07 08:46:30', '2022-04-07 08:46:30'),
(4, '220000003', '2022-04-07', 'sale', 'active', 1, NULL, 1, 4, NULL, '26400', NULL, '26400', '0', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2022-04-07 08:49:57', '2022-04-07 08:49:57'),
(5, '220000004', '2022-09-06', 'purchase', 'active', 1, 3, 1, NULL, NULL, '315210', NULL, '0', '315210', '0', NULL, NULL, '0', '5', '15010', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2022-09-06 14:01:26', '2022-09-06 14:01:26'),
(6, '220000005', '2023-01-31', 'sale', 'active', 1, NULL, 1, NULL, NULL, '7', NULL, '7', '0', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:02:42', '2023-01-31 16:02:42'),
(7, '220000006', '2023-01-31', 'sale', 'active', 1, NULL, 1, 1, NULL, '8400', NULL, '0', '8400', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Note', '2023-01-31 16:05:54', '2023-01-31 16:05:54'),
(8, '220000007', '2023-01-31', 'service', 'active', 1, NULL, 1, 1, NULL, '7000', NULL, '0', '7000', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Qwerty', '2023-01-31 16:06:34', '2023-01-31 16:06:34'),
(9, '220000007', '2023-01-31', 'service', 'active', 1, NULL, 1, 1, NULL, '7000', NULL, '0', '7000', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Qwerty', '2023-01-31 16:06:43', '2023-01-31 16:06:43'),
(10, '220000007', '2023-01-31', 'service', 'active', 1, NULL, 1, 1, NULL, '7000', NULL, '0', '7000', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Qwerty', '2023-01-31 16:06:52', '2023-01-31 16:06:52'),
(11, '220000008', '2023-01-31', 'sale', 'active', 1, NULL, 1, 1, NULL, '2100', NULL, '0', '2100', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:07:27', '2023-01-31 16:07:27'),
(12, '220000009', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:10:38', '2023-01-31 16:10:38'),
(13, '220000009', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:11:04', '2023-01-31 16:11:04'),
(14, '220000010', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:17:44', '2023-01-31 16:17:44'),
(15, '220000010', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:21:31', '2023-01-31 16:21:31'),
(16, '220000010', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:21:43', '2023-01-31 16:21:43'),
(17, '220000010', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:27:42', '2023-01-31 16:27:42'),
(18, '220000010', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:28:25', '2023-01-31 16:28:25'),
(19, '220000010', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:34:55', '2023-01-31 16:34:55'),
(20, '220000010', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:35:16', '2023-01-31 16:35:16'),
(21, '220000010', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:35:30', '2023-01-31 16:35:30'),
(22, '220000010', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:35:42', '2023-01-31 16:35:42'),
(23, '220000010', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:35:55', '2023-01-31 16:35:55'),
(24, '220000011', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:38:11', '2023-01-31 16:38:11'),
(25, '220000011', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:39:31', '2023-01-31 16:39:31'),
(26, '220000011', '2023-01-31', 'corporate_quotation', 'active', NULL, NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 16:44:01', '2023-01-31 16:44:01'),
(27, '220000012', '2023-01-31', 'purchase', 'active', 1, 1, 1, NULL, NULL, '12000', NULL, '0', '12000', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'tfytf', '2023-01-31 17:56:01', '2023-01-31 17:56:01'),
(28, '220000013', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '7000', NULL, '0', '7000', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 19:20:01', '2023-01-31 19:20:01'),
(29, '220000014', '2023-01-31', 'sale', 'active', 1, NULL, 1, NULL, NULL, '6500', NULL, '0', '6500', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-01-31 20:13:31', '2023-01-31 20:13:31'),
(30, '220000015', '2023-01-10', 'sale', 'active', 1, NULL, 1, 3, 1, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 00:53:15', '2023-02-01 00:53:15'),
(31, '220000015', '2023-01-10', 'sale', 'active', 1, NULL, 1, 3, 1, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 00:53:23', '2023-02-01 00:53:23'),
(32, '220000016', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 00:56:02', '2023-02-01 00:56:02'),
(33, '220000017', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, 2, '650', NULL, '0', '650', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 00:56:44', '2023-02-01 00:56:44'),
(34, '220000018', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:00:59', '2023-02-01 01:00:59'),
(35, '220000019', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, 1, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:02:38', '2023-02-01 01:02:38'),
(36, '220000019', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, 1, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:02:42', '2023-02-01 01:02:42'),
(37, '220000019', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, 1, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:02:48', '2023-02-01 01:02:48'),
(38, '220000019', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, 1, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:03:10', '2023-02-01 01:03:10'),
(39, '220000020', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:03:39', '2023-02-01 01:03:39'),
(40, '220000021', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, 2, '650', NULL, '0', '650', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:04:56', '2023-02-01 01:04:56'),
(41, '220000022', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:10:54', '2023-02-01 01:10:54'),
(42, '220000023', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:13:13', '2023-02-01 01:13:13'),
(43, '220000024', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '650', NULL, '0', '650', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:18:19', '2023-02-01 01:18:19'),
(44, '220000025', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:19:20', '2023-02-01 01:19:20'),
(45, '220000026', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:26:51', '2023-02-01 01:26:51'),
(46, '220000027', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:30:40', '2023-02-01 01:30:40'),
(47, '220000028', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:31:46', '2023-02-01 01:31:46'),
(48, '220000029', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:32:37', '2023-02-01 01:32:37'),
(49, '220000030', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:34:01', '2023-02-01 01:34:01'),
(50, '220000031', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:35:50', '2023-02-01 01:35:50'),
(51, '220000032', '2023-01-31', 'sale', 'active', 1, NULL, 1, 3, NULL, '3250', NULL, '0', '3250', '0', NULL, NULL, '0', '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2023-02-01 01:56:02', '2023-02-01 01:56:02');

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

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

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) 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_09_11_000000_create_branches_table', 1),
(2, '2014_09_12_130040_create_roles_table', 1),
(3, '2014_09_13_000000_create_users_table', 1),
(4, '2014_10_12_100000_create_password_resets_table', 1),
(5, '2019_08_19_000000_create_failed_jobs_table', 1),
(6, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(9, '2021_12_23_093500_create_departments_table', 2),
(10, '2021_12_23_110604_create_designations_table', 2),
(11, '2021_12_23_125722_create_months_table', 3),
(12, '2021_12_23_133734_create_employees_table', 4),
(13, '2021_12_24_170330_create_salary_payments_table', 5),
(15, '2021_12_26_083912_create_accounts_table', 6),
(17, '2021_12_26_091350_create_cash_transactions_table', 7),
(19, '2021_12_26_123045_create_areas_table', 9),
(20, '2021_12_26_131708_create_units_table', 10),
(21, '2021_12_26_133811_create_categories_table', 11),
(24, '2021_12_26_142006_create_suppliers_table', 12),
(25, '2021_12_27_085434_create_customers_table', 13),
(26, '2021_12_27_100734_create_brands_table', 14),
(27, '2021_12_27_101430_create_products_table', 15),
(29, '2021_12_28_071639_create_damage_entries_table', 16),
(34, '2021_12_29_105203_create_bank_accounts_table', 19),
(35, '2021_12_29_121659_create_cheque_entries_table', 20),
(50, '2022_01_06_132058_create_invoices_table', 21),
(51, '2022_01_07_131845_create_purchases_table', 21),
(52, '2022_01_08_052752_create_purchase_products_table', 21),
(57, '2022_01_08_060839_create_sales_table', 22),
(61, '2022_01_09_074101_create_services_table', 23),
(62, '2022_01_09_074122_create_service_products_table', 23),
(63, '2022_01_08_061008_create_sale_products_table', 24),
(65, '2022_01_09_094706_create_sale_returns_table', 25),
(66, '2022_01_10_200544_create_purchase_returns_table', 26),
(67, '2021_12_26_094848_create_bank_transactions_table', 27),
(69, '2021_12_28_142442_create_customer_payments_table', 28),
(71, '2021_12_29_103127_create_supplier_payments_table', 29),
(72, '2022_01_20_064316_create_quotations_table', 30),
(73, '2022_01_20_064907_create_quotation_products_table', 30),
(74, '2022_01_20_104250_create_corporate_quotations_table', 30),
(75, '2022_01_20_104420_create_corporate_quotation_details_table', 30),
(76, '2022_01_20_142329_create_product_transfers_table', 30),
(77, '2022_01_20_142411_create_product_transfer_details_table', 30);

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

--
-- Table structure for table `months`
--

CREATE TABLE `months` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(255) 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 `months`
--

INSERT INTO `months` (`id`, `name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'January', 'January', '2021-12-23 07:03:55', '2021-12-23 07:04:35'),
(2, 'February', 'February', '2021-12-23 07:04:03', '2021-12-23 07:04:03'),
(3, 'March', 'March', '2023-01-31 19:10:50', '2023-01-31 19:10:50');

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

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

CREATE TABLE `products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `product_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `brand` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `category` bigint(20) UNSIGNED DEFAULT NULL,
  `model` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `size` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `unit` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `vat` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reorder_level` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_rate` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sales_rate` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wholesale_rate` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `isService` tinyint(1) NOT NULL DEFAULT '0',
  `branch_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 `products`
--

INSERT INTO `products` (`id`, `product_id`, `product_name`, `brand`, `category`, `model`, `size`, `unit`, `vat`, `reorder_level`, `purchase_rate`, `sales_rate`, `wholesale_rate`, `isService`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, '1001', 'Product 1', 'Romantic Bird', 1, '22mmww', NULL, 'Pcs', '5', '4', '500', '800', '700', 0, 1, '2022-01-22 09:17:54', '2022-01-22 09:17:54'),
(2, '1002', 'Product 2', 'Ozifa Int', 2, NULL, NULL, 'Piece', '2', '5', '600', '700', '650', 0, 1, '2022-01-22 09:18:34', '2022-01-22 09:18:34'),
(3, '1003', 'Vegetables', 'Ozifa Int', 1, 'Indian', '1000', 'KG', '5', NULL, '1', '1.5', '1.3', 0, 1, '2022-09-03 21:27:25', '2022-09-03 21:27:25');

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

--
-- Table structure for table `product_transfers`
--

CREATE TABLE `product_transfers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transfer_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transfer_by` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transfer_from` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transfer_to` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_quantity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` varchar(255) 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_transfer_details`
--

CREATE TABLE `product_transfer_details` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_id` bigint(20) UNSIGNED DEFAULT NULL,
  `transfer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quantity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` varchar(255) 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 `purchases`
--

CREATE TABLE `purchases` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `total_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_vat` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_vat_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_discount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_transport` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_paid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_due` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supplier_contact` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supplier_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_id` bigint(20) UNSIGNED NOT NULL,
  `note` longtext COLLATE utf8mb4_unicode_ci,
  `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 `purchases`
--

INSERT INTO `purchases` (`id`, `supplier_id`, `invoice_no`, `user_id`, `total_amount`, `sub_total`, `total_vat`, `total_vat_amount`, `total_discount`, `total_transport`, `total_paid`, `total_due`, `purchase_date`, `supplier_contact`, `supplier_address`, `barcode`, `branch_id`, `note`, `created_at`, `updated_at`) VALUES
(1, 4, '220000000', 1, '29950', '30000', '0', '0', '50', '0', '29950', '0', '2022-04-07', '01825654645', 'Chittagong,cox bazar', '', 1, NULL, '2022-04-07 01:57:52', '2022-04-07 01:57:52'),
(2, 3, '220000001', 1, '52500', '52500', '0', '0', '0', '0', '52500', '0', '2022-04-07', '0147474747', 'dhaka', '', 1, NULL, '2022-04-07 03:54:35', '2022-04-07 03:54:35'),
(3, 4, '220000002', 1, '27000', '27000', '0', '0', '0', '0', '20000', '7000', '2022-04-07', '01825654645', 'Chittagong,cox bazar', '', 1, NULL, '2022-04-07 03:56:40', '2022-04-07 03:56:40'),
(4, 3, '220000000', 1, '296000', '296100', '0', '0', '100', '0', '296000', '0', '2022-04-07', '0147474747', 'dhaka', '', 1, NULL, '2022-04-07 05:47:09', '2022-04-07 05:47:09'),
(5, 4, '220000000', 1, '54900', '54900', '0', '0', '0', '0', '54900', '0', '2022-04-07', '01825654645', 'Chittagong,cox bazar', '', 1, NULL, '2022-04-07 06:54:24', '2022-04-07 06:54:24'),
(6, 3, '220000004', 1, '315210', '300200', '5', '15010', '0', '0', '0', '315210', '2022-09-06', '0147474747', 'dhaka', '', 1, NULL, '2022-09-06 14:01:26', '2022-09-06 14:01:26'),
(7, 1, '220000012', 1, '12000', '12000', '0', '0', '0', '0', '0', '12000', '2023-01-31', '102', 'Elmo', '', 1, 'tfytf', '2023-01-31 17:56:01', '2023-01-31 17:56:01');

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

--
-- Table structure for table `purchase_products`
--

CREATE TABLE `purchase_products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `purchase_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `purchase_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_unit_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `category_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quantity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sale_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `size` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `capacity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `manufacture_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `expiry_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_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 `purchase_products`
--

INSERT INTO `purchase_products` (`id`, `purchase_date`, `product_id`, `supplier_id`, `purchase_id`, `warehouse_id`, `product_unit_id`, `product_name`, `category_id`, `invoice_no`, `quantity`, `total`, `barcode`, `purchase_price`, `sale_price`, `size`, `capacity`, `manufacture_date`, `expiry_date`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, '2022-04-07', 2, 3, 4, NULL, NULL, 'Product 2', '2', '220000000', '456', '273600', '123654', '600', '', '', '', '', '', 1, '2022-04-07 05:47:09', '2022-04-07 05:47:09'),
(2, '2022-04-07', 1, 3, 4, NULL, NULL, 'Product 1', '1', '220000000', '45', '22500', '65489', '500', '', '', '', '', '', 1, '2022-04-07 05:47:09', '2022-04-07 05:47:09'),
(3, '2022-04-07', 2, 4, 5, NULL, NULL, 'Product 2', '2', '220000000', '54', '32400', '12345678', '600', '', '', '', '', '', 1, '2022-04-07 06:54:24', '2022-04-07 06:54:24'),
(4, '2022-04-07', 1, 4, 5, NULL, NULL, 'Product 1', '1', '220000000', '45', '22500', '87654321', '500', '', '', '', '', '', 1, '2022-04-07 06:54:24', '2022-04-07 06:54:24'),
(5, '2022-09-06', 2, 3, 6, NULL, NULL, 'Product 2', '2', '220000004', '500', '300000', '', '600', '', '', '', '', '', 1, '2022-09-06 14:01:26', '2022-09-06 14:01:26'),
(6, '2022-09-06', 3, 3, 6, NULL, NULL, 'Vegetables', '1', '220000004', '200', '200', '', '1', '', '', '', '', '', 1, '2022-09-06 14:01:26', '2022-09-06 14:01:26'),
(7, '2023-01-31', 2, 1, 7, NULL, NULL, 'Product 2', '2', '220000012', '20', '12000', '34343', '600', '', '', '', '', '', 1, '2023-01-31 17:56:01', '2023-01-31 17:56:01');

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

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

CREATE TABLE `purchase_returns` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `return_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `category_id` bigint(20) UNSIGNED DEFAULT NULL,
  `purchase_id` bigint(20) UNSIGNED DEFAULT NULL,
  `previous_invoice_id` bigint(20) UNSIGNED DEFAULT NULL,
  `previous_invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `return_quantity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `return_rate` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `return_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_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;

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

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

CREATE TABLE `quotations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_vat` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_vat_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_discount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_discount_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quotation_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_contact` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` varchar(255) 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 `quotation_products`
--

CREATE TABLE `quotation_products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `quotation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_unit_id` bigint(20) UNSIGNED DEFAULT NULL,
  `quotation_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `category_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quantity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sale_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `size` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `capacity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `manufacture_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `expiry_date` varchar(255) 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 `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) 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 `roles`
--

INSERT INTO `roles` (`id`, `name`, `slug`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'admin', '2021-12-19 07:43:27', '2021-12-19 07:43:27'),
(2, 'User', 'user', '2021-12-19 07:43:27', '2021-12-19 07:43:27'),
(3, 'Entry User', 'entry_user', '2021-12-19 07:43:27', '2021-12-19 07:43:27');

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

--
-- Table structure for table `salary_payments`
--

CREATE TABLE `salary_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `branch_id` bigint(20) UNSIGNED NOT NULL,
  `emp_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `month` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_amount` int(11) DEFAULT '0',
  `deducted_amount` int(11) 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 `salary_payments`
--

INSERT INTO `salary_payments` (`id`, `branch_id`, `emp_id`, `name`, `date`, `month`, `payment_amount`, `deducted_amount`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Rezaul Hoque', '2023-01-31', 'January', 30000, 5000, '2022-09-06 13:57:50', '2023-01-31 19:09:33');

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

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

CREATE TABLE `sales` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sale_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_vat` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_vat_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_discount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_transport` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_paid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_due` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sale_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_contact` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_id` bigint(20) UNSIGNED NOT NULL,
  `note` longtext COLLATE utf8mb4_unicode_ci,
  `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 `sales`
--

INSERT INTO `sales` (`id`, `customer_id`, `employee_id`, `user_id`, `invoice_no`, `sale_type`, `total_amount`, `sub_total`, `total_vat`, `total_vat_amount`, `total_discount`, `total_transport`, `total_paid`, `total_due`, `sale_date`, `customer_name`, `customer_contact`, `customer_address`, `barcode`, `branch_id`, `note`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 1, '220000001', NULL, '71500', '71500', '0', '0', '0', '0', '71500', '0', '2022-04-07', NULL, NULL, NULL, NULL, 1, NULL, '2022-04-07 06:56:18', '2022-04-07 06:56:18'),
(2, 3, NULL, 1, '220000002', NULL, '3200', '3200', '0', '0', '0', '0', '3200', '0', '2022-04-07', NULL, NULL, NULL, NULL, 1, NULL, '2022-04-07 08:46:30', '2022-04-07 08:46:30'),
(3, 4, NULL, 1, '220000003', NULL, '26400', '26400', '0', '0', '0', '0', '26400', '0', '2022-04-07', NULL, NULL, NULL, NULL, 1, NULL, '2022-04-07 08:49:57', '2022-04-07 08:49:57'),
(4, NULL, NULL, 1, '220000005', NULL, '7', '7', '0', '0', '0', '0', '7', '0', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-01-31 16:02:42', '2023-01-31 16:02:42'),
(5, 1, NULL, 1, '220000006', NULL, '8400', '8400', '0', '0', '0', '0', '0', '8400', '2023-01-31', NULL, NULL, NULL, NULL, 1, 'Note', '2023-01-31 16:05:54', '2023-01-31 16:05:54'),
(6, 1, NULL, 1, '220000008', NULL, '2100', '2100', '0', '0', '0', '0', '0', '2100', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-01-31 16:07:27', '2023-01-31 16:07:27'),
(7, 3, NULL, 1, '220000013', NULL, '7000', '7000', '0', '0', '0', '0', '0', '7000', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-01-31 19:20:01', '2023-01-31 19:20:01'),
(8, NULL, NULL, 1, '220000014', NULL, '6500', '6500', '0', '0', '0', '0', '0', '6500', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-01-31 20:13:31', '2023-01-31 20:13:31'),
(9, 3, 1, 1, '220000015', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-10', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 00:53:15', '2023-02-01 00:53:15'),
(10, 3, 1, 1, '220000015', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-10', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 00:53:23', '2023-02-01 00:53:23'),
(11, 3, NULL, 1, '220000016', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 00:56:02', '2023-02-01 00:56:02'),
(12, 3, 2, 1, '220000017', NULL, '650', '650', '0', '0', '0', '0', '0', '650', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 00:56:44', '2023-02-01 00:56:44'),
(13, 3, NULL, 1, '220000018', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:00:59', '2023-02-01 01:00:59'),
(14, 3, 1, 1, '220000019', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:02:38', '2023-02-01 01:02:38'),
(15, 3, 1, 1, '220000019', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:02:42', '2023-02-01 01:02:42'),
(16, 3, 1, 1, '220000019', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:02:48', '2023-02-01 01:02:48'),
(17, 3, 1, 1, '220000019', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:03:10', '2023-02-01 01:03:10'),
(18, 3, NULL, 1, '220000020', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:03:39', '2023-02-01 01:03:39'),
(19, 3, 2, 1, '220000021', NULL, '650', '650', '0', '0', '0', '0', '0', '650', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:04:56', '2023-02-01 01:04:56'),
(20, 3, NULL, 1, '220000022', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:10:54', '2023-02-01 01:10:54'),
(21, 3, NULL, 1, '220000023', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:13:13', '2023-02-01 01:13:13'),
(22, 3, NULL, 1, '220000024', NULL, '650', '650', '0', '0', '0', '0', '0', '650', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:18:19', '2023-02-01 01:18:19'),
(23, 3, NULL, 1, '220000025', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:19:20', '2023-02-01 01:19:20'),
(24, 3, NULL, 1, '220000026', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:26:51', '2023-02-01 01:26:51'),
(25, 3, NULL, 1, '220000027', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:30:40', '2023-02-01 01:30:40'),
(26, 3, NULL, 1, '220000028', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:31:46', '2023-02-01 01:31:46'),
(27, 3, NULL, 1, '220000029', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:32:37', '2023-02-01 01:32:37'),
(28, 3, NULL, 1, '220000030', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:34:01', '2023-02-01 01:34:01'),
(29, 3, NULL, 1, '220000031', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:35:50', '2023-02-01 01:35:50'),
(30, 3, NULL, 1, '220000032', NULL, '3250', '3250', '0', '0', '0', '0', '0', '3250', '2023-01-31', NULL, NULL, NULL, NULL, 1, NULL, '2023-02-01 01:56:02', '2023-02-01 01:56:02');

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

--
-- Table structure for table `sale_products`
--

CREATE TABLE `sale_products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sale_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `sale_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_unit_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `category_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quantity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sale_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `size` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `capacity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `manufacture_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `expiry_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_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 `sale_products`
--

INSERT INTO `sale_products` (`id`, `sale_date`, `product_id`, `customer_id`, `sale_id`, `warehouse_id`, `product_unit_id`, `invoice_no`, `product_name`, `category_id`, `quantity`, `total`, `barcode`, `purchase_price`, `sale_price`, `size`, `capacity`, `manufacture_date`, `expiry_date`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, '2022-04-07', 1, 1, 1, NULL, NULL, '220000001', 'Product 1', '1', '50', '40000', '', '500', '800', '', '', '', '', 1, '2022-04-07 06:56:18', '2022-04-07 06:56:18'),
(2, '2022-04-07', 2, 1, 1, NULL, NULL, '220000001', 'Product 2', '2', '45', '31500', '', '600', '700', '', '', '', '', 1, '2022-04-07 06:56:18', '2022-04-07 06:56:18'),
(3, '2022-04-07', 1, 3, 2, NULL, NULL, '220000002', 'Product 1', '1', '4', '3200', '', '500', '800', '', '', '', '', 1, '2022-04-07 08:46:30', '2022-04-07 08:46:30'),
(4, '2022-04-07', 1, 4, 3, NULL, NULL, '220000003', 'Product 1', '1', '33', '26400', '', '500', '800', '', '', '', '', 1, '2022-04-07 08:49:57', '2022-04-07 08:49:57'),
(5, '2023-01-31', 3, NULL, 4, NULL, NULL, '220000005', 'Vegetables', '1', '5', '7.5', '', '1', '1.5', '', '', '', '', 1, '2023-01-31 16:02:42', '2023-01-31 16:02:42'),
(6, '2023-01-31', 2, 1, 5, NULL, NULL, '220000006', 'Product 2', '2', '12', '8400', '', '600', '700', '', '', '', '', 1, '2023-01-31 16:05:54', '2023-01-31 16:05:54'),
(7, '2023-01-31', 2, 1, 6, NULL, NULL, '220000008', 'Product 2', '2', '3', '2100', '', '600', '700', '', '', '', '', 1, '2023-01-31 16:07:27', '2023-01-31 16:07:27'),
(8, '2023-01-31', 2, 3, 7, NULL, NULL, '220000013', 'Product 2', '2', '10', '7000', '', '600', '700', '', '', '', '', 1, '2023-01-31 19:20:01', '2023-01-31 19:20:01'),
(9, '2023-01-31', 2, NULL, 8, NULL, NULL, '220000014', 'Product 2', '2', '10', '6500', '', '600', '650', '', '', '', '', 1, '2023-01-31 20:13:31', '2023-01-31 20:13:31'),
(10, '2023-01-10', 2, 3, 9, NULL, NULL, '220000015', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 00:53:15', '2023-02-01 00:53:15'),
(11, '2023-01-10', 2, 3, 10, NULL, NULL, '220000015', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 00:53:23', '2023-02-01 00:53:23'),
(12, '2023-01-31', 2, 3, 11, NULL, NULL, '220000016', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 00:56:02', '2023-02-01 00:56:02'),
(13, '2023-01-31', 2, 3, 12, NULL, NULL, '220000017', 'Product 2', '2', '1', '650', '', '600', '650', '', '', '', '', 1, '2023-02-01 00:56:44', '2023-02-01 00:56:44'),
(14, '2023-01-31', 2, 3, 13, NULL, NULL, '220000018', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:00:59', '2023-02-01 01:00:59'),
(15, '2023-01-31', 2, 3, 14, NULL, NULL, '220000019', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:02:38', '2023-02-01 01:02:38'),
(16, '2023-01-31', 2, 3, 15, NULL, NULL, '220000019', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:02:42', '2023-02-01 01:02:42'),
(17, '2023-01-31', 2, 3, 16, NULL, NULL, '220000019', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:02:48', '2023-02-01 01:02:48'),
(18, '2023-01-31', 2, 3, 17, NULL, NULL, '220000019', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:03:10', '2023-02-01 01:03:10'),
(19, '2023-01-31', 2, 3, 18, NULL, NULL, '220000020', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:03:39', '2023-02-01 01:03:39'),
(20, '2023-01-31', 2, 3, 19, NULL, NULL, '220000021', 'Product 2', '2', '1', '650', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:04:56', '2023-02-01 01:04:56'),
(21, '2023-01-31', 2, 3, 20, NULL, NULL, '220000022', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:10:54', '2023-02-01 01:10:54'),
(22, '2023-01-31', 2, 3, 21, NULL, NULL, '220000023', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:13:13', '2023-02-01 01:13:13'),
(23, '2023-01-31', 2, 3, 22, NULL, NULL, '220000024', 'Product 2', '2', '1', '650', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:18:19', '2023-02-01 01:18:19'),
(24, '2023-01-31', 2, 3, 23, NULL, NULL, '220000025', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:19:20', '2023-02-01 01:19:20'),
(25, '2023-01-31', 2, 3, 24, NULL, NULL, '220000026', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:26:51', '2023-02-01 01:26:51'),
(26, '2023-01-31', 2, 3, 25, NULL, NULL, '220000027', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:30:40', '2023-02-01 01:30:40'),
(27, '2023-01-31', 2, 3, 26, NULL, NULL, '220000028', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:31:46', '2023-02-01 01:31:46'),
(28, '2023-01-31', 2, 3, 27, NULL, NULL, '220000029', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:32:37', '2023-02-01 01:32:37'),
(29, '2023-01-31', 2, 3, 28, NULL, NULL, '220000030', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:34:01', '2023-02-01 01:34:01'),
(30, '2023-01-31', 2, 3, 29, NULL, NULL, '220000031', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:35:50', '2023-02-01 01:35:50'),
(31, '2023-01-31', 2, 3, 30, NULL, NULL, '220000032', 'Product 2', '2', '5', '3250', '', '600', '650', '', '', '', '', 1, '2023-02-01 01:56:02', '2023-02-01 01:56:02');

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

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

CREATE TABLE `sale_returns` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `return_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `category_id` bigint(20) UNSIGNED DEFAULT NULL,
  `previous_invoice_id` bigint(20) UNSIGNED DEFAULT NULL,
  `previous_invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sale_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `return_quantity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `return_rate` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `return_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sales_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_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;

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

--
-- Table structure for table `services`
--

CREATE TABLE `services` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sale_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sub_total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_vat` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_vat_amount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_discount` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_transport` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_paid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total_due` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sale_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_contact` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `customer_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `note` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_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 `services`
--

INSERT INTO `services` (`id`, `customer_id`, `employee_id`, `invoice_no`, `sale_type`, `total_amount`, `sub_total`, `total_vat`, `total_vat_amount`, `total_discount`, `total_transport`, `total_paid`, `total_due`, `sale_date`, `customer_name`, `customer_contact`, `customer_address`, `barcode`, `note`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, '220000007', NULL, '7000', '7000', '0', '0', '0', '0', '0', '7000', '2023-01-31', NULL, NULL, NULL, NULL, 'Qwerty', 1, '2023-01-31 16:06:34', '2023-01-31 16:06:34'),
(2, 1, NULL, '220000007', NULL, '7000', '7000', '0', '0', '0', '0', '0', '7000', '2023-01-31', NULL, NULL, NULL, NULL, 'Qwerty', 1, '2023-01-31 16:06:43', '2023-01-31 16:06:43'),
(3, 1, NULL, '220000007', NULL, '7000', '7000', '0', '0', '0', '0', '0', '7000', '2023-01-31', NULL, NULL, NULL, NULL, 'Qwerty', 1, '2023-01-31 16:06:52', '2023-01-31 16:06:52');

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

--
-- Table structure for table `service_products`
--

CREATE TABLE `service_products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sale_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `service_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `product_unit_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `product_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `category_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `quantity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `total` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `barcode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `purchase_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sale_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `size` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `capacity` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `manufacture_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `expiry_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `branch_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 `service_products`
--

INSERT INTO `service_products` (`id`, `sale_date`, `product_id`, `supplier_id`, `service_id`, `warehouse_id`, `product_unit_id`, `invoice_no`, `product_name`, `category_id`, `quantity`, `total`, `barcode`, `purchase_price`, `sale_price`, `size`, `capacity`, `manufacture_date`, `expiry_date`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, '2023-01-31', 2, NULL, 1, NULL, NULL, '220000007', 'Product 2', '2', '10', '7000', '', '600', '700', '', '', '', '', 1, '2023-01-31 16:06:34', '2023-01-31 16:06:34'),
(2, '2023-01-31', 2, NULL, 2, NULL, NULL, '220000007', 'Product 2', '2', '10', '7000', '', '600', '700', '', '', '', '', 1, '2023-01-31 16:06:43', '2023-01-31 16:06:43'),
(3, '2023-01-31', 2, NULL, 3, NULL, NULL, '220000007', 'Product 2', '2', '10', '7000', '', '600', '700', '', '', '', '', 1, '2023-01-31 16:06:52', '2023-01-31 16:06:52');

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

--
-- Table structure for table `suppliers`
--

CREATE TABLE `suppliers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `supplier_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supplier_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_person` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` longtext COLLATE utf8mb4_unicode_ci,
  `contact_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `previous_due` int(11) DEFAULT NULL,
  `branch_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 `suppliers`
--

INSERT INTO `suppliers` (`id`, `supplier_id`, `supplier_name`, `contact_person`, `address`, `contact_number`, `email`, `image`, `previous_due`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, '10001', 'supplier-1', 'Mara', 'Elmo', '102', NULL, NULL, NULL, 1, '2021-12-27 02:33:41', '2021-12-27 02:33:41'),
(3, '10002', 'supplier-3', 'Mara', 'dhaka', '01474747', NULL, NULL, NULL, 1, '2021-12-27 02:33:41', '2023-05-15 04:41:12'),
(4, NULL, 'Supplier Rezaul', NULL, 'Chittagong,cox bazar', '018256', 'rhraz.bd@gmail.com', NULL, 1000, 1, '2022-01-20 02:44:28', '2023-05-15 04:40:56'),
(5, 'kasbon', 'rahim', 'karim', 'duabai', NULL, NULL, NULL, 0, 1, '2022-09-03 21:25:17', '2022-09-03 21:25:17');

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

--
-- Table structure for table `supplier_payments`
--

CREATE TABLE `supplier_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `transaction_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transaction_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `payment_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `due` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  `saved_by` bigint(20) UNSIGNED NOT NULL,
  `branch_id` bigint(20) UNSIGNED NOT NULL,
  `bank_account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `invoice_id` bigint(20) UNSIGNED 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 `units`
--

CREATE TABLE `units` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `branch_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 `units`
--

INSERT INTO `units` (`id`, `name`, `branch_id`, `created_at`, `updated_at`) VALUES
(1, 'Pcs', 1, '2021-12-26 07:19:39', '2021-12-26 07:19:39'),
(2, 'Ltr', 1, '2021-12-26 07:19:43', '2021-12-26 07:19:43'),
(3, 'KG', 1, '2021-12-26 07:19:47', '2021-12-26 07:19:47'),
(4, 'Inches', 1, '2021-12-26 07:19:52', '2021-12-26 07:19:52'),
(5, 'Piece', 1, '2021-12-26 07:19:56', '2021-12-26 07:19:56');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `areas`
--
ALTER TABLE `areas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `areas_branch_id_foreign` (`branch_id`);

--
-- Indexes for table `bank_accounts`
--
ALTER TABLE `bank_accounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bank_accounts_branch_id_foreign` (`branch_id`);

--
-- Indexes for table `bank_transactions`
--
ALTER TABLE `bank_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bank_transactions_saved_by_foreign` (`saved_by`),
  ADD KEY `bank_transactions_branch_id_foreign` (`branch_id`),
  ADD KEY `bank_transactions_bank_account_id_foreign` (`bank_account_id`);

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

--
-- Indexes for table `brands`
--
ALTER TABLE `brands`
  ADD PRIMARY KEY (`id`),
  ADD KEY `brands_branch_id_foreign` (`branch_id`);

--
-- Indexes for table `cash_transactions`
--
ALTER TABLE `cash_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cash_transactions_saved_by_foreign` (`saved_by`),
  ADD KEY `cash_transactions_branch_id_foreign` (`branch_id`);

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `categories_branch_id_foreign` (`branch_id`);

--
-- Indexes for table `cheque_entries`
--
ALTER TABLE `cheque_entries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cheque_entries_customer_id_foreign` (`customer_id`),
  ADD KEY `cheque_entries_branch_id_foreign` (`branch_id`);

--
-- Indexes for table `corporate_quotations`
--
ALTER TABLE `corporate_quotations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `corporate_quotations_branch_id_foreign` (`branch_id`),
  ADD KEY `corporate_quotations_invoice_id_foreign` (`invoice_id`),
  ADD KEY `corporate_quotations_customer_id_foreign` (`customer_id`),
  ADD KEY `corporate_quotations_employee_id_foreign` (`employee_id`),
  ADD KEY `corporate_quotations_user_id_foreign` (`user_id`);

--
-- Indexes for table `corporate_quotation_details`
--
ALTER TABLE `corporate_quotation_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `corporate_quotation_details_branch_id_foreign` (`branch_id`),
  ADD KEY `corporate_quotation_details_invoice_id_foreign` (`invoice_id`),
  ADD KEY `corporate_quotation_details_customer_id_foreign` (`customer_id`),
  ADD KEY `corporate_quotation_details_corporationquotation_id_foreign` (`corporationQuotation_id`);

--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customers_branch_id_foreign` (`branch_id`);

--
-- Indexes for table `customer_payments`
--
ALTER TABLE `customer_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `customer_payments_customer_id_foreign` (`customer_id`),
  ADD KEY `customer_payments_saved_by_foreign` (`saved_by`),
  ADD KEY `customer_payments_branch_id_foreign` (`branch_id`),
  ADD KEY `customer_payments_bank_account_id_foreign` (`bank_account_id`);

--
-- Indexes for table `damage_entries`
--
ALTER TABLE `damage_entries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `damage_entries_product_id_foreign` (`product_id`),
  ADD KEY `damage_entries_branch_id_foreign` (`branch_id`),
  ADD KEY `damage_entries_category_id_foreign` (`category_id`);

--
-- Indexes for table `departments`
--
ALTER TABLE `departments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `departments_branch_id_foreign` (`branch_id`);

--
-- Indexes for table `designations`
--
ALTER TABLE `designations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `designations_branch_id_foreign` (`branch_id`);

--
-- Indexes for table `employees`
--
ALTER TABLE `employees`
  ADD PRIMARY KEY (`id`) USING BTREE;

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `invoices`
--
ALTER TABLE `invoices`
  ADD PRIMARY KEY (`id`),
  ADD KEY `invoices_user_id_foreign` (`user_id`),
  ADD KEY `invoices_supplier_id_foreign` (`supplier_id`),
  ADD KEY `invoices_customer_id_foreign` (`customer_id`),
  ADD KEY `invoices_branch_id_foreign` (`branch_id`),
  ADD KEY `invoices_employee_id_foreign` (`employee_id`);

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

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

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `products_branch_id_foreign` (`branch_id`),
  ADD KEY `products_category_foreign` (`category`);

--
-- Indexes for table `product_transfers`
--
ALTER TABLE `product_transfers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_transfers_branch_id_foreign` (`branch_id`),
  ADD KEY `product_transfers_invoice_id_foreign` (`invoice_id`),
  ADD KEY `product_transfers_employee_id_foreign` (`employee_id`),
  ADD KEY `product_transfers_user_id_foreign` (`user_id`);

--
-- Indexes for table `product_transfer_details`
--
ALTER TABLE `product_transfer_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_transfer_details_branch_id_foreign` (`branch_id`),
  ADD KEY `product_transfer_details_transfer_id_foreign` (`transfer_id`),
  ADD KEY `product_transfer_details_invoice_id_foreign` (`invoice_id`),
  ADD KEY `product_transfer_details_product_id_foreign` (`product_id`),
  ADD KEY `product_transfer_details_employee_id_foreign` (`employee_id`),
  ADD KEY `product_transfer_details_user_id_foreign` (`user_id`);

--
-- Indexes for table `purchases`
--
ALTER TABLE `purchases`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchases_branch_id_foreign` (`branch_id`),
  ADD KEY `purchases_supplier_id_foreign` (`supplier_id`),
  ADD KEY `purchases_user_id_foreign` (`user_id`);

--
-- Indexes for table `purchase_products`
--
ALTER TABLE `purchase_products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchase_products_branch_id_foreign` (`branch_id`),
  ADD KEY `purchase_products_product_id_foreign` (`product_id`),
  ADD KEY `purchase_products_supplier_id_foreign` (`supplier_id`),
  ADD KEY `purchase_products_purchase_id_foreign` (`purchase_id`),
  ADD KEY `purchase_products_product_unit_id_foreign` (`product_unit_id`);

--
-- Indexes for table `purchase_returns`
--
ALTER TABLE `purchase_returns`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchase_returns_branch_id_foreign` (`branch_id`),
  ADD KEY `purchase_returns_supplier_id_foreign` (`supplier_id`),
  ADD KEY `purchase_returns_product_id_foreign` (`product_id`),
  ADD KEY `purchase_returns_employee_id_foreign` (`employee_id`),
  ADD KEY `purchase_returns_user_id_foreign` (`user_id`),
  ADD KEY `purchase_returns_previous_invoice_id_foreign` (`previous_invoice_id`),
  ADD KEY `purchase_returns_purchase_id_foreign` (`purchase_id`),
  ADD KEY `purchase_returns_category_id_foreign` (`category_id`);

--
-- Indexes for table `quotations`
--
ALTER TABLE `quotations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotations_branch_id_foreign` (`branch_id`),
  ADD KEY `quotations_invoice_id_foreign` (`invoice_id`),
  ADD KEY `quotations_customer_id_foreign` (`customer_id`),
  ADD KEY `quotations_employee_id_foreign` (`employee_id`),
  ADD KEY `quotations_user_id_foreign` (`user_id`);

--
-- Indexes for table `quotation_products`
--
ALTER TABLE `quotation_products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `quotation_products_branch_id_foreign` (`branch_id`),
  ADD KEY `quotation_products_product_id_foreign` (`product_id`),
  ADD KEY `quotation_products_invoice_id_foreign` (`invoice_id`),
  ADD KEY `quotation_products_customer_id_foreign` (`customer_id`),
  ADD KEY `quotation_products_quotation_id_foreign` (`quotation_id`),
  ADD KEY `quotation_products_product_unit_id_foreign` (`product_unit_id`);

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

--
-- Indexes for table `salary_payments`
--
ALTER TABLE `salary_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `salary_payments_branch_id_foreign` (`branch_id`),
  ADD KEY `salary_payments_emp_id_foreign` (`emp_id`);

--
-- Indexes for table `sales`
--
ALTER TABLE `sales`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sales_branch_id_foreign` (`branch_id`),
  ADD KEY `sales_customer_id_foreign` (`customer_id`),
  ADD KEY `sales_employee_id_foreign` (`employee_id`),
  ADD KEY `sales_user_id_foreign` (`user_id`);

--
-- Indexes for table `sale_products`
--
ALTER TABLE `sale_products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sale_products_branch_id_foreign` (`branch_id`),
  ADD KEY `sale_products_product_id_foreign` (`product_id`),
  ADD KEY `sale_products_customer_id_foreign` (`customer_id`),
  ADD KEY `sale_products_sale_id_foreign` (`sale_id`),
  ADD KEY `sale_products_product_unit_id_foreign` (`product_unit_id`);

--
-- Indexes for table `sale_returns`
--
ALTER TABLE `sale_returns`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sale_returns_branch_id_foreign` (`branch_id`),
  ADD KEY `sale_returns_customer_id_foreign` (`customer_id`),
  ADD KEY `sale_returns_product_id_foreign` (`product_id`),
  ADD KEY `sale_returns_employee_id_foreign` (`employee_id`),
  ADD KEY `sale_returns_user_id_foreign` (`user_id`),
  ADD KEY `sale_returns_previous_invoice_id_foreign` (`previous_invoice_id`),
  ADD KEY `sale_returns_category_id_foreign` (`category_id`);

--
-- Indexes for table `services`
--
ALTER TABLE `services`
  ADD PRIMARY KEY (`id`),
  ADD KEY `services_branch_id_foreign` (`branch_id`),
  ADD KEY `services_customer_id_foreign` (`customer_id`),
  ADD KEY `services_employee_id_foreign` (`employee_id`);

--
-- Indexes for table `service_products`
--
ALTER TABLE `service_products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `service_products_branch_id_foreign` (`branch_id`),
  ADD KEY `service_products_product_id_foreign` (`product_id`),
  ADD KEY `service_products_supplier_id_foreign` (`supplier_id`),
  ADD KEY `service_products_service_id_foreign` (`service_id`),
  ADD KEY `service_products_product_unit_id_foreign` (`product_unit_id`);

--
-- Indexes for table `suppliers`
--
ALTER TABLE `suppliers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `suppliers_branch_id_foreign` (`branch_id`);

--
-- Indexes for table `supplier_payments`
--
ALTER TABLE `supplier_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `supplier_payments_supplier_id_foreign` (`supplier_id`),
  ADD KEY `supplier_payments_saved_by_foreign` (`saved_by`),
  ADD KEY `supplier_payments_branch_id_foreign` (`branch_id`),
  ADD KEY `supplier_payments_bank_account_id_foreign` (`bank_account_id`),
  ADD KEY `supplier_payments_invoice_id_foreign` (`invoice_id`);

--
-- Indexes for table `units`
--
ALTER TABLE `units`
  ADD PRIMARY KEY (`id`),
  ADD KEY `units_branch_id_foreign` (`branch_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `accounts`
--
ALTER TABLE `accounts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `areas`
--
ALTER TABLE `areas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `bank_accounts`
--
ALTER TABLE `bank_accounts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `bank_transactions`
--
ALTER TABLE `bank_transactions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `branches`
--
ALTER TABLE `branches`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `brands`
--
ALTER TABLE `brands`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `cash_transactions`
--
ALTER TABLE `cash_transactions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `cheque_entries`
--
ALTER TABLE `cheque_entries`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `corporate_quotations`
--
ALTER TABLE `corporate_quotations`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `corporate_quotation_details`
--
ALTER TABLE `corporate_quotation_details`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `customers`
--
ALTER TABLE `customers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `customer_payments`
--
ALTER TABLE `customer_payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `damage_entries`
--
ALTER TABLE `damage_entries`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `departments`
--
ALTER TABLE `departments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `designations`
--
ALTER TABLE `designations`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `employees`
--
ALTER TABLE `employees`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `invoices`
--
ALTER TABLE `invoices`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52;

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

--
-- AUTO_INCREMENT for table `months`
--
ALTER TABLE `months`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `product_transfers`
--
ALTER TABLE `product_transfers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `product_transfer_details`
--
ALTER TABLE `product_transfer_details`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `purchases`
--
ALTER TABLE `purchases`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `purchase_products`
--
ALTER TABLE `purchase_products`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `purchase_returns`
--
ALTER TABLE `purchase_returns`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `quotations`
--
ALTER TABLE `quotations`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `quotation_products`
--
ALTER TABLE `quotation_products`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `salary_payments`
--
ALTER TABLE `salary_payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `sales`
--
ALTER TABLE `sales`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT for table `sale_products`
--
ALTER TABLE `sale_products`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT for table `sale_returns`
--
ALTER TABLE `sale_returns`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `services`
--
ALTER TABLE `services`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `service_products`
--
ALTER TABLE `service_products`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `suppliers`
--
ALTER TABLE `suppliers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `supplier_payments`
--
ALTER TABLE `supplier_payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `units`
--
ALTER TABLE `units`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `accounts`
--
ALTER TABLE `accounts`
  ADD CONSTRAINT `accounts_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `areas`
--
ALTER TABLE `areas`
  ADD CONSTRAINT `areas_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`);

--
-- Constraints for table `bank_accounts`
--
ALTER TABLE `bank_accounts`
  ADD CONSTRAINT `bank_accounts_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `bank_transactions`
--
ALTER TABLE `bank_transactions`
  ADD CONSTRAINT `bank_transactions_bank_account_id_foreign` FOREIGN KEY (`bank_account_id`) REFERENCES `bank_accounts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bank_transactions_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bank_transactions_saved_by_foreign` FOREIGN KEY (`saved_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `brands`
--
ALTER TABLE `brands`
  ADD CONSTRAINT `brands_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`);

--
-- Constraints for table `cash_transactions`
--
ALTER TABLE `cash_transactions`
  ADD CONSTRAINT `cash_transactions_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cash_transactions_saved_by_foreign` FOREIGN KEY (`saved_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `categories`
--
ALTER TABLE `categories`
  ADD CONSTRAINT `categories_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`);

--
-- Constraints for table `cheque_entries`
--
ALTER TABLE `cheque_entries`
  ADD CONSTRAINT `cheque_entries_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cheque_entries_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`);

--
-- Constraints for table `corporate_quotations`
--
ALTER TABLE `corporate_quotations`
  ADD CONSTRAINT `corporate_quotations_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `corporate_quotations_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `corporate_quotations_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `corporate_quotations_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`),
  ADD CONSTRAINT `corporate_quotations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `corporate_quotation_details`
--
ALTER TABLE `corporate_quotation_details`
  ADD CONSTRAINT `corporate_quotation_details_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `corporate_quotation_details_corporationquotation_id_foreign` FOREIGN KEY (`corporationQuotation_id`) REFERENCES `corporate_quotations` (`id`),
  ADD CONSTRAINT `corporate_quotation_details_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `corporate_quotation_details_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`);

--
-- Constraints for table `customers`
--
ALTER TABLE `customers`
  ADD CONSTRAINT `customers_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`);

--
-- Constraints for table `customer_payments`
--
ALTER TABLE `customer_payments`
  ADD CONSTRAINT `customer_payments_bank_account_id_foreign` FOREIGN KEY (`bank_account_id`) REFERENCES `bank_accounts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `customer_payments_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `customer_payments_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `customer_payments_saved_by_foreign` FOREIGN KEY (`saved_by`) REFERENCES `users` (`id`);

--
-- Constraints for table `damage_entries`
--
ALTER TABLE `damage_entries`
  ADD CONSTRAINT `damage_entries_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `damage_entries_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`),
  ADD CONSTRAINT `damage_entries_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `departments`
--
ALTER TABLE `departments`
  ADD CONSTRAINT `departments_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `designations`
--
ALTER TABLE `designations`
  ADD CONSTRAINT `designations_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `invoices`
--
ALTER TABLE `invoices`
  ADD CONSTRAINT `invoices_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `invoices_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `invoices_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `invoices_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`),
  ADD CONSTRAINT `invoices_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `products`
--
ALTER TABLE `products`
  ADD CONSTRAINT `products_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `products_category_foreign` FOREIGN KEY (`category`) REFERENCES `categories` (`id`);

--
-- Constraints for table `product_transfers`
--
ALTER TABLE `product_transfers`
  ADD CONSTRAINT `product_transfers_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `product_transfers_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `product_transfers_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`),
  ADD CONSTRAINT `product_transfers_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `product_transfer_details`
--
ALTER TABLE `product_transfer_details`
  ADD CONSTRAINT `product_transfer_details_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `product_transfer_details_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `product_transfer_details_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`),
  ADD CONSTRAINT `product_transfer_details_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
  ADD CONSTRAINT `product_transfer_details_transfer_id_foreign` FOREIGN KEY (`transfer_id`) REFERENCES `product_transfers` (`id`),
  ADD CONSTRAINT `product_transfer_details_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `purchases`
--
ALTER TABLE `purchases`
  ADD CONSTRAINT `purchases_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `purchases_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`),
  ADD CONSTRAINT `purchases_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `purchase_products`
--
ALTER TABLE `purchase_products`
  ADD CONSTRAINT `purchase_products_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `purchase_products_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
  ADD CONSTRAINT `purchase_products_product_unit_id_foreign` FOREIGN KEY (`product_unit_id`) REFERENCES `units` (`id`),
  ADD CONSTRAINT `purchase_products_purchase_id_foreign` FOREIGN KEY (`purchase_id`) REFERENCES `purchases` (`id`),
  ADD CONSTRAINT `purchase_products_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`);

--
-- Constraints for table `purchase_returns`
--
ALTER TABLE `purchase_returns`
  ADD CONSTRAINT `purchase_returns_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `purchase_returns_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`),
  ADD CONSTRAINT `purchase_returns_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `purchase_returns_previous_invoice_id_foreign` FOREIGN KEY (`previous_invoice_id`) REFERENCES `invoices` (`id`),
  ADD CONSTRAINT `purchase_returns_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
  ADD CONSTRAINT `purchase_returns_purchase_id_foreign` FOREIGN KEY (`purchase_id`) REFERENCES `purchases` (`id`),
  ADD CONSTRAINT `purchase_returns_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`),
  ADD CONSTRAINT `purchase_returns_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `quotations`
--
ALTER TABLE `quotations`
  ADD CONSTRAINT `quotations_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `quotations_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `quotations_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `quotations_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`),
  ADD CONSTRAINT `quotations_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `quotation_products`
--
ALTER TABLE `quotation_products`
  ADD CONSTRAINT `quotation_products_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `quotation_products_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `quotation_products_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`),
  ADD CONSTRAINT `quotation_products_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
  ADD CONSTRAINT `quotation_products_product_unit_id_foreign` FOREIGN KEY (`product_unit_id`) REFERENCES `units` (`id`),
  ADD CONSTRAINT `quotation_products_quotation_id_foreign` FOREIGN KEY (`quotation_id`) REFERENCES `quotations` (`id`);

--
-- Constraints for table `salary_payments`
--
ALTER TABLE `salary_payments`
  ADD CONSTRAINT `salary_payments_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `salary_payments_emp_id_foreign` FOREIGN KEY (`emp_id`) REFERENCES `employees` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `sales`
--
ALTER TABLE `sales`
  ADD CONSTRAINT `sales_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `sales_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `sales_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `sales_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `sale_products`
--
ALTER TABLE `sale_products`
  ADD CONSTRAINT `sale_products_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `sale_products_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `sale_products_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
  ADD CONSTRAINT `sale_products_product_unit_id_foreign` FOREIGN KEY (`product_unit_id`) REFERENCES `units` (`id`),
  ADD CONSTRAINT `sale_products_sale_id_foreign` FOREIGN KEY (`sale_id`) REFERENCES `sales` (`id`);

--
-- Constraints for table `sale_returns`
--
ALTER TABLE `sale_returns`
  ADD CONSTRAINT `sale_returns_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `sale_returns_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`),
  ADD CONSTRAINT `sale_returns_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `sale_returns_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `sale_returns_previous_invoice_id_foreign` FOREIGN KEY (`previous_invoice_id`) REFERENCES `invoices` (`id`),
  ADD CONSTRAINT `sale_returns_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
  ADD CONSTRAINT `sale_returns_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `services`
--
ALTER TABLE `services`
  ADD CONSTRAINT `services_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `services_customer_id_foreign` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `services_employee_id_foreign` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`);

--
-- Constraints for table `service_products`
--
ALTER TABLE `service_products`
  ADD CONSTRAINT `service_products_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `service_products_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
  ADD CONSTRAINT `service_products_product_unit_id_foreign` FOREIGN KEY (`product_unit_id`) REFERENCES `units` (`id`),
  ADD CONSTRAINT `service_products_service_id_foreign` FOREIGN KEY (`service_id`) REFERENCES `services` (`id`),
  ADD CONSTRAINT `service_products_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`);

--
-- Constraints for table `suppliers`
--
ALTER TABLE `suppliers`
  ADD CONSTRAINT `suppliers_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`);

--
-- Constraints for table `supplier_payments`
--
ALTER TABLE `supplier_payments`
  ADD CONSTRAINT `supplier_payments_bank_account_id_foreign` FOREIGN KEY (`bank_account_id`) REFERENCES `bank_accounts` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `supplier_payments_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `supplier_payments_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `supplier_payments_saved_by_foreign` FOREIGN KEY (`saved_by`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `supplier_payments_supplier_id_foreign` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`);

--
-- Constraints for table `units`
--
ALTER TABLE `units`
  ADD CONSTRAINT `units_branch_id_foreign` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`);
COMMIT;

