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

START TRANSACTION;



--
-- Database: `high`
--

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

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

CREATE TABLE `accounts` (
  `id` bigint(20) NOT NULL,
  `head_id` int(3) NOT NULL,
  `comment` text NOT NULL,
  `type` tinyint(1) NOT NULL,
  `amount` int(11) NOT NULL,
  `date` varchar(20) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `branch_id` int(3) NOT NULL,
  `user_id` int(3) NOT NULL,
  `time` time NOT NULL,
  `prson_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `asset`
--

CREATE TABLE `asset` (
  `id` int(11) NOT NULL,
  `comment` text NOT NULL,
  `amount` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `date` text NOT NULL,
  `name` text NOT NULL,
  `head_id` int(11) NOT NULL,
  `purchase_trigger_id` int(11) NOT NULL,
  `amounta` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `asset_heads`
--

CREATE TABLE `asset_heads` (
  `id` int(11) NOT NULL,
  `name` varchar(254) NOT NULL,
  `code` varchar(25) NOT NULL,
  `pb` int(11) NOT NULL,
  `branch_id` int(3) NOT NULL,
  `user_id` int(3) NOT NULL,
  `date` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `banks`
--

CREATE TABLE `banks` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `balance` int(11) NOT NULL DEFAULT '0',
  `address` text NOT NULL,
  `branch_id` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `date` varchar(25) NOT NULL,
  `code` text NOT NULL,
  `final_balance` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `bank_withdraw`
--

CREATE TABLE `bank_withdraw` (
  `id` bigint(20) NOT NULL,
  `bank_id` int(11) NOT NULL,
  `check_num` int(11) DEFAULT NULL,
  `amount` double(10,2) DEFAULT NULL,
  `comment` text NOT NULL,
  `date` varchar(25) DEFAULT NULL,
  `branch_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `type_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `branches` (
  `id` int(3) NOT NULL,
  `name` varchar(254) NOT NULL,
  `logo` text NOT NULL,
  `contact_no` varchar(15) NOT NULL,
  `address` text NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1',
  `date` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `branches`
--

INSERT INTO `branches` (`id`, `name`, `logo`, `contact_no`, `address`, `status`, `date`) VALUES
(3, 'HighTouch & OneTel', 'assets/branch_img/WhatsApp_Image_2022-11-22_at_2_50_05_PM.jpeg', '01714752392', 'MobileZone, MiliPlaza, UttarBazar, Kulaura.', 0, '2022-11-01');

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

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

CREATE TABLE `brands` (
  `id` int(3) NOT NULL,
  `name` varchar(254) NOT NULL,
  `branch_id` int(3) NOT NULL,
  `user_id` int(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `categories` (
  `id` int(3) NOT NULL,
  `name` varchar(254) NOT NULL,
  `branch_id` int(3) NOT NULL,
  `user_id` int(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

INSERT INTO `categories` (`id`, `name`, `branch_id`, `user_id`) VALUES
(1, 'lcd', 3, 23);

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

--
-- Table structure for table `collections`
--

CREATE TABLE `collections` (
  `id` bigint(20) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `previous_balance` int(11) NOT NULL,
  `paid` int(11) NOT NULL,
  `balance` int(11) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `payment_method` varchar(20) NOT NULL,
  `bank_id` varchar(50) DEFAULT NULL,
  `check_num` varchar(100) DEFAULT NULL,
  `check_amount` int(11) DEFAULT NULL,
  `bank_amount` int(11) NOT NULL,
  `check_appr_date` varchar(25) DEFAULT NULL,
  `approved_st` tinyint(1) NOT NULL DEFAULT '0',
  `return_st` tinyint(4) NOT NULL DEFAULT '0',
  `invoice_number` varchar(255) NOT NULL,
  `discount` int(11) NOT NULL,
  `type` text NOT NULL,
  `collection_type` text NOT NULL,
  `comment` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `commisons`
--

CREATE TABLE `commisons` (
  `id` bigint(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `date` text NOT NULL,
  `amount` int(11) NOT NULL,
  `description` text NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `method` text NOT NULL,
  `type` text NOT NULL,
  `shop` text NOT NULL,
  `product` int(11) NOT NULL,
  `place` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `complain`
--

CREATE TABLE `complain` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `date` text NOT NULL,
  `customer_id` text NOT NULL,
  `mobile` text NOT NULL,
  `smobile` text NOT NULL,
  `address` text NOT NULL,
  `brand` text NOT NULL,
  `product` text NOT NULL,
  `model` text NOT NULL,
  `problem` text NOT NULL,
  `paid` int(11) NOT NULL,
  `due` int(11) NOT NULL,
  `receive` int(11) NOT NULL DEFAULT '1',
  `complete` int(11) NOT NULL,
  `delivery` int(11) NOT NULL,
  `charge` int(11) NOT NULL,
  `time` varchar(25) NOT NULL,
  `total_amount` int(11) NOT NULL,
  `cost_amount` int(11) NOT NULL,
  `ime` text NOT NULL,
  `paid_new` int(11) NOT NULL,
  `cash_paid` int(11) NOT NULL,
  `discount` int(11) NOT NULL,
  `delivery_date` varchar(25) NOT NULL,
  `complete_date` varchar(20) NOT NULL,
  `advance` int(11) NOT NULL,
  `engs` tinyint(1) NOT NULL,
  `engineer` int(11) NOT NULL,
  `engr` int(11) NOT NULL,
  `eng_charge` int(11) NOT NULL,
  `working_date` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `complain_items`
--

CREATE TABLE `complain_items` (
  `id` bigint(20) NOT NULL,
  `product_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `price` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `trigger_id` int(11) NOT NULL,
  `date` varchar(25) NOT NULL,
  `cost` int(11) NOT NULL,
  `total_price` int(11) NOT NULL,
  `total_cost` int(11) NOT NULL,
  `ime` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `contacts` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `contact` varchar(254) NOT NULL,
  `date` varchar(25) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `give` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `customers` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `code` varchar(14) NOT NULL,
  `address` text NOT NULL,
  `contact_no` varchar(15) NOT NULL,
  `previous_balance` int(11) NOT NULL,
  `prev_bal` double(10,2) NOT NULL,
  `balance` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` varchar(15) NOT NULL,
  `salesman` int(11) NOT NULL,
  `nid` text NOT NULL,
  `type` int(11) NOT NULL,
  `ac` text NOT NULL,
  `logo` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

INSERT INTO `customers` (`id`, `name`, `code`, `address`, `contact_no`, `previous_balance`, `prev_bal`, `balance`, `branch_id`, `user_id`, `date`, `salesman`, `nid`, `type`, `ac`, `logo`) VALUES
(1, 'abc', '1', 'ggg', '', 0, 0.00, 0, 3, 23, '2025-11-10', 0, '', 0, '', '');

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

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

CREATE TABLE `employees` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `code` varchar(14) NOT NULL,
  `address` text NOT NULL,
  `contact_no` varchar(15) NOT NULL,
  `previous_balance` int(11) NOT NULL,
  `prev_bal` double(10,2) NOT NULL,
  `balance` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` varchar(15) NOT NULL,
  `father_name` text NOT NULL,
  `mother_name` text NOT NULL,
  `join_date` text NOT NULL,
  `department` text NOT NULL,
  `designation` text NOT NULL,
  `image` text NOT NULL,
  `salary` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `employee_salary`
--

CREATE TABLE `employee_salary` (
  `id` int(11) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `salary` int(11) NOT NULL,
  `date` text NOT NULL,
  `month` text NOT NULL,
  `salary_main` double(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `engineers`
--

CREATE TABLE `engineers` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `date` varchar(25) NOT NULL,
  `code` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `float_purchase`
--

CREATE TABLE `float_purchase` (
  `id` bigint(20) NOT NULL,
  `name` text NOT NULL,
  `size` text NOT NULL,
  `category_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `cost_price` double(10,2) NOT NULL,
  `sale_price` double(10,2) NOT NULL,
  `instock` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `total_price` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `hidden_instock` int(11) NOT NULL,
  `low_stock` int(11) NOT NULL DEFAULT '0',
  `commision` double(10,2) NOT NULL,
  `ime` text NOT NULL,
  `product_name` text NOT NULL,
  `warranty` date NOT NULL,
  `note` text NOT NULL,
  `brand_id` int(11) NOT NULL,
  `poribahan` int(11) NOT NULL,
  `ime_qty` int(11) NOT NULL,
  `wsale_price` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `float_sale`
--

CREATE TABLE `float_sale` (
  `id` bigint(20) NOT NULL,
  `product_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `sale_price` double(10,2) NOT NULL,
  `cost_price` double(10,2) NOT NULL,
  `instock` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `total_price` double(10,2) NOT NULL,
  `total_cost` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `hidden_instock` int(11) NOT NULL,
  `color` text NOT NULL,
  `ime` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `heads`
--

CREATE TABLE `heads` (
  `id` int(11) NOT NULL,
  `name` varchar(254) NOT NULL,
  `code` varchar(25) NOT NULL,
  `branch_id` int(3) NOT NULL,
  `user_id` int(3) NOT NULL,
  `date` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `imes`
--

CREATE TABLE `imes` (
  `id` bigint(20) NOT NULL,
  `product_id` bigint(20) NOT NULL,
  `ime` varchar(255) NOT NULL,
  `status` int(11) NOT NULL DEFAULT '1',
  `branch_id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `warranty` date NOT NULL,
  `sale_price` int(11) NOT NULL,
  `cost_price` int(11) NOT NULL,
  `chalan_no` varchar(255) NOT NULL,
  `ime_qty` int(11) NOT NULL,
  `purchase_date` text NOT NULL,
  `wsale_price` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ime_purchase`
--

CREATE TABLE `ime_purchase` (
  `id` int(11) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `ime` text NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `trigger_id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `warranty` date NOT NULL,
  `ime_qty` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `ime_sale`
--

CREATE TABLE `ime_sale` (
  `id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `ime` text NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `trigger_id` int(11) NOT NULL,
  `warranty` text NOT NULL,
  `ime_qty` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `ime_sale`
--

INSERT INTO `ime_sale` (`id`, `product_id`, `ime`, `branch_id`, `user_id`, `trigger_id`, `warranty`, `ime_qty`) VALUES
(1, 1, '', 3, 23, 0, '', 2);

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

--
-- Table structure for table `khats`
--

CREATE TABLE `khats` (
  `id` int(11) NOT NULL,
  `name` varchar(254) NOT NULL,
  `code` varchar(25) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `loan`
--

CREATE TABLE `loan` (
  `id` bigint(20) NOT NULL,
  `head_id` int(11) NOT NULL,
  `comment` text NOT NULL,
  `amount` int(11) NOT NULL,
  `branch_id` int(3) NOT NULL,
  `user_id` int(3) NOT NULL,
  `date` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `loan_head`
--

CREATE TABLE `loan_head` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `code` varchar(25) NOT NULL,
  `date` varchar(25) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `losts`
--

CREATE TABLE `losts` (
  `id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `date` varchar(25) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `mnss`
--

CREATE TABLE `mnss` (
  `id` int(3) NOT NULL,
  `date` varchar(254) NOT NULL,
  `branch_id` int(3) NOT NULL,
  `user_id` int(3) NOT NULL,
  `month` text NOT NULL,
  `employee_id` int(11) NOT NULL,
  `day` int(11) NOT NULL,
  `salary` double(10,2) NOT NULL,
  `esid` int(11) NOT NULL,
  `total_amount` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `mnss_loop`
--

CREATE TABLE `mnss_loop` (
  `id` bigint(20) NOT NULL,
  `head_id` int(11) NOT NULL,
  `amount` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` text NOT NULL,
  `trigger_id` int(11) NOT NULL,
  `comment` text NOT NULL,
  `employee_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `opening_cash`
--

CREATE TABLE `opening_cash` (
  `id` int(11) NOT NULL,
  `cash` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `other_accounts`
--

CREATE TABLE `other_accounts` (
  `id` bigint(20) NOT NULL,
  `type_id` tinyint(1) NOT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `bank_id` int(11) DEFAULT NULL,
  `amount` double(10,2) NOT NULL,
  `comment` text,
  `date` varchar(25) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint(20) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `previous_balance` int(11) NOT NULL,
  `paid` int(11) NOT NULL,
  `balance` int(11) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `payment_method` varchar(20) NOT NULL,
  `bank_id` varchar(50) DEFAULT NULL,
  `check_num` varchar(100) DEFAULT NULL,
  `check_amount` int(11) DEFAULT NULL,
  `check_appr_date` varchar(25) DEFAULT NULL,
  `approved_st` tinyint(1) NOT NULL DEFAULT '0',
  `return_st` tinyint(4) NOT NULL DEFAULT '0',
  `invoice_number` int(11) NOT NULL,
  `discount` int(11) NOT NULL,
  `comment` text NOT NULL,
  `type` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `places`
--

CREATE TABLE `places` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `code` int(11) NOT NULL,
  `date` text NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `products` (
  `id` bigint(20) NOT NULL,
  `name` text NOT NULL,
  `size` text NOT NULL,
  `category_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `cost_price` double(10,2) NOT NULL,
  `sale_price` double(10,2) NOT NULL,
  `instock` double(11,2) NOT NULL,
  `low_stock` int(11) NOT NULL DEFAULT '0',
  `commision` double(10,2) NOT NULL,
  `note` text NOT NULL,
  `brand_id` int(11) NOT NULL,
  `poribahan` int(11) NOT NULL,
  `damage` int(11) NOT NULL,
  `damage_price` double(11,2) NOT NULL,
  `wsale_price` int(11) NOT NULL,
  `hiddenname` text NOT NULL,
  `barcode` varchar(50) NOT NULL,
  `supported` text NOT NULL,
  `qty` int(11) NOT NULL,
  `opn_purchase` int(11) NOT NULL,
  `on_purchase` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `last_price` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

INSERT INTO `products` (`id`, `name`, `size`, `category_id`, `branch_id`, `cost_price`, `sale_price`, `instock`, `low_stock`, `commision`, `note`, `brand_id`, `poribahan`, `damage`, `damage_price`, `wsale_price`, `hiddenname`, `barcode`, `supported`, `qty`, `opn_purchase`, `on_purchase`, `quantity`, `last_price`) VALUES
(1, 'abc', 'PICS', 1, 3, 100.00, 120.00, -2.00, 1, 0.00, '', 0, 0, 0, 0.00, 105, '', '10714835', 'abc', 0, 100, 120, 2, 0);

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

--
-- Table structure for table `product_purchase`
--

CREATE TABLE `product_purchase` (
  `id` bigint(20) NOT NULL,
  `name` text NOT NULL,
  `size` text NOT NULL,
  `category_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `cost_price` double(10,2) NOT NULL,
  `sale_price` double(10,2) NOT NULL,
  `instock` int(11) NOT NULL,
  `low_stock` int(11) NOT NULL DEFAULT '0',
  `quantity` int(11) NOT NULL,
  `total_price` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `hidden_instock` int(11) NOT NULL,
  `trigger_id` varchar(100) NOT NULL,
  `commision` double(10,2) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `note` text NOT NULL,
  `warranty` date NOT NULL,
  `brand_id` int(11) NOT NULL,
  `poribahan` int(11) NOT NULL,
  `wsale_price` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `warranty_qty` int(11) NOT NULL,
  `warranty_price` int(11) NOT NULL,
  `fixed_head` int(11) NOT NULL,
  `fixed_cost` int(11) NOT NULL,
  `warranty_ref` int(11) NOT NULL,
  `comment` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `product_return`
--

CREATE TABLE `product_return` (
  `id` bigint(20) NOT NULL,
  `product_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `cost_price` double(10,2) NOT NULL,
  `instock` double(11,2) NOT NULL,
  `quantity` double(11,2) NOT NULL,
  `total_price` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `hidden_instock` int(11) NOT NULL,
  `trigger_id` varchar(100) NOT NULL,
  `ime` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `product_sale`
--

CREATE TABLE `product_sale` (
  `id` bigint(20) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `sale_price` double(10,2) NOT NULL,
  `cost_price` double(10,2) NOT NULL,
  `instock` double(11,2) NOT NULL,
  `quantity` double(11,2) NOT NULL,
  `total_price` double(10,2) NOT NULL,
  `total_cost` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `hidden_instock` double(11,2) NOT NULL,
  `trigger_id` varchar(100) NOT NULL,
  `color` text NOT NULL,
  `box` text NOT NULL,
  `ime` text NOT NULL,
  `type` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  `sale_date` varchar(25) NOT NULL,
  `warranty_date` varchar(25) NOT NULL,
  `comment` text NOT NULL,
  `model` text NOT NULL,
  `charge` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `product_sale`
--

INSERT INTO `product_sale` (`id`, `customer_id`, `product_id`, `branch_id`, `sale_price`, `cost_price`, `instock`, `quantity`, `total_price`, `total_cost`, `date`, `user_id`, `hidden_instock`, `trigger_id`, `color`, `box`, `ime`, `type`, `category_id`, `sale_date`, `warranty_date`, `comment`, `model`, `charge`) VALUES
(1, 1, 1, 3, 120.00, 100.00, 0.00, 2.00, 240.00, 200.00, '2025-11-10', 23, 2.00, '1', '', '', '', 1, 1, '', '', '', '', 0);

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

--
-- Table structure for table `product_sale_invoice`
--

CREATE TABLE `product_sale_invoice` (
  `id` bigint(20) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `invoice_number` varchar(30) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `payment_method` varchar(20) NOT NULL,
  `bank_id` tinyint(2) NOT NULL,
  `prev_due` double(10,2) NOT NULL,
  `due` double(10,2) NOT NULL,
  `vat` int(11) DEFAULT NULL,
  `lab_trans` int(11) DEFAULT NULL,
  `discount` double(10,2) NOT NULL,
  `cash_paid` double(10,2) NOT NULL,
  `check_num` varchar(50) NOT NULL,
  `check_amount` int(11) NOT NULL,
  `check_appr_date` varchar(15) NOT NULL,
  `approved_st` tinyint(1) NOT NULL DEFAULT '0',
  `return_st` tinyint(4) NOT NULL DEFAULT '0',
  `total_amount` double(10,2) NOT NULL,
  `cost_amount` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `transport_id` int(11) NOT NULL,
  `total_install` text NOT NULL,
  `install_amount` text NOT NULL,
  `install_date` text NOT NULL,
  `discountt` double(10,2) NOT NULL,
  `mdiscountt` double(11,2) NOT NULL,
  `mdiscount` double(10,2) NOT NULL,
  `type` int(11) NOT NULL,
  `commision` int(11) NOT NULL,
  `ins_type` text NOT NULL,
  `charge` double(10,2) NOT NULL,
  `chargee` double(10,2) NOT NULL,
  `last_ins` text NOT NULL,
  `time` varchar(25) NOT NULL,
  `comment` text NOT NULL,
  `charge_amount` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `product_sale_invoice`
--

INSERT INTO `product_sale_invoice` (`id`, `branch_id`, `invoice_number`, `customer_id`, `payment_method`, `bank_id`, `prev_due`, `due`, `vat`, `lab_trans`, `discount`, `cash_paid`, `check_num`, `check_amount`, `check_appr_date`, `approved_st`, `return_st`, `total_amount`, `cost_amount`, `date`, `user_id`, `transport_id`, `total_install`, `install_amount`, `install_date`, `discountt`, `mdiscountt`, `mdiscount`, `type`, `commision`, `ins_type`, `charge`, `chargee`, `last_ins`, `time`, `comment`, `charge_amount`) VALUES
(1, 3, '2025111003063123', 1, 'EMI', 0, 0.00, 240.00, 0, 0, 0.00, 0.00, '', 0, '2025-11-11', 1, 0, 240.00, 200.00, '2025-11-10', 23, 0, '4', '60', '', 0.00, 0.00, 0.00, 1, 0, '', 0.00, 0.00, '2026-03-10', '3:06 pm', '', 0);

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

--
-- Table structure for table `product_sale_return`
--

CREATE TABLE `product_sale_return` (
  `id` bigint(20) NOT NULL,
  `product_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `sale_price` double(10,2) NOT NULL,
  `cost_price` double(10,2) NOT NULL,
  `instock` double(11,2) NOT NULL,
  `quantity` double(11,2) NOT NULL,
  `total_price` double(10,2) NOT NULL,
  `total_cost` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `hidden_instock` int(11) NOT NULL,
  `trigger_id` varchar(100) NOT NULL,
  `ime` text NOT NULL,
  `sale_date` varchar(25) NOT NULL,
  `warranty_date` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `product_sale_return_invoice`
--

CREATE TABLE `product_sale_return_invoice` (
  `id` bigint(20) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `invoice_number` varchar(30) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `payment_method` varchar(20) NOT NULL,
  `bank_id` tinyint(2) NOT NULL,
  `due` double(10,2) NOT NULL,
  `discount` double(10,2) NOT NULL,
  `cash_paid` double(10,2) NOT NULL,
  `check_num` varchar(50) NOT NULL,
  `check_amount` int(11) NOT NULL,
  `check_appr_date` varchar(15) NOT NULL,
  `approved_st` tinyint(1) NOT NULL DEFAULT '0',
  `total_amount` double(10,2) NOT NULL,
  `cost_amount` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `delivery` int(11) NOT NULL,
  `time` varchar(25) NOT NULL,
  `send` int(11) NOT NULL DEFAULT '0',
  `receive` int(11) NOT NULL DEFAULT '0',
  `product_id` int(11) NOT NULL,
  `ime` text NOT NULL,
  `sale_date` text NOT NULL,
  `warranty_date` text NOT NULL,
  `quantity` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `hidden_instock` int(11) NOT NULL,
  `delivery_date` varchar(25) NOT NULL,
  `comment` text NOT NULL,
  `sale_comment` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `promotions`
--

CREATE TABLE `promotions` (
  `id` int(11) NOT NULL,
  `ime` text NOT NULL,
  `amount` double(10,2) NOT NULL,
  `date` varchar(25) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `rdate` varchar(25) NOT NULL,
  `supplier_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `prsons`
--

CREATE TABLE `prsons` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `code` int(11) NOT NULL,
  `date` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `purchase_invoice`
--

CREATE TABLE `purchase_invoice` (
  `id` bigint(20) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `invoice_number` varchar(30) NOT NULL,
  `chalan_no` varchar(30) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `payment_method` varchar(20) NOT NULL,
  `bank_id` tinyint(2) NOT NULL,
  `due` double(10,2) NOT NULL,
  `discount` double(10,2) NOT NULL,
  `cash_paid` double(10,2) NOT NULL,
  `check_num` varchar(50) NOT NULL,
  `check_amount` int(11) NOT NULL,
  `check_appr_date` varchar(15) NOT NULL,
  `approved_st` tinyint(1) NOT NULL DEFAULT '0',
  `return_st` tinyint(4) NOT NULL DEFAULT '0',
  `total_amount` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `time` varchar(25) NOT NULL,
  `transport` int(11) NOT NULL,
  `fixed_amount` int(11) NOT NULL,
  `warranty_amount` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `purchase_return_invoice`
--

CREATE TABLE `purchase_return_invoice` (
  `id` bigint(20) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `invoice_number` varchar(30) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `payment_method` varchar(20) NOT NULL,
  `bank_id` tinyint(2) NOT NULL,
  `due` double(10,2) NOT NULL,
  `discount` double(10,2) NOT NULL,
  `cash_paid` double(10,2) NOT NULL,
  `check_num` varchar(50) NOT NULL,
  `check_amount` int(11) NOT NULL,
  `check_appr_date` varchar(15) NOT NULL,
  `approved_st` tinyint(1) NOT NULL DEFAULT '0',
  `total_amount` double(10,2) NOT NULL,
  `cost_amount` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `delivery` int(11) NOT NULL,
  `time` varchar(25) NOT NULL,
  `damage` int(11) NOT NULL DEFAULT '0',
  `receive` int(11) NOT NULL DEFAULT '0',
  `product_id` int(11) NOT NULL,
  `ime` text NOT NULL,
  `sale_date` text NOT NULL,
  `warranty_date` text NOT NULL,
  `quantity` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `hidden_instock` int(11) NOT NULL,
  `delivery_date` varchar(25) NOT NULL,
  `price` int(11) NOT NULL,
  `total_price` int(11) NOT NULL,
  `invoice` text NOT NULL,
  `taka_return` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `salary_heads`
--

CREATE TABLE `salary_heads` (
  `id` int(11) NOT NULL,
  `name` varchar(254) NOT NULL,
  `code` varchar(25) NOT NULL,
  `branch_id` int(3) NOT NULL,
  `user_id` int(3) NOT NULL,
  `date` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `salary_payment`
--

CREATE TABLE `salary_payment` (
  `id` bigint(20) NOT NULL,
  `employee_id` int(11) NOT NULL,
  `description` text NOT NULL,
  `amount` int(11) NOT NULL,
  `date` text NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `bank_id` int(11) NOT NULL,
  `check_num` text NOT NULL,
  `check_amount` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `salesmans`
--

CREATE TABLE `salesmans` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `code` varchar(14) NOT NULL,
  `address` text NOT NULL,
  `contact_no` varchar(15) NOT NULL,
  `previous_balance` int(11) NOT NULL,
  `prev_bal` double(10,2) NOT NULL,
  `balance` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `sale_commisons`
--

CREATE TABLE `sale_commisons` (
  `id` int(11) NOT NULL,
  `amount` int(11) NOT NULL,
  `date` text NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `services` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `date` text NOT NULL,
  `customer_id` text NOT NULL,
  `model` text NOT NULL,
  `paid` int(11) NOT NULL,
  `due` int(11) NOT NULL,
  `complete` int(11) NOT NULL,
  `delivery` int(11) NOT NULL,
  `charge` int(11) NOT NULL,
  `time` varchar(25) NOT NULL,
  `cash_paid` int(11) NOT NULL,
  `delivery_date` varchar(25) NOT NULL,
  `complete_date` varchar(20) NOT NULL,
  `discount` int(11) NOT NULL,
  `sale_trigger_id` int(11) NOT NULL,
  `sale_paid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `studentps`
--

CREATE TABLE `studentps` (
  `id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `amount` double(10,2) NOT NULL,
  `date` varchar(25) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `balance` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `students`
--

CREATE TABLE `students` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `contact` varchar(254) NOT NULL,
  `address` varchar(254) NOT NULL,
  `fee` int(11) NOT NULL,
  `date` varchar(25) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `balance` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `subjects`
--

CREATE TABLE `subjects` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `code` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `suppliers` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `code` varchar(14) NOT NULL,
  `address` text NOT NULL,
  `contact_no` varchar(15) NOT NULL,
  `previous_balance` int(11) NOT NULL,
  `prev_bal` double(10,2) NOT NULL,
  `balance` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `supplier_collection`
--

CREATE TABLE `supplier_collection` (
  `id` bigint(20) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `previous_balance` int(11) DEFAULT NULL,
  `paid` int(11) NOT NULL,
  `balance` int(11) DEFAULT NULL,
  `date` varchar(25) NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `take_loan`
--

CREATE TABLE `take_loan` (
  `id` bigint(20) NOT NULL,
  `head_id` int(3) NOT NULL,
  `comment` text NOT NULL,
  `amount` int(11) NOT NULL,
  `date` varchar(25) NOT NULL,
  `user_id` int(3) NOT NULL,
  `branch_id` int(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `transport`
--

CREATE TABLE `transport` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `branch_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `userps`
--

CREATE TABLE `userps` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `amount` double(10,2) NOT NULL,
  `date` varchar(25) NOT NULL,
  `suser_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `balance` int(11) NOT NULL,
  `prev` int(11) NOT NULL,
  `balancen` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `vendor_return`
--

CREATE TABLE `vendor_return` (
  `id` bigint(20) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `price` int(11) NOT NULL,
  `total_price` int(11) NOT NULL,
  `invoice_number` varchar(30) NOT NULL,
  `cash_paid` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `delivery` int(11) NOT NULL,
  `time` varchar(25) NOT NULL,
  `taka_receive` int(11) NOT NULL DEFAULT '0',
  `product_receive` int(11) NOT NULL DEFAULT '0',
  `product_id` int(11) NOT NULL,
  `ime` text NOT NULL,
  `chalan_no` text NOT NULL,
  `warranty_date` text NOT NULL,
  `quantity` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `trigger_id` int(11) NOT NULL,
  `hidden_instock` int(11) NOT NULL,
  `instock` int(11) NOT NULL,
  `damage` int(11) NOT NULL,
  `taka_quantity` int(11) NOT NULL,
  `rcv_quantity` int(11) NOT NULL,
  `purchase_trigger_id` int(11) NOT NULL,
  `comment` text NOT NULL,
  `paid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `vendor_return_invoice`
--

CREATE TABLE `vendor_return_invoice` (
  `id` bigint(20) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `price` int(11) NOT NULL,
  `total_price` int(11) NOT NULL,
  `invoice_number` varchar(30) NOT NULL,
  `cash_paid` double(10,2) NOT NULL,
  `date` varchar(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `delivery` int(11) NOT NULL,
  `time` varchar(25) NOT NULL,
  `send` int(11) NOT NULL DEFAULT '0',
  `receive` int(11) NOT NULL DEFAULT '0',
  `product_id` int(11) NOT NULL,
  `ime` text NOT NULL,
  `chalan_no` text NOT NULL,
  `warranty_date` text NOT NULL,
  `quantity` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `hidden_instock` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `voucher_sale`
--

CREATE TABLE `voucher_sale` (
  `id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `barcode` text NOT NULL,
  `quantity` int(11) NOT NULL,
  `price` double(10,2) NOT NULL,
  `total_price` double(10,2) NOT NULL,
  `hidden_instock` int(11) NOT NULL,
  `instock` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` text NOT NULL,
  `status` text NOT NULL,
  `subject` text NOT NULL,
  `note` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

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

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

--
-- Indexes for table `asset_heads`
--
ALTER TABLE `asset_heads`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`);

--
-- Indexes for table `banks`
--
ALTER TABLE `banks`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`);

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `employees`
--
ALTER TABLE `employees`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`);

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

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

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

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

--
-- Indexes for table `heads`
--
ALTER TABLE `heads`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`);

--
-- Indexes for table `imes`
--
ALTER TABLE `imes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `ime` (`ime`);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `salary_heads`
--
ALTER TABLE `salary_heads`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`);

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

--
-- Indexes for table `salesmans`
--
ALTER TABLE `salesmans`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`);

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

--
-- AUTO_INCREMENT for table `branches`
--
ALTER TABLE `branches`
  MODIFY `id` int(3) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

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

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int(3) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `mnss`
--
ALTER TABLE `mnss`
  MODIFY `id` int(3) NOT NULL AUTO_INCREMENT;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

