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

START TRANSACTION;



--
-- Database: `distributor_stock_report_db`
--

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

--
-- Table structure for table `distributor`
--

CREATE TABLE `distributor` (
  `id` int(11) NOT NULL,
  `code` varchar(20) NOT NULL,
  `super_stockist_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` varchar(255) NOT NULL,
  `mobile` varchar(20) NOT NULL,
  `location_id` int(11) NOT NULL,
  `so_id` int(11) NOT NULL,
  `reporting_manager_id` int(11) NOT NULL,
  `status` varchar(20) NOT NULL COMMENT 'Active,Inactive'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `distributor`
--

INSERT INTO `distributor` (`id`, `code`, `super_stockist_id`, `name`, `description`, `mobile`, `location_id`, `so_id`, `reporting_manager_id`, `status`) VALUES
(1, 'CKA0527', 1, 'ARAVI AGENCY', '', '', 1, 46, 95, 'Active'),
(2, 'CKA0706', 1, 'SRI VALLAPAI VINAYAGAR AGENCY', '', '', 1, 46, 95, 'Active'),
(3, 'CKA0767', 1, 'K.R.M.AGENCY', '', '', 1, 46, 95, 'Active'),
(4, 'CKA0109', 1, 'SRI JAYA GURU AGENCY', '', '', 1, 46, 95, 'Active'),
(5, 'CKA0023', 1, 'D.VIJAYALAKSHMI', '', '', 1, 46, 95, 'Active'),
(6, 'CKA0209', 1, 'MURUGESAN AGENCY', '', '', 1, 46, 95, 'Active'),
(7, 'CKA0719', 1, 'R . MANOJ AGENCY', '', '', 1, 46, 95, 'Active'),
(9, 'CKA0590', 3, 'VPR MARKETING', '', '', 1, 39, 96, 'Active'),
(10, 'CKA0672', 3, 'KUMAR AGENCIES', '', '', 1, 39, 96, 'Active'),
(11, 'CKA0112', 3, 'SRI KARUPPASAMY AGENCIES (H)', '', '', 1, 39, 96, 'Active'),
(12, 'CKA0214', 3, 'SRI ALAGAR MALAIYAN AGENCY', '', '', 1, 39, 96, 'Active'),
(13, 'CKA0630', 3, 'VPS AGENCY', '', '', 1, 39, 96, 'Active'),
(14, 'CSA0446', 4, 'ASHVANTH TRADERS', '', '', 1, 76, 99, 'Active'),
(15, 'CSA0369', 4, 'G.V. AGENCY', '', '', 1, 76, 99, 'Active'),
(16, 'CSA0492', 4, 'BISMILLAH AGENCIES', '', '', 1, 76, 99, 'Active'),
(17, 'CSA0491', 4, 'VELMANI AGENCY', '', '', 1, 76, 99, 'Active'),
(18, 'CTC0273', 2, 'NATIONAL ROOTS', '', '', 1, 12, 68, 'Active'),
(19, 'CTC0453', 2, 'SHISA ENTERPRISES', '', '', 1, 12, 68, 'Active'),
(20, 'CMV0320', 2, 'KUMAR TRADERS', '', '', 1, 6, 92, 'Active'),
(21, 'CTC0440', 2, 'MURUGAN AGENCY', '', '', 1, 13, 68, 'Active'),
(22, 'CMV0433', 2, 'Krishna Agency', '', '', 1, 13, 68, 'Active'),
(23, 'CKA0569', 1, 'SAI RAM AGENCY', '', '', 1, 48, 95, 'Active'),
(24, 'CKA0787', 1, 'THREE STAR AGENCIES', '', '', 1, 48, 95, 'Active'),
(25, 'CKA0712', 1, 'JAZZLYN AGENCY', '', '', 1, 48, 95, 'Active'),
(26, 'CKA0526', 1, 'MAHALINGAM NADAR & CO', '', '', 1, 48, 95, 'Active'),
(27, 'CKA0337', 1, 'A.R.RAHMAN AGENCIES', '', '', 1, 48, 95, 'Active'),
(28, 'CKA0775', 1, 'AJITH AGENCY', '', '', 1, 48, 95, 'Active'),
(29, 'CKA0758', 1, 'R.R.V.AGENCY', '', '', 1, 48, 95, 'Active'),
(30, 'CKA0570', 3, 'BISMI AGENCY', '', '', 1, 42, 96, 'Active'),
(31, 'CKA0743', 3, 'R.D. AGENCY', '', '', 1, 42, 96, 'Active'),
(32, 'CKA0157', 3, 'K.B.AMUDHA AGENCY', '', '', 1, 42, 96, 'Active'),
(33, 'CKA0635', 3, 'MM AGENCIES', '', '', 1, 42, 96, 'Active'),
(34, 'CKA0529', 3, 'SRI HARI AGENCY', '', '', 1, 40, 96, 'Active'),
(35, 'CKA0592', 3, 'CHELLAM TRADERS', '', '', 1, 40, 96, 'Active'),
(36, 'CKA0665', 3, 'RAJAN AGENCIES', '', '', 1, 40, 96, 'Active'),
(37, 'CKA0793', 3, 'MADURAI MEENAKSHI MARKETING', '', '', 1, 40, 96, 'Active'),
(38, 'CTC0371', 5, 'SRI MAHA AGENCY', '', '', 1, 40, 111, 'Active'),
(39, 'CTC0329', 5, 'SIVA DHAKSHANA MURTHY AGENCIES', '', '', 1, 40, 111, 'Active'),
(40, 'CTC0496', 5, 'NEW SHANTHI STORES', '', '', 1, 40, 111, 'Active'),
(41, 'CTC0497', 5, 'SRI RAM SYSTEMS', '', '', 1, 40, 111, 'Active'),
(42, 'CTC0498', 5, 'GEN Z FOOD\'S BEVERAGES', '', '', 1, 40, 111, 'Active'),
(43, 'CTC0499', 5, 'PON DHAKASHANA MOORTHY ENTERPRISE', '', '', 1, 40, 111, 'Active'),
(44, 'CV20400', 5, 'LAKSHMI GENERAL', '', '', 1, 40, 111, 'Active'),
(45, 'CTC0419', 5, 'MURUGA AGENCIES', '', '', 1, 40, 111, 'Active'),
(46, 'CTC0002', 5, 'ANBU AGENCIES', '', '', 1, 40, 111, 'Active'),
(47, 'CV20108', 6, 'SENTHUR MURUGAPPA AGENCIES', '', '', 1, 88, 108, 'Active'),
(48, 'CV20181', 6, 'Lakshmi Agencies', '', '', 1, 88, 108, 'Active'),
(49, 'CV20084', 7, 'PACHAI VAAZHI AMMAN AGENCY', '', '', 1, 73, 72, 'Active'),
(50, 'CV20034', 7, 'SIVASAKTHI AGENCIES', '', '', 1, 73, 72, 'Active'),
(51, 'CV20221', 7, 'MR AGENCIES', '', '', 1, 73, 72, 'Active'),
(52, 'CV20161', 7, 'SRI PERIYANDAVAR ASSOCIATES', '', '', 1, 73, 72, 'Active'),
(53, 'CV20222', 7, 'GSB AGENCY', '', '', 1, 73, 72, 'Active'),
(56, 'CMV0333', 2, 'Sri Devi Agency', '', '', 1, 7, 92, 'Active'),
(57, 'CMV0428', 2, 'NAVANARI ENTERPRISES PRIVATE LIMITED', '', '', 1, 7, 68, 'Active'),
(58, 'CTC0282', 2, 'MANO TRADERS', '', '', 1, 7, 68, 'Active'),
(59, 'CTC0306', 2, 'SM ENTERPRISES', '', '', 1, 7, 68, 'Active'),
(60, 'CTC0007', 2, 'DHANALAKSHMI AGENCIES', '', '', 1, 7, 68, 'Active'),
(61, 'CTC0461', 2, 'FRIENDS LOYAL ENTERPRISES', '', '', 1, 7, 68, 'Active'),
(62, 'CMV0139', 2, 'Adithya Enterprises', '', '', 1, 7, 68, 'Active'),
(63, 'CMV0160', 2, 'SEVVEL AGENCY', '', '', 1, 7, 68, 'Active'),
(64, 'CTC0432', 2, 'ABI ENTERPRISES', '', '', 1, 7, 68, 'Active'),
(65, 'CTC0451', 2, 'Gurumuni Agency', '', '', 1, 7, 68, 'Active'),
(66, 'CTC0460', 2, 'SRI VEERA VINAYAGA ENTERPRISES', '', '', 1, 7, 68, 'Active'),
(67, 'CMV0001', 2, 'SRI LAKSHAPAWAN TRADERS', '', '', 1, 7, 91, 'Active'),
(68, 'CMV0321', 2, 'A U MARKETING', '', '', 1, 7, 91, 'Active'),
(69, 'CMV0344', 2, 'AFFLONN MARKETING PRIVATE LIMITED', '', '', 1, 7, 91, 'Active'),
(70, '1000468', 2, 'Reliance Retail Ltd', '', '', 1, 7, 91, 'Active'),
(71, 'CMV0095', 2, 'S R ENTERPRISES', '', '', 1, 7, 94, 'Active'),
(72, 'CMV0361', 2, 'JAIN MARKETING', '', '', 1, 7, 94, 'Active'),
(74, 'CMV0441', 2, 'SIVASHREE HARI ENTERPRISES', '', '', 1, 7, 94, 'Active'),
(77, 'CKA0710', 3, 'ABHINAV AGENCY', '', '', 1, 7, 96, 'Active'),
(78, 'CKA0669', 3, 'Star Lucents', '', '', 1, 7, 96, 'Active'),
(79, 'CMV0432', 2, 'SIDDARTH AGENCY', '', '', 1, 4, 92, 'Active'),
(80, 'CV20082', 8, 'SANTHA AGENCY -PONDICHERRY', '', '', 1, 80, 109, 'Active'),
(81, 'CV20050', 8, 'AADHAVAN AGENCIES', '', '', 1, 80, 109, 'Active'),
(82, 'CV20083', 8, 'T M ENTERPRISES', '', '', 1, 80, 109, 'Active'),
(83, 'CSA0508', 4, 'GEETHASRI AGENCIES', '', '', 1, 74, 99, 'Active'),
(84, 'CSA0081', 4, 'SRI SELVAGANAPATHI AGENCIES', '', '', 1, 74, 99, 'Active'),
(85, 'CSA0101', 4, 'SRI MAHAGANAPATHY AGENCIES', '', '', 1, 74, 99, 'Active'),
(86, 'CSA0503', 4, 'STAR TRADERS', '', '', 1, 74, 99, 'Active'),
(87, 'CSA0108', 4, 'THIRUMALAI AGENCIES', '', '', 1, 74, 99, 'Active'),
(88, 'CSA0041', 4, 'SRI DEVE AGENCIES', '', '', 1, 74, 99, 'Active'),
(89, 'CSA0086', 4, 'SRS AGENCIES', '', '', 1, 74, 99, 'Active'),
(90, 'CKA0732', 9, 'SRI MOORTHI AGENCIES', '', '', 1, 54, 98, 'Active'),
(91, 'COI0069', 9, 'PREJA AGENCIES', '', '', 1, 54, 98, 'Active'),
(92, 'COI0123', 9, 'P.K.TRADERS', '', '', 1, 54, 98, 'Active'),
(93, 'CKA0737', 3, 'AATHI TRADERS', '', '', 1, 34, 101, 'Active'),
(94, 'CKA0634', 3, 'Kumar Traders', '', '', 1, 34, 101, 'Active'),
(95, 'CKA0729', 3, 'SSR TRADERS', '', '', 1, 34, 101, 'Active'),
(96, 'CKA0012', 3, 'ANDREA AGENCY', '', '', 1, 34, 101, 'Active'),
(99, 'CMV0413', 2, 'Varnika Enterprises', '', '', 1, 8, 92, 'Active'),
(100, 'CMV0144', 2, 'PKS ENTERPRISES', '', '', 1, 3, 92, 'Active'),
(101, 'CMV0419', 2, 'SHREE SRINIVASA AGENCIES', '', '', 1, 3, 92, 'Active'),
(102, 'CMV0293', 2, 'SF AGENCY', '', '', 1, 5, 92, 'Active'),
(103, 'CV20059', 6, 'SRI KAMALAM AGENCIES', '', '', 1, 89, 108, 'Active'),
(104, 'CV20131', 6, 'AKSHAYA TRADERS', '', '', 1, 89, 108, 'Active'),
(105, 'CV20184', 6, 'SRI GANESH AGENCIES', '', '', 1, 89, 108, 'Active'),
(106, 'CV20009', 10, 'RAHEEM AGENCIES', '', '', 1, 78, 106, 'Active'),
(107, 'CV20097', 10, 'SRI KAMATCHI AMMAN AGENCIES', '', '', 1, 78, 106, 'Active'),
(108, 'CV20203', 10, 'WIN Marketing', '', '', 1, 78, 106, 'Active'),
(109, 'CMV0352', 2, 'BALA TRADERS', '', '', 1, 25, 94, 'Active'),
(110, 'CV20104', 7, 'SRI THIRUPPATHI TRADERS', '', '', 1, 38, 38, 'Active'),
(111, 'CV20177', 7, 'K.RAMESH MAHALAKSHMI AGENCIES', '', '', 1, 38, 38, 'Active'),
(112, 'CV20201', 7, 'Sri Sakthi murugan agency ', '', '', 1, 38, 38, 'Active'),
(113, 'CV20069', 7, 'RAJU AGENCIES', '', '', 1, 38, 38, 'Active'),
(114, 'CV20140', 7, 'SADHANA SAI AGENCY', '', '', 1, 38, 38, 'Active'),
(115, 'CV20073', 7, 'SRI MEENAKSHI AGENCIES', '', '', 1, 38, 38, 'Active'),
(116, 'CV20204', 7, 'MKS AGENCIES ', '', '', 1, 38, 38, 'Active'),
(117, 'CV20174', 7, 'SENTHUR KUMARAN MUGAVANMAI', '', '', 1, 38, 38, 'Active'),
(118, 'CV20098', 7, 'TAMIL AGENCIES', '', '', 1, 38, 38, 'Active'),
(119, 'CV20213', 7, 'M.S.M. TRADERS', '', '', 1, 38, 38, 'Active'),
(120, 'CV20214', 7, 'VIDIYAL AGENCIES', '', '', 1, 38, 38, 'Active'),
(124, 'CSA0500', 11, 'RS AGENCY', '', '', 1, 67, 97, 'Active'),
(125, 'CSA0431', 11, 'ANISH TRADERS', '', '', 1, 67, 97, 'Active'),
(126, 'CSA0463', 11, 'BHAVANI AGENCIES', '', '', 1, 67, 97, 'Active'),
(127, 'CTC0476', 2, 'STAR MARKETING', '', '', 1, 17, 68, 'Active'),
(128, 'CMV0436', 2, 'J N ENTERPRISES', '', '', 1, 17, 68, 'Active'),
(131, 'CSA0497', 11, 'SANJANA AGENCY', '', '', 1, 63, 97, 'Active'),
(132, 'CSA0456', 11, 'SRI VEKKAALI AMMAN FOODS & AGENCIES', '', '', 1, 63, 97, 'Active'),
(133, 'CSA0415', 11, 'LATHA ENTERPRIZES', '', '', 1, 63, 97, 'Active'),
(134, 'CSA0443', 11, 'DHANU SRI AGENCY\'S', '', '', 1, 63, 97, 'Active'),
(135, 'CSA0480', 11, 'SRI VELAVA AGENCY', '', '', 1, 63, 97, 'Active'),
(136, 'CSA0460', 11, 'BALAJI AGENCY', '', '', 1, 63, 97, 'Active'),
(137, 'CSA0513', 12, 'AADHAVA ENTERPRISES', '', '', 1, 52, 100, 'Active'),
(138, 'CSA0359', 12, 'SHAKTHI & CO', '', '', 1, 52, 100, 'Active'),
(139, 'CSA0506', 12, 'SIVAN AGENCIES', '', '', 1, 52, 100, 'Active'),
(140, 'CSA0511', 12, 'MANII SAMI AGENCY', '', '', 1, 52, 100, 'Active'),
(141, 'CSA0397', 12, 'D.S.ENTERPRISES', '', '', 1, 52, 100, 'Active'),
(142, 'CV20135', 6, 'RUBY FOOD AND BEVERAGES', '', '', 1, 87, 108, 'Active'),
(143, 'CV20219', 6, 'KAVIYARAJ AGENCY', '', '', 1, 87, 108, 'Active'),
(144, 'CV20202', 6, 'BALAJI AGENCY', '', '', 1, 87, 108, 'Active'),
(145, 'CTC0417', 5, 'KK ENTERPRISES', '', '', 1, 90, 112, 'Active'),
(146, 'CTC0484', 5, 'M.R.S. ENTERPRISES', '', '', 1, 90, 112, 'Active'),
(147, 'CTC0101', 5, 'POONGAVANATHAMMAN TRADERS', '', '', 1, 90, 112, 'Active'),
(148, 'CTC0448', 5, 'DEVA AGENCIES', '', '', 1, 90, 112, 'Active'),
(149, 'CTC0456', 5, 'THIRUMALAI TRADERS', '', '', 1, 90, 112, 'Active'),
(150, 'CKA0383', 13, 'SUPREME AGENCY', '', '', 1, 69, 102, 'Active'),
(151, 'CKA0583', 13, 'GURUVEL TRADERS', '', '', 1, 69, 102, 'Active'),
(152, 'CKA0780', 13, 'MS AGENCY', '', '', 1, 69, 102, 'Active'),
(153, 'CSA0324', 12, 'KESAVAN AGENCYS', '', '', 1, 51, 100, 'Active'),
(154, 'CSA0469', 12, 'AAYAN AGENCY', '', '', 1, 51, 100, 'Active'),
(155, 'CSA0367', 12, 'SLV ENTERPRISES (HOSUR)', '', '', 1, 51, 100, 'Active'),
(156, 'CSA0451', 12, 'IMRAN AGENCY', '', '', 1, 51, 100, 'Active'),
(157, 'CSA0403', 12, 'TRINETRA AGENCY', '', '', 1, 51, 100, 'Active'),
(158, 'CSA0450', 12, 'SRI LAKSHMI NARASIMMA AGENCY', '', '', 1, 51, 100, 'Active'),
(159, 'CSA0360', 12, 'NAYAM ASSOCIATES', '', '', 1, 51, 100, 'Active'),
(160, 'CSA0499', 12, 'PUNARVIKA  ENTERPRICES', '', '', 1, 51, 100, 'Active'),
(161, 'CNI0006', 9, 'SIVASAKTHI TRADERS', '', '', 1, 59, 98, 'Active'),
(162, 'COI0139', 9, 'Bussinext Info', '', '', 1, 59, 98, 'Active'),
(163, 'COI0162', 9, 'CLASSIC COLA', '', '', 1, 59, 98, 'Active'),
(165, 'CKA0716', 3, 'KUMARAN AGENCY', '', '', 1, 35, 101, 'Active'),
(166, 'CKA0623', 3, 'DHANALAKSHMI AGENCY', '', '', 1, 35, 101, 'Active'),
(167, 'CKA0075', 3, 'RAJ AGENCY', '', '', 1, 35, 101, 'Active'),
(168, 'CKA0673', 3, 'JASMINE AGENCY', '', '', 1, 35, 101, 'Active'),
(169, 'CKA0553', 1, 'NAVANNIDHI AGENCY', '', '', 1, 49, 95, 'Active'),
(170, 'CKA0336', 1, 'RAGAM AGENCIES', '', '', 1, 49, 95, 'Active'),
(171, 'CKA0102', 1, 'SONA VARSHINI AGENCIES', '', '', 1, 49, 95, 'Active'),
(172, 'CKA0009', 1, 'AMBIKA AGENCY', '', '', 1, 49, 95, 'Active'),
(173, 'CKA0021', 1, 'CORAM TRADERS', '', '', 1, 49, 95, 'Active'),
(174, 'CKA0061', 1, 'MUTHU ENTERPRISES', '', '', 1, 49, 95, 'Active'),
(175, 'CKA0790', 1, 'THIRUMURUGAN AGENCY', '', '', 1, 49, 95, 'Active'),
(176, 'CKA0792', 1, 'MATHA AGENCIES', '', '', 1, 49, 95, 'Active'),
(177, 'CKA0122', 1, 'SRI VENKATESHWARA AGENCIES', '', '', 1, 49, 95, 'Active'),
(178, 'CKA0587', 3, 'SIVA SRI AGENCY', '', '', 1, 41, 96, 'Active'),
(179, 'CKA0734', 3, 'FELINA AGENCY', '', '', 1, 41, 96, 'Active'),
(180, 'CKA0781', 3, 'Lakshmi Traders', '', '', 1, 41, 96, 'Active'),
(181, 'CKA0717', 3, 'SHREE AGENCIES', '', '', 1, 41, 96, 'Active'),
(182, 'CKA0730', 3, 'AMD & CO', '', '', 1, 41, 96, 'Active'),
(183, 'COI0053', 9, 'G P AGENCIES', '', '', 1, 58, 98, 'Active'),
(184, 'COI0140', 9, 'SRI BALAJI AGENCIES', '', '', 1, 58, 98, 'Active'),
(185, 'COI0150', 9, 'J.P.AA & CO', '', '', 1, 58, 98, 'Active'),
(186, 'COI0158', 9, 'SRI MURUGAN AGENCIES', '', '', 1, 58, 98, 'Active'),
(187, 'CKA0744', 3, 'AL-MINAR TRADERS', '', '', 1, 32, 101, 'Active'),
(188, 'CKA0667', 3, 'RAJA MOHAMED AGENCY', '', '', 1, 32, 101, 'Active'),
(189, 'CKA0783', 3, 'MSK AGENCIES', '', '', 1, 32, 101, 'Active'),
(190, 'CV20197', 6, 'G AGENCY', '', '', 1, 86, 108, 'Active'),
(191, 'CV20198', 6, 'UDHAYAM TRADERS', '', '', 1, 86, 108, 'Active'),
(192, 'CV20217', 6, 'SANTHI AGENCY', '', '', 1, 86, 108, 'Active'),
(193, 'CTC0444', 14, 'K.S.R ENTERPRISES', '', '', 1, 84, 113, 'Active'),
(194, 'CTC0063', 14, 'THIRUMALAI AGENCIES(2015)', '', '', 1, 84, 113, 'Active'),
(195, 'CTC0027', 14, 'N SQUARE AGENCY', '', '', 1, 84, 113, 'Active'),
(196, 'CSA0484', 12, 'ATHIYA AGENCY', '', '', 1, 53, 100, 'Active'),
(197, 'CSA0003', 12, 'BEST AGENCY', '', '', 1, 53, 100, 'Active'),
(198, 'CSA0096', 12, 'M.N.R.AGENCY', '', '', 1, 53, 100, 'Active'),
(199, 'CSA0002', 12, 'M.S AGENCY', '', '', 1, 53, 100, 'Active'),
(200, 'CSA0505', 12, 'V.K.R TRADERS', '', '', 1, 53, 100, 'Active'),
(201, 'CSA0377', 12, 'J.C.M. AGENCIES', '', '', 1, 50, 100, 'Active'),
(202, 'CSA0303', 12, 'N S AGENCIES', '', '', 1, 50, 100, 'Active'),
(203, 'CSA0342', 12, 'SRI IYAPPAN AGENCY', '', '', 1, 50, 100, 'Active'),
(204, 'CSA0015', 12, 'SRI VADIVEL AGENCY', '', '', 1, 50, 100, 'Active'),
(205, 'CSA0225', 12, 'SRI THIRUMALAI AGENCIES', '', '', 1, 50, 100, 'Active'),
(206, 'CSA0483', 12, 'SRIVARU ENTERPRISES', '', '', 1, 50, 100, 'Active'),
(207, 'CSA0467', 12, 'SRI VINAYAGA AGENCY', '', '', 1, 50, 100, 'Active'),
(208, 'CSA0475', 11, 'VSP AGENCIES', '', '', 1, 66, 97, 'Active'),
(209, 'CSA0432', 11, 'CHERRY AGENCIES', '', '', 1, 66, 97, 'Active'),
(210, 'CSA0106', 11, 'SHREE TRADERS', '', '', 1, 66, 97, 'Active'),
(211, 'COI0079', 9, 'CHERAN TRADERS', '', '', 1, 55, 98, 'Active'),
(212, 'COI0142', 9, 'KAVYA TRADERS', '', '', 1, 55, 98, 'Active'),
(213, 'CKA0692', 13, 'SUBI TRADERS', '', '', 1, 71, 103, 'Active'),
(214, 'CKA0785', 13, 'A3P ENTERPRISES', '', '', 1, 71, 103, 'Active'),
(215, 'CKA0756', 13, 'LOKESH STORE', '', '', 1, 71, 103, 'Active'),
(216, 'CKA0779', 13, 'ANANDA AGENCY', '', '', 1, 71, 103, 'Active'),
(217, 'CKA0747', 13, 'SRI MAALAIAMMAN TRADERS', '', '', 1, 71, 103, 'Active'),
(219, 'CTC0494', 2, 'A.M. ENTERPRISES', '', '', 1, 14, 91, 'Active'),
(220, 'CMV0002', 2, 'GABRIAL TRADERS', '', '', 1, 14, 91, 'Active'),
(221, 'CMV0007', 2, 'OM MURUGA AGENCIES', '', '', 1, 14, 91, 'Active'),
(222, 'CMV0408', 2, 'MEDI ZONE PHARMA', '', '', 1, 14, 91, 'Active'),
(223, 'Pad 01', 2, 'THE TRIPLICANE URBAN COOPERATIVE SOCIETY LIMITED', '', '', 1, 14, 91, 'Active'),
(224, 'CMV0397', 2, 'NARAYANI AGENCY', '', '', 1, 14, 91, 'Active'),
(225, 'CMV0435', 2, 'SARAVANA ENTERPRISES', '', '', 1, 11, 68, 'Active'),
(226, 'CTC0399', 2, 'POOJA ENTERPRISES', '', '', 1, 11, 68, 'Active'),
(227, 'CMV0437', 2, 'LATTA SUPER MARKET', '', '', 1, 11, 68, 'Active'),
(228, 'CV20045', 7, 'Karthi Agencies', '', '', 1, 37, 38, 'Active'),
(229, 'CV20128', 7, 'A. RAGUL ENTERPRISES', '', '', 1, 37, 38, 'Active'),
(230, 'CV20062', 7, 'KAVITHA AGENCIES', '', '', 1, 37, 38, 'Active'),
(231, 'CV20017', 7, 'ESK AGENCIES', '', '', 1, 37, 38, 'Active'),
(232, 'CV20063', 7, 'MANI AGENCY', '', '', 1, 37, 38, 'Active'),
(233, 'CV20195', 7, 'GV Agencies', '', '', 1, 37, 38, 'Active'),
(234, 'CV20008', 10, 'HARI AGENCY', '', '', 1, 37, 38, 'Active'),
(235, 'CV20007', 10, 'JAYAM AGENCY', '', '', 1, 37, 38, 'Active'),
(236, 'CKA0636', 3, 'UMAAS AGENCIES', '', '', 1, 44, 96, 'Active'),
(237, 'CKA0393', 3, 'ANANTHA LAKSHMI AGENCY', '', '', 1, 44, 96, 'Active'),
(238, 'CKA0577', 3, 'VEL AGENCY', '', '', 1, 44, 96, 'Active'),
(239, 'CKA0794', 15, 'R.D. AGENCY (OUTLET)', '', '', 1, 44, 96, 'Active'),
(240, 'CKA0087', 3, 'SAMRAH AGENCY (NO-1)', '', '', 1, 44, 96, 'Active'),
(241, 'CKA0761', 13, 'UMAYAL ENTERPRICES', '', '', 1, 70, 102, 'Active'),
(242, 'CKA0740', 13, 'S.M.A DISTRIBUTOR', '', '', 1, 70, 102, 'Active'),
(243, 'CKA0772', 13, 'VARSHITHAA TRADERS', '', '', 1, 70, 102, 'Active'),
(244, 'CKA0759', 13, 'T.P.S ELIYARAJ MALIGAI', '', '', 1, 70, 102, 'Active'),
(245, 'CKA0784', 13, 'WIN AGENCY', '', '', 1, 70, 102, 'Active'),
(246, 'CKA0701', 13, 'MARYAM TRADERS', '', '', 1, 70, 102, 'Active'),
(247, 'CMV0399', 2, 'SRI BHUVANESHWARI FOODS & BEVERAGES', '', '', 1, 24, 94, 'Active'),
(248, 'COI0163', 9, 'ALIF TRADING', '', '', 1, 61, 98, 'Active'),
(249, 'COI0161', 9, 'OM BALA BAIRAVAR AGENCIES', '', '', 1, 61, 98, 'Active'),
(250, 'CKA0643', 1, 'NIRAI AGENCY', '', '', 1, 47, 95, 'Active'),
(251, 'CKA0704', 1, 'VELAVAN AGENCY', '', '', 1, 47, 95, 'Active'),
(252, 'CKA0533', 1, 'P.H.AGENCY', '', '', 1, 47, 95, 'Active'),
(253, 'CKA0791', 1, 'SRI SENTHIL ANDEVAR AGENCIES', '', '', 1, 47, 95, 'Active'),
(254, 'CKA0144', 1, 'DARSHAN AGENCIES (SATHIRAKUDI)', '', '', 1, 47, 95, 'Active'),
(255, 'CSA0220', 11, 'SRI ANGALAMMAN AGENCY', '', '', 1, 64, 97, 'Active'),
(256, 'CSA0427', 11, 'GENIUS TRADERS', '', '', 1, 64, 97, 'Active'),
(257, 'CSA0048', 11, 'SRI MURUGAN AGENCIES PERIYAMANALI', '', '', 1, 64, 97, 'Active'),
(258, 'CSA0066', 11, 'SHREE SARGURU AGENCIES', '', '', 1, 64, 97, 'Active'),
(259, 'CSA0110', 4, 'SALEM PAZHAMUTHIR NILAYAM - BOV', '', '', 1, 75, 99, 'Active'),
(260, 'CSA0344', 4, 'SRIMURUGA ENTERPRISEE', '', '', 1, 75, 99, 'Active'),
(261, 'CSA0055', 4, 'SRI KALIAMMAL AGENCY', '', '', 1, 75, 99, 'Active'),
(262, 'CSA0185', 4, 'SRI VELAA ENTERPRISES', '', '', 1, 75, 99, 'Active'),
(263, 'CSA0350', 4, 'BHARATH AGENCIES', '', '', 1, 75, 99, 'Active'),
(264, 'CSA0490', 4, 'SIVA TRADERS', '', '', 1, 75, 99, 'Active'),
(265, 'CSA0495', 4, 'Krish Enterprises', '', '', 1, 75, 99, 'Active'),
(266, 'CSA0409', 4, 'SREE BRAHMAPUTRA AGENCY', '', '', 1, 75, 99, 'Active'),
(267, 'CMV0412', 2, 'SAP ENTERPRISES', '', '', 1, 27, 94, 'Active'),
(268, 'CV20002', 10, 'MAHASAKTHI AGENCY', '', '', 1, 31, 104, 'Active'),
(269, 'CV20193', 10, 'MRTMARKETERS', '', '', 1, 31, 104, 'Active'),
(270, 'CV20206', 10, 'VEERA AGENCY', '', '', 1, 31, 104, 'Active'),
(271, 'CV20190', 10, 'I R S AGENCIES', '', '', 1, 31, 104, 'Active'),
(272, 'CV20216', 10, 'AMUTHAN AGENCY (T JAYASANKAR)', '', '', 1, 31, 104, 'Active'),
(273, 'CV20209', 10, 'MARUTHAM MARKETING(K GURU)', '', '', 1, 31, 104, 'Active'),
(274, 'CV20016', 7, 'R.RAMESH, DHANAM AGENCIES', '', '', 1, 72, 72, 'Active'),
(275, 'CV20148', 7, 'AYYANAR TRADERS', '', '', 1, 72, 72, 'Active'),
(276, 'CV20210', 7, 'KARTHIKESAN AGENCIES', '', '', 1, 72, 72, 'Active'),
(277, 'CV20212', 7, 'NEELAN AGENCIES', '', '', 1, 72, 72, 'Active'),
(278, 'CV20179', 7, 'Muthumani Agencies', '', '', 1, 72, 72, 'Active'),
(280, 'CKA0215', 15, 'NAGARAJN TRADERS (Outlet)', '', '', 1, 43, 96, 'Active'),
(281, 'CKA0120', 3, 'SRI VEERU CHINNAMMAL AGENCIES (B)', '', '', 1, 43, 96, 'Active'),
(282, 'CKA0593', 3, 'SUNDARA MAHALINGAM AGENCY', '', '', 1, 43, 96, 'Active'),
(283, 'CKA0568', 3, 'RAJVARNA AGENCIES', '', '', 1, 43, 96, 'Active'),
(284, 'CMV0272', 2, 'SRI GANAPATHY AGENCIES', '', '', 1, 9, 92, 'Active'),
(285, 'CMV0415', 2, 'SRI ANNAMALAIYAR AGENCY', '', '', 1, 9, 92, 'Active'),
(286, 'CSA0416', 4, 'SRI AARUPADAI AGENCY', '', '', 1, 9, 99, 'Active'),
(287, 'CSA0311', 4, 'CHENNASRI AGENCY', '', '', 1, 9, 99, 'Active'),
(288, 'CSA0317', 4, 'SHRI SAI AGENCIES', '', '', 1, 9, 99, 'Active'),
(289, 'CSA0298', 4, 'JAGHAVI ENTERPRISES', '', '', 1, 9, 99, 'Active'),
(290, 'CSA0058', 4, 'VIJAYADHARSINIAGENCIES', '', '', 1, 9, 99, 'Active'),
(291, 'CSA0419', 4, 'P V D TRADERS', '', '', 1, 9, 99, 'Active'),
(292, 'CKA0778', 3, 'MUTHU TRADERS', '', '', 1, 33, 101, 'Active'),
(293, 'CKA0572', 3, 'SANTHIYA TRADERS', '', '', 1, 33, 101, 'Active'),
(294, 'CKA0789', 3, 'SHANTHI ENTERPRISES', '', '', 1, 33, 101, 'Active'),
(295, 'CTC0372', 5, 'M/S.JAYASHREE AGENCIES', '', '', 1, 82, 110, 'Active'),
(296, 'CTC0426', 5, 'AK AGENCY', '', '', 1, 82, 110, 'Active'),
(297, 'CTC0495', 5, 'K S TRADERS', '', '', 1, 82, 110, 'Active'),
(298, 'CTC0491', 5, 'SRI LAKSHMI VINAYAKA AGENCIES', '', '', 1, 82, 110, 'Active'),
(299, 'CTC0381', 2, 'Sree Traders', '', '', 1, 15, 68, 'Active'),
(300, 'CTC0473', 2, 'Venkateswara Mart', '', '', 1, 15, 68, 'Active'),
(301, 'CMV0429', 2, 'VEL MURUGAN ENTERPRISES', '', '', 1, 26, 94, 'Active'),
(302, 'CSA0507', 11, 'KAYAL ROOFERS', '', '', 1, 65, 97, 'Active'),
(303, 'CSA0509', 11, 'SIVAN AGENCIESS', '', '', 1, 65, 97, 'Active'),
(304, 'CSA0493', 11, 'PT AGENCIES', '', '', 1, 65, 97, 'Active'),
(305, 'CV20076', 6, 'SURIYA DISTRIBUTORS PROP A RAJA', '', '', 1, 85, 108, 'Active'),
(306, 'CV20188', 6, 'SANTHA AGENCY -vikkaravandi', '', '', 1, 85, 108, 'Active'),
(307, 'CV20223', 6, 'S M H J AGENCIES', '', '', 1, 85, 108, 'Active'),
(308, 'CKA0126', 13, 'SRINIVASA TRADERS', '', '', 1, 68, 102, 'Active'),
(309, 'CKA0760', 13, 'TRUE TRADERS', '', '', 1, 68, 102, 'Active'),
(310, 'CKA0148', 13, 'SRI VEL TRADERS', '', '', 1, 68, 102, 'Active'),
(311, 'CKA0776', 13, 'NILA AGENCIES', '', '', 1, 68, 102, 'Active'),
(312, 'CKA0680', 13, 'BALAMURUGAN AGENCIES', '', '', 1, 68, 102, 'Active'),
(313, 'CKA0731', 13, 'IMMANUVEL AGENCY', '', '', 1, 68, 102, 'Active'),
(314, 'CV20189', 10, 'AL AZIZ AGENCY (NEW)', '', '', 1, 68, 106, 'Active'),
(315, 'CV20150', 10, 'MOHAMED AGENCIES', '', '', 1, 68, 106, 'Active'),
(316, 'CTC0424', 14, 'SK TRADEZ', '', '', 1, 68, 113, 'Active'),
(317, 'CTC0049', 14, 'SHREE VARI ENTERPRISES', '', '', 1, 68, 113, 'Active'),
(318, 'CTC0466', 14, 'NEW ANBU AGENCIES', '', '', 1, 68, 114, 'Active'),
(319, 'CTC0052', 14, 'SRI AMMAN AGENCIES', '', '', 1, 68, 114, 'Active'),
(320, 'CTC0284', 14, 'JAYA ENTERPRISES', '', '', 1, 68, 114, 'Active'),
(321, 'CTC0071', 14, 'SRI VASAVI ENTERPRISES', '', '', 1, 68, 114, 'Active'),
(322, 'CV20159', 8, 'JEEVAN ENTERPRISES', '', '', 1, 81, 109, 'Active'),
(323, 'CV20065', 8, 'J.R.AGENCIES', '', '', 1, 81, 109, 'Active'),
(324, 'CV20162', 8, 'GANAPATHY AGENCY', '', '', 1, 81, 109, 'Active'),
(325, 'CKA0709', 3, 'ASKA TRADERS', '', '', 1, 36, 101, 'Active'),
(326, 'CKA0788', 3, 'M P ARUMUGAM & SONS', '', '', 1, 36, 101, 'Active'),
(327, 'CKA0543', 3, 'R S AGENCIES', '', '', 1, 36, 101, 'Active'),
(328, 'CKA0749', 3, 'VAIRAM TRADERS', '', '', 1, 36, 101, 'Active'),
(329, 'CKA0782', 3, 'AATHI SIVAN TRADERS', '', '', 1, 36, 101, 'Active'),
(330, 'CV20019', 10, 'SRI LAKSHMI AMMAN AGENCIES', '', '', 1, 79, 106, 'Active'),
(331, 'CV20146', 10, 'KANAGAVALLI AGENCIES', '', '', 1, 79, 106, 'Active'),
(332, 'CV20003', 10, 'R.SENTHILKUMAR AGENCIES', '', '', 1, 79, 106, 'Active'),
(333, 'COI0151', 9, 'Sakthi Lakshmi Agencies', '', '', 1, 62, 98, 'Active'),
(334, 'COI0154', 9, 'M.N.P.CYCLE AND GENERAL STORES', '', '', 1, 62, 98, 'Active'),
(335, 'CKA0700', 13, 'HARSHARA AGENCIES', '', '', 1, 62, 103, 'Active'),
(336, 'CKA0316', 13, 'AJAY KRISHNA COOL DRINKS', '', '', 1, 62, 103, 'Active'),
(337, 'CKA0786', 13, 'HAKEEM TRADERS', '', '', 1, 62, 103, 'Active'),
(338, 'CKA0064', 13, 'NATIONAL AGENCIES', '', '', 1, 62, 103, 'Active'),
(339, 'CV20220', 8, 'GV & SONS', '', '', 1, 62, 109, 'Active'),
(340, 'CV20052', 8, 'SRI RAM AGENCY', '', '', 1, 62, 109, 'Active'),
(341, 'CV20072', 8, 'SREE GANAPATHY AGENCY', '', '', 1, 62, 109, 'Active'),
(342, 'CV20054', 8, 'GOWRI AGENCIES', '', '', 1, 62, 109, 'Active'),
(343, 'CV20178', 8, 'KARTHIKEYAN AGENCIES', '', '', 1, 62, 109, 'Active'),
(344, 'CTC0462', 2, 'Sri Amman Agency', '', '', 1, 62, 68, 'Active'),
(345, 'CTC0454', 2, 'SRI THANGA VINAYAGA AGENCY', '', '', 1, 62, 68, 'Active'),
(346, 'COI0074', 9, 'S.S.AGENCIES', '', '', 1, 60, 98, 'Active'),
(347, 'COI0111', 9, 'SENTHIL MURUGAN TRADERS', '', '', 1, 60, 98, 'Active'),
(348, 'COI0159', 9, 'SHIVA TRADERS', '', '', 1, 60, 98, 'Active'),
(349, 'CKA0686', 3, 'JF FOODS AND DISTRIBUTION', '', '', 1, 45, 96, 'Active'),
(350, 'CKA0777', 3, 'S.S.R AGENCIES.', '', '', 1, 45, 96, 'Active'),
(351, 'CKA0123', 3, 'SRI VERA VELAVAN AGENCY (Q)', '', '', 1, 45, 96, 'Active'),
(352, 'CKA0681', 3, 'RAJAN AGENCIES 1', '', '', 1, 45, 96, 'Active'),
(353, 'COI0018', 9, 'SHALOME AGENCIES', '', '', 1, 56, 98, 'Active'),
(354, 'COI0147', 9, 'SR ENTERPRISES', '', '', 1, 56, 98, 'Active'),
(355, 'COI0020', 9, 'SIVASAKTHI ENTERPRISES', '', '', 1, 56, 98, 'Active'),
(356, 'COI0141', 9, 'BISMI AGENCIES', '', '', 1, 56, 98, 'Active'),
(357, 'Vis 01', 2, 'NANDHNI AGENCY', '', '', 1, 10, 92, 'Active'),
(358, '1001830', 14, 'MAHAVEER TRADERS', '', '', 1, 83, 113, 'Active'),
(359, 'CTC0464', 14, 'GURU SAIRAM ENTERPRISES', '', '', 1, 83, 113, 'Active'),
(360, 'CTC0425', 14, 'RANI AGENCIES', '', '', 1, 83, 113, 'Active'),
(361, 'CTC0472', 14, 'SRIRAM AGENCY', '', '', 1, 83, 114, 'Active'),
(362, 'COI0122', 9, 'J.K.TRADERS', '', '', 1, 57, 98, 'Active'),
(363, 'COI0149', 9, 'SRI SELVA MURUGA AGENCIES', '', '', 1, 57, 98, 'Active'),
(364, 'C0I0160', 9, 'KALANJIYAM MARKETING', '', '', 1, 57, 98, 'Active'),
(365, 'CV20117', 10, 'U.R.V. TRADERS', '', '', 1, 77, 106, 'Active'),
(366, 'CV20166', 10, 'SRI BALAJI AGENCY', '', '', 1, 77, 106, 'Active');

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

--
-- Table structure for table `group`
--

CREATE TABLE `group` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` varchar(255) NOT NULL,
  `status` varchar(20) NOT NULL COMMENT 'Active,Inactive'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `group`
--

INSERT INTO `group` (`id`, `name`, `description`, `status`) VALUES
(1, 'Soda', '', 'Active'),
(2, 'Water', '', 'Active'),
(3, 'Tigo', '', 'Active'),
(4, 'Zimzo', '', 'Active'),
(5, 'Salty', '', 'Active'),
(6, 'F.Milk', '', 'Active'),
(7, 'Juice', '', 'Active'),
(8, 'OK', '', 'Active'),
(9, 'Bovonto', '', 'Active'),
(10, 'Vibro', '', 'Active');

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

--
-- Table structure for table `item`
--

CREATE TABLE `item` (
  `id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `code` varchar(50) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` varchar(255) NOT NULL,
  `status` varchar(20) NOT NULL COMMENT 'Active,Inactive'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `item`
--

INSERT INTO `item` (`id`, `group_id`, `code`, `name`, `description`, `status`) VALUES
(1, 1, '10000343', '1 LTR PRIESTLEY PACKAGED DRINKING WATER', '', 'Active'),
(2, 2, '10000344', '500ML PRIESTLEY PACKAGED DRINKING WATER', '', 'Active'),
(3, 2, '10000350', '300ML PRIESTLEY PACKAGED DRINKING WATER', '', 'Active'),
(4, 3, '10000341', '200ML TIGO PET (30 NOS)', '', 'Active'),
(5, 4, '10000345', '200ML ZIMZO PET (30 NOS)', '', 'Active'),
(6, 5, '10000293', '200ML SALTY LEMON', '', 'Active'),
(7, 6, '10000348', '180ML ALMOND FLAVOUR MILK PET (SubCon)', '', 'Active'),
(8, 6, '10000349', '180ML ROSEMILK PET (SubCon)', '', 'Active'),
(9, 6, '10000088', '200ML ALMOND FLAVOURED MILK PET', '', 'Active'),
(10, 6, '10000143', '200ML ROSE MILK PET', '', 'Active'),
(11, 6, '10000089', '200ML CHOCOPLAST', '', 'Active'),
(12, 6, '10000171', '200ML VANILLA FLAVOURED MILK PET', '', 'Active'),
(13, 7, '10000296', '200ML FRUTANG MANGO JUICE (30 No\'s)', '', 'Active'),
(14, 7, '10000295', '200ML FRUTANG APPLE JUICE (24 No\'s)', '', 'Active'),
(15, 8, '10000366', '200ML OK', '', 'Active'),
(16, 1, '10000362', '250ML ACE PREBIOTIC SODA (30 NOS)', '', 'Active'),
(17, 1, '10000365', '250ML VENNILA PREBIOTIC SODA (30 Nos)', '', 'Active'),
(18, 7, '10000292', '250ML FRUTANG MANGO', '', 'Active'),
(19, 7, '10000291', '250ML FRUTANG APPLE JUICE', '', 'Active'),
(20, 9, '10000008', '250ML BOVONTO TIN', '', 'Active'),
(21, 10, '10000029', '250ML VIBRO TIN', '', 'Active'),
(22, 1, '10000015', '250ML PRIESTLEY CLUB SODA TIN', '', 'Active'),
(23, 9, '10000001', '300ML BOVONTO-(MRP-20)', '', 'Active'),
(24, 9, '10000260', '325ML BOVONTO', '', 'Active'),
(25, 10, '10000024', '300ML VIBRO(MRP-20)', '', 'Active'),
(26, 10, '10000261', '325ML VIBRO', '', 'Active'),
(27, 1, '10000012', '300ML PRIESTLEY CLUB SODA', '', 'Active'),
(28, 9, '10000351', '300ML DIET BOVONTO', '', 'Active'),
(29, 10, '10000359', '300ML DIET VIBRO', '', 'Active'),
(30, 9, '10000003', '500ML BOVONTO (MRP 40)', '', 'Active'),
(31, 10, '10000026', '500ML VIBRO (MRP 40)', '', 'Active'),
(32, 1, '10000111', '750ML PRIESTLEY CLUB SODA', '', 'Active'),
(33, 9, '10000005', '1500ML BOVONTO (MRP 80)', '', 'Active');

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

--
-- Table structure for table `location`
--

CREATE TABLE `location` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `status` varchar(20) NOT NULL COMMENT 'Active,Inactive'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `location`
--

INSERT INTO `location` (`id`, `name`, `status`) VALUES
(1, 'Chennai', 'Active'),
(2, 'Madurai', 'Active'),
(3, 'Virudhunagar', 'Active');

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

--
-- Table structure for table `role`
--

CREATE TABLE `role` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `status` varchar(20) NOT NULL COMMENT 'Active,Inactive'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `role`
--

INSERT INTO `role` (`id`, `name`, `status`) VALUES
(1, 'Admin', 'Active'),
(2, 'Sales Officer', 'Active'),
(3, 'MIS', 'Active'),
(4, 'CSO', 'Active'),
(5, 'ASM', 'Active'),
(6, 'ASE', 'Active');

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

--
-- Table structure for table `stock`
--

CREATE TABLE `stock` (
  `id` int(11) NOT NULL,
  `date` varchar(20) NOT NULL,
  `so_id` int(11) NOT NULL,
  `location_id` int(11) NOT NULL,
  `distributor_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `current_stock` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `super_stockist`
--

CREATE TABLE `super_stockist` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `status` varchar(50) NOT NULL COMMENT 'Active,Inactive'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `super_stockist`
--

INSERT INTO `super_stockist` (`id`, `name`, `status`) VALUES
(1, 'Sree Vaari Enterprises', 'Active'),
(2, 'Vishvand Enterprises Pvt Ltd', 'Active'),
(3, 'VAGR Agency', 'Active'),
(4, 'Sudarsan Traders', 'Active'),
(5, 'Jasper B2B Groups', 'Active'),
(6, 'Sri Ramana Agency', 'Active'),
(7, 'Palaniunna Foods Pvt Ltd Kumbakonam', 'Active'),
(8, 'Sri Krishna Agencies', 'Active'),
(9, 'Palaniunna Foods Pvt Ltd Coimbatore', 'Active'),
(10, 'Swasthik Agencies', 'Active'),
(11, 'TVR Business T Venture', 'Active'),
(12, 'Sri Sumangali Agencies', 'Active'),
(13, 'Barath Trade Link', 'Active'),
(14, 'Palaniunna Foods Pvt Ltd Padappai', 'Active'),
(15, 'Palaniunna Foods Pvt Ltd Nilakottai', 'Active');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `distributor`
--
ALTER TABLE `distributor`
  ADD PRIMARY KEY (`id`),
  ADD KEY `location_id` (`location_id`),
  ADD KEY `so_id` (`so_id`),
  ADD KEY `super_stockist_id` (`super_stockist_id`),
  ADD KEY `reporting_manager_id` (`reporting_manager_id`);

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

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

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

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

--
-- Indexes for table `stock`
--
ALTER TABLE `stock`
  ADD PRIMARY KEY (`id`),
  ADD KEY `location_id` (`location_id`),
  ADD KEY `so_id` (`so_id`),
  ADD KEY `distributor_id` (`distributor_id`),
  ADD KEY `group_id` (`group_id`),
  ADD KEY `item_id` (`item_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `distributor`
--
ALTER TABLE `distributor`
  ADD CONSTRAINT `distributor_ibfk_1` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `distributor_ibfk_2` FOREIGN KEY (`so_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `distributor_ibfk_3` FOREIGN KEY (`super_stockist_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `distributor_ibfk_4` FOREIGN KEY (`reporting_manager_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE;

--
-- Constraints for table `stock`
--
ALTER TABLE `stock`
  ADD CONSTRAINT `stock_ibfk_1` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `stock_ibfk_2` FOREIGN KEY (`so_id`) REFERENCES `users` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `stock_ibfk_3` FOREIGN KEY (`distributor_id`) REFERENCES `distributor` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `stock_ibfk_4` FOREIGN KEY (`group_id`) REFERENCES `group` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `stock_ibfk_5` FOREIGN KEY (`item_id`) REFERENCES `item` (`id`) ON UPDATE CASCADE;
COMMIT;

