-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 14, 2026 at 02:54 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `saanvi`
--

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

--
-- Table structure for table `tbl_customers`
--

CREATE TABLE `tbl_customers` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `mobile_no` varchar(15) DEFAULT NULL,
  `alter_mobile_no` varchar(15) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `gst_no` varchar(50) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1=active, 0=inactive',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tbl_customers`
--

INSERT INTO `tbl_customers` (`id`, `name`, `mobile_no`, `alter_mobile_no`, `address`, `email`, `gst_no`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Ganesan', '8124455952', '8667887997', NULL, 'ganesh@gmail.com', '234568', 1, '2025-10-28 08:24:24', '2026-05-14 07:17:37'),
(2, 'John Doe', '9876543210', '9123456789', NULL, 'john.doe@example.com', NULL, 1, '2025-10-28 08:26:14', '2026-05-13 08:31:02'),
(6, 'Test Customer', '9555555555', NULL, NULL, NULL, NULL, 1, '2025-11-11 23:14:50', '2026-05-13 08:31:02'),
(7, 'Test Customer 2', '9444444444', NULL, NULL, 'test@example.com', NULL, 1, '2025-11-11 23:14:59', '2026-05-13 08:31:02'),
(9, 'Test Customer 4', '9222222222', NULL, NULL, NULL, NULL, 1, '2025-11-11 23:15:16', '2026-05-13 08:31:02'),
(10, 'dfghjk Ganesan', '8124455953', NULL, NULL, NULL, NULL, 1, '2025-11-11 23:16:21', '2026-05-13 08:31:02'),
(11, 'Test Auto Login', '9555566666', NULL, NULL, 'testautologin@example.com', NULL, 1, '2025-11-11 23:31:11', '2026-05-13 08:31:02'),
(12, 'Test Network', '9333388888', '', NULL, 'testnetwork@example.com', NULL, 1, '2025-11-11 23:48:23', '2026-05-13 08:31:02'),
(13, 'Gan', '9368184875', '', NULL, '', NULL, 1, '2025-11-12 00:14:48', '2026-05-13 08:31:02'),
(15, 'Monisha', '6380171735', NULL, 'RCC Complex, Angammal Colony', NULL, 'gst234568', 1, '2026-05-14 08:20:02', '2026-05-14 08:20:02');

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

--
-- Table structure for table `tbl_poulinfra_quotations`
--

CREATE TABLE `tbl_poulinfra_quotations` (
  `id` int(10) UNSIGNED NOT NULL,
  `quotation_no` varchar(64) NOT NULL DEFAULT '',
  `quotation_date` date NOT NULL,
  `client_name` varchar(255) NOT NULL,
  `kind_attn` varchar(255) DEFAULT NULL,
  `client_address` text DEFAULT NULL,
  `client_mobile` varchar(20) DEFAULT NULL,
  `client_email` varchar(255) DEFAULT NULL,
  `proposal_title` varchar(255) NOT NULL DEFAULT 'PROPOSAL FOR POULTRY EQUIPMENTS',
  `intro_text` text DEFAULT NULL,
  `house_params_json` text DEFAULT NULL,
  `status` varchar(32) NOT NULL DEFAULT 'draft',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tbl_poulinfra_quotations`
--

INSERT INTO `tbl_poulinfra_quotations` (`id`, `quotation_no`, `quotation_date`, `client_name`, `kind_attn`, `client_address`, `client_mobile`, `client_email`, `proposal_title`, `intro_text`, `house_params_json`, `status`, `created_at`, `updated_at`) VALUES
(1, 'SAMPLE-PC-DEMO-001', '2026-02-02', 'Mr. Hemanth Reddy (sample)', 'Mr. Prakash', 'Andhra Pradesh', '9876543210', 'sample.client@example.com', 'PROPOSAL FOR POULTRY EQUIPMENTS', 'Thank you for your enquiry. This is a seeded sample quotation for layout and testing.', '{\"house_length_ft\":350,\"house_length_m\":107,\"house_width_ft\":40,\"house_width_m\":12,\"side_height_ft\":8,\"side_height_m\":2,\"total_sqft\":14000,\"no_of_birds\":18667,\"sqft_per_bird\":0.75,\"no_feeding_lines\":4,\"no_drinking_lines\":5,\"ventilation_type\":\"TUNNEL\",\"voltage\":\"415 VOLT 3 PHASE 50 HZ\"}', 'draft', '2026-05-13 13:34:36', '2026-05-13 13:34:36');

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

--
-- Table structure for table `tbl_poulinfra_quotation_steps`
--

CREATE TABLE `tbl_poulinfra_quotation_steps` (
  `id` int(10) UNSIGNED NOT NULL,
  `quotation_id` int(10) UNSIGNED NOT NULL,
  `step_no` tinyint(3) UNSIGNED NOT NULL,
  `section_title` varchar(255) NOT NULL,
  `items_json` text NOT NULL,
  `image1` varchar(512) DEFAULT NULL,
  `image2` varchar(512) DEFAULT NULL,
  `image3` varchar(512) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tbl_poulinfra_quotation_steps`
--

INSERT INTO `tbl_poulinfra_quotation_steps` (`id`, `quotation_id`, `step_no`, `section_title`, `items_json`, `image1`, `image2`, `image3`) VALUES
(1, 1, 1, '1) FEEDING SYSTEM FOR :', '[{\"item\":\"FEEDING PANS\",\"qty\":\"544\"},{\"item\":\"AUGER WITH PIPE (PER LINE)\",\"qty\":\"340\"},{\"item\":\"MOTOR AND DRIVE UNIT\",\"qty\":\"4\"},{\"item\":\"WIRE ROPES(GI ROPES - PER LINE) 5mm, 3mm\",\"qty\":\"410\"},{\"item\":\"HANGING SUPPORT\",\"qty\":\"4\"},{\"item\":\"HOPPER\",\"qty\":\"4\"},{\"item\":\"WINCH\",\"qty\":\"4\"},{\"item\":\"FEED SENSOR\",\"qty\":\"4\"}]', 'uploads/poulinfra/1/s1_img1_1252f437.jpg', 'uploads/poulinfra/1/s1_img2_9c2c2b96.png', 'uploads/poulinfra/1/s1_img3_4fc651c0.jpg'),
(2, 1, 2, '2) NIPPLE DRINKING SYSTEM :', '[{\"item\":\"NIPPLES\",\"qty\":\"2040\"},{\"item\":\"DRIP CUPS\",\"qty\":\"2040\"},{\"item\":\"WATER REGULATOR\",\"qty\":\"5\"},{\"item\":\"WIRE ROPES(GI ROPE) 3mm, 2mm\",\"qty\":\"400\"},{\"item\":\"HANGING SUPPORT\",\"qty\":\"5\"},{\"item\":\"WINCH\",\"qty\":\"5\"},{\"item\":\"WINCH HANDLE\",\"qty\":\"5\"},{\"item\":\"WATER REGULATOR END KIT\",\"qty\":\"5\"}]', 'uploads/poulinfra/1/s2_img1.png', 'uploads/poulinfra/1/s2_img2.png', NULL),
(3, 1, 3, '3) VENTILATION, COOLING PAD', '[{\"item\":\"54 INCH BOX FAN\",\"qty\":\"8\"},{\"item\":\"COOLING PAD WITH FRAME\",\"qty\":\"80\"},{\"item\":\"CLIMATE CONTROLLER\",\"qty\":\"1\"},{\"item\":\"TEMPERATURE SENSOR\",\"qty\":\"4\"},{\"item\":\"CONTROL PANEL\",\"qty\":\"1\"},{\"item\":\"DIESEL HEATER\",\"qty\":\"2\"}]', 'uploads/poulinfra/1/s3_img1.png', NULL, NULL),
(4, 1, 4, '4) COOLING PAD WITH GUTTER SYSTEM', '[{\"item\":\"COOLING PAD SECTION\",\"qty\":\"1 lot\"},{\"item\":\"GUTTER & RECIRCULATION (sample)\",\"qty\":\"1 lot\"}]', NULL, NULL, NULL),
(5, 1, 5, '5) CONTROL PANEL WITH CONTROLLER', '[{\"item\":\"MAIN CONTROL PANEL\",\"qty\":\"1\"},{\"item\":\"CLIMATE \\/ CURTAIN CONTROLLER\",\"qty\":\"1\"}]', 'uploads/poulinfra/1/s5_img1.png', NULL, NULL),
(6, 1, 6, '6) DIESEL HEATER', '[{\"item\":\"DIESEL HEATER UNIT\",\"qty\":\"2\"}]', NULL, NULL, NULL),
(7, 1, 7, '7) ELECTRICAL AND PLUMBING', '[{\"item\":\"ELECTRICAL MATERIAL & LABOUR (sample)\",\"qty\":\"1 lot\"},{\"item\":\"PLUMBING MATERIAL & LABOUR (sample)\",\"qty\":\"1 lot\"}]', 'uploads/poulinfra/1/s7_img1.png', 'uploads/poulinfra/1/s7_img2.png', NULL);

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

--
-- Table structure for table `tbl_poultry_company`
--

CREATE TABLE `tbl_poultry_company` (
  `id` tinyint(3) UNSIGNED NOT NULL DEFAULT 1,
  `name` varchar(255) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `proprietor_name` varchar(255) DEFAULT NULL,
  `mobile_no` varchar(15) DEFAULT NULL,
  `alter_mobile_no` varchar(15) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `gstin` varchar(32) DEFAULT NULL,
  `bank_account_name` varchar(255) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `bank_account_no` varchar(64) DEFAULT NULL,
  `bank_branch` varchar(128) DEFAULT NULL,
  `bank_ifsc` varchar(32) DEFAULT NULL,
  `quotation_tagline` varchar(255) DEFAULT NULL,
  `terms_json` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tbl_poultry_company`
--

INSERT INTO `tbl_poultry_company` (`id`, `name`, `address`, `proprietor_name`, `mobile_no`, `alter_mobile_no`, `website`, `gstin`, `bank_account_name`, `bank_name`, `bank_account_no`, `bank_branch`, `bank_ifsc`, `quotation_tagline`, `terms_json`, `created_at`, `updated_at`) VALUES
(1, 'Saanvi Poultry Equipments', 'Manjunathreddy Complex, 4 Roads, Ganagavaram Mandal, Chittoor Dist. - 517432', 'L.Pakash', '9876543210', '9876543210', 'www.poulinfra.com', '33AAVFP2602W1ZF', 'POULINFRA CORPORATION', 'STATE BANK', '657658758', 'UDUMELPET', 'YYHFUYF', 'POULINFRA CORPORATION', '[\"KUGIUGG\",\"YFHGUGKG\",\"HFKJGKG\",\"JGKUHGLOIHOIHJO\",\"HGVJ IUGIUGIU IUHGIU IU\",\"UYFIUG IUIU\",\"UGIUG\"]', '2026-05-13 10:26:32', '2026-05-13 13:44:17');

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

--
-- Table structure for table `tbl_poultry_estimates`
--

CREATE TABLE `tbl_poultry_estimates` (
  `id` int(10) UNSIGNED NOT NULL,
  `customer_id` int(10) UNSIGNED DEFAULT NULL,
  `cust_name` varchar(255) NOT NULL,
  `cust_mobile` varchar(20) DEFAULT NULL,
  `cust_address` text DEFAULT NULL,
  `estimate_date` date NOT NULL,
  `length_ft` decimal(12,2) DEFAULT NULL,
  `width_ft` decimal(12,2) DEFAULT NULL,
  `no_lines` int(10) UNSIGNED DEFAULT NULL,
  `no_plumbings` int(10) UNSIGNED DEFAULT NULL,
  `no_sheds` int(10) UNSIGNED DEFAULT NULL,
  `no_feed_room` int(10) UNSIGNED DEFAULT NULL,
  `nc1` varchar(255) DEFAULT NULL,
  `nc2` varchar(255) DEFAULT NULL,
  `nc3` varchar(255) DEFAULT NULL,
  `lines_subtotal` decimal(14,2) NOT NULL DEFAULT 0.00,
  `gst_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `gst_percent` decimal(6,2) NOT NULL DEFAULT 0.00,
  `gst_type` enum('GST','IGST') NOT NULL DEFAULT 'GST',
  `gst_mode` enum('Inclusive','Exclusive') NOT NULL DEFAULT 'Exclusive',
  `gst_amount` decimal(14,2) NOT NULL DEFAULT 0.00,
  `discount_type` enum('none','percentage','fixed') NOT NULL DEFAULT 'none',
  `discount_input` decimal(14,4) NOT NULL DEFAULT 0.0000,
  `total_discount` decimal(14,2) NOT NULL DEFAULT 0.00,
  `round_off` decimal(14,2) NOT NULL DEFAULT 0.00,
  `net_amount` decimal(14,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tbl_poultry_estimates`
--

INSERT INTO `tbl_poultry_estimates` (`id`, `customer_id`, `cust_name`, `cust_mobile`, `cust_address`, `estimate_date`, `length_ft`, `width_ft`, `no_lines`, `no_plumbings`, `no_sheds`, `no_feed_room`, `nc1`, `nc2`, `nc3`, `lines_subtotal`, `gst_enabled`, `gst_percent`, `gst_type`, `gst_mode`, `gst_amount`, `discount_type`, `discount_input`, `total_discount`, `round_off`, `net_amount`, `created_at`, `updated_at`) VALUES
(1, 9, 'Test Customer 4', '9222222222', NULL, '2026-05-13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13300.00, 1, 18.00, 'GST', 'Inclusive', 2028.81, 'percentage', 0.0000, 0.00, 0.00, 13300.00, '2026-05-13 10:46:45', '2026-05-13 10:46:45'),
(2, 10, 'dfghjk Ganesan', '8124455953', NULL, '2026-05-13', 20.00, 20.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 131779.00, 0, 18.00, 'GST', 'Exclusive', 0.00, 'none', 0.0000, 0.00, 0.00, 131779.00, '2026-05-13 12:18:30', '2026-05-13 12:19:20'),
(3, 14, 'Jayasri', '8667887995', NULL, '2026-05-13', 20.00, 20.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 126487.00, 0, 18.00, 'GST', 'Exclusive', 0.00, 'none', 0.0000, 0.00, 0.00, 126487.00, '2026-05-13 14:09:55', '2026-05-13 14:09:55'),
(4, 13, 'Gan', '9368184875', NULL, '2026-05-14', 400.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 126487.00, 1, 18.00, 'GST', 'Inclusive', 19294.63, 'none', 0.0000, 0.00, 0.00, 126487.00, '2026-05-14 08:25:59', '2026-05-14 08:25:59');

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

--
-- Table structure for table `tbl_poultry_estimate_lines`
--

CREATE TABLE `tbl_poultry_estimate_lines` (
  `id` int(10) UNSIGNED NOT NULL,
  `estimate_id` int(10) UNSIGNED NOT NULL,
  `product_id` tinyint(3) UNSIGNED NOT NULL,
  `qty` decimal(14,3) NOT NULL DEFAULT 0.000,
  `rate` decimal(14,2) NOT NULL DEFAULT 0.00,
  `line_subtotal` decimal(14,2) NOT NULL DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tbl_poultry_estimate_lines`
--

INSERT INTO `tbl_poultry_estimate_lines` (`id`, `estimate_id`, `product_id`, `qty`, `rate`, `line_subtotal`) VALUES
(37, 1, 1, 10.000, 430.00, 4300.00),
(38, 1, 2, 30.000, 300.00, 9000.00),
(39, 1, 3, 0.000, 270.00, 0.00),
(40, 1, 4, 0.000, 10.00, 0.00),
(41, 1, 5, 0.000, 27.00, 0.00),
(42, 1, 6, 0.000, 10.00, 0.00),
(43, 1, 7, 0.000, 25.00, 0.00),
(44, 1, 8, 0.000, 450.00, 0.00),
(45, 1, 9, 0.000, 50.00, 0.00),
(46, 1, 10, 0.000, 200.00, 0.00),
(47, 1, 11, 0.000, 15.00, 0.00),
(48, 1, 12, 0.000, 17.00, 0.00),
(49, 1, 13, 0.000, 16.00, 0.00),
(50, 1, 14, 0.000, 3.00, 0.00),
(51, 1, 15, 0.000, 2.50, 0.00),
(52, 1, 16, 0.000, 115.00, 0.00),
(53, 1, 17, 0.000, 175.00, 0.00),
(54, 1, 18, 0.000, 275.00, 0.00),
(55, 1, 19, 0.000, 60.00, 0.00),
(56, 1, 20, 0.000, 10.00, 0.00),
(57, 1, 21, 0.000, 0.00, 0.00),
(58, 1, 22, 0.000, 500.00, 0.00),
(59, 1, 23, 0.000, 30.00, 0.00),
(60, 1, 24, 0.000, 0.00, 0.00),
(61, 1, 25, 0.000, 13.00, 0.00),
(62, 1, 26, 0.000, 10.00, 0.00),
(63, 1, 27, 0.000, 12.00, 0.00),
(64, 1, 28, 0.000, 170.00, 0.00),
(65, 1, 29, 0.000, 12.00, 0.00),
(66, 1, 30, 0.000, 0.00, 0.00),
(67, 1, 31, 0.000, 0.00, 0.00),
(68, 1, 32, 0.000, 0.00, 0.00),
(69, 1, 33, 0.000, 0.00, 0.00),
(70, 1, 34, 0.000, 0.00, 0.00),
(71, 1, 35, 0.000, 0.00, 0.00),
(72, 1, 36, 0.000, 0.00, 0.00),
(110, 2, 1, 80.000, 430.00, 34400.00),
(111, 2, 2, 80.000, 0.00, 0.00),
(112, 2, 3, 80.000, 270.00, 21600.00),
(113, 2, 4, 80.000, 10.00, 800.00),
(114, 2, 5, 64.000, 27.00, 1728.00),
(115, 2, 6, 1600.000, 10.00, 16000.00),
(116, 2, 7, 8.000, 25.00, 200.00),
(117, 2, 8, 8.000, 450.00, 3600.00),
(118, 2, 9, 8.000, 50.00, 400.00),
(119, 2, 10, 16.000, 200.00, 3200.00),
(120, 2, 11, 8.000, 15.00, 120.00),
(121, 2, 12, 533.000, 17.00, 9061.00),
(122, 2, 13, 266.000, 16.00, 4256.00),
(123, 2, 14, 798.000, 3.00, 2394.00),
(124, 2, 15, 1064.000, 2.50, 2660.00),
(125, 2, 16, 32.000, 115.00, 3680.00),
(126, 2, 17, 16.000, 175.00, 2800.00),
(127, 2, 18, 32.000, 275.00, 8800.00),
(128, 2, 19, 64.000, 60.00, 3840.00),
(129, 2, 20, 0.000, 10.00, 0.00),
(130, 2, 21, 0.000, 0.00, 0.00),
(131, 2, 22, 1.000, 500.00, 500.00),
(132, 2, 23, 32.000, 30.00, 960.00),
(133, 2, 24, 0.000, 0.00, 0.00),
(134, 2, 25, 64.000, 13.00, 832.00),
(135, 2, 26, 40.000, 10.00, 400.00),
(136, 2, 27, 512.000, 12.00, 6144.00),
(137, 2, 28, 16.000, 170.00, 2720.00),
(138, 2, 29, 32.000, 12.00, 384.00),
(139, 2, 30, 0.000, 0.00, 0.00),
(140, 2, 31, 0.000, 0.00, 0.00),
(141, 2, 32, 0.000, 0.00, 0.00),
(142, 2, 33, 0.000, 0.00, 0.00),
(143, 2, 34, 0.000, 0.00, 0.00),
(144, 2, 35, 0.000, 0.00, 0.00),
(145, 2, 36, 1.000, 300.00, 300.00),
(146, 2, 37, 1.000, 0.00, 0.00),
(147, 3, 1, 80.000, 430.00, 34400.00),
(148, 3, 2, 80.000, 0.00, 0.00),
(149, 3, 3, 80.000, 270.00, 21600.00),
(150, 3, 4, 80.000, 10.00, 800.00),
(151, 3, 5, 64.000, 27.00, 1728.00),
(152, 3, 6, 1600.000, 10.00, 16000.00),
(153, 3, 7, 8.000, 25.00, 200.00),
(154, 3, 8, 8.000, 450.00, 3600.00),
(155, 3, 9, 8.000, 50.00, 400.00),
(156, 3, 10, 16.000, 200.00, 3200.00),
(157, 3, 11, 8.000, 15.00, 120.00),
(158, 3, 12, 533.000, 17.00, 9061.00),
(159, 3, 13, 266.000, 16.00, 4256.00),
(160, 3, 14, 798.000, 3.00, 2394.00),
(161, 3, 15, 1064.000, 2.50, 2660.00),
(162, 3, 16, 32.000, 115.00, 3680.00),
(163, 3, 17, 16.000, 175.00, 2800.00),
(164, 3, 18, 32.000, 275.00, 8800.00),
(165, 3, 19, 64.000, 60.00, 3840.00),
(166, 3, 20, 0.000, 10.00, 0.00),
(167, 3, 21, 0.000, 0.00, 0.00),
(168, 3, 22, 1.000, 500.00, 500.00),
(169, 3, 23, 32.000, 30.00, 960.00),
(170, 3, 24, 0.000, 0.00, 0.00),
(171, 3, 25, 64.000, 13.00, 832.00),
(172, 3, 26, 40.000, 10.00, 400.00),
(173, 3, 27, 96.000, 12.00, 1152.00),
(174, 3, 28, 16.000, 170.00, 2720.00),
(175, 3, 29, 32.000, 12.00, 384.00),
(176, 3, 30, 0.000, 0.00, 0.00),
(177, 3, 31, 0.000, 0.00, 0.00),
(178, 3, 32, 0.000, 0.00, 0.00),
(179, 3, 33, 0.000, 0.00, 0.00),
(180, 3, 34, 0.000, 0.00, 0.00),
(181, 3, 35, 0.000, 0.00, 0.00),
(182, 3, 36, 1.000, 0.00, 0.00),
(183, 3, 37, 1.000, 0.00, 0.00),
(184, 4, 1, 80.000, 430.00, 34400.00),
(185, 4, 2, 80.000, 0.00, 0.00),
(186, 4, 3, 80.000, 270.00, 21600.00),
(187, 4, 4, 80.000, 10.00, 800.00),
(188, 4, 5, 64.000, 27.00, 1728.00),
(189, 4, 6, 1600.000, 10.00, 16000.00),
(190, 4, 7, 8.000, 25.00, 200.00),
(191, 4, 8, 8.000, 450.00, 3600.00),
(192, 4, 9, 8.000, 50.00, 400.00),
(193, 4, 10, 16.000, 200.00, 3200.00),
(194, 4, 11, 8.000, 15.00, 120.00),
(195, 4, 12, 533.000, 17.00, 9061.00),
(196, 4, 13, 266.000, 16.00, 4256.00),
(197, 4, 14, 798.000, 3.00, 2394.00),
(198, 4, 15, 1064.000, 2.50, 2660.00),
(199, 4, 16, 32.000, 115.00, 3680.00),
(200, 4, 17, 16.000, 175.00, 2800.00),
(201, 4, 18, 32.000, 275.00, 8800.00),
(202, 4, 19, 64.000, 60.00, 3840.00),
(203, 4, 20, 0.000, 10.00, 0.00),
(204, 4, 21, 0.000, 0.00, 0.00),
(205, 4, 22, 1.000, 500.00, 500.00),
(206, 4, 23, 32.000, 30.00, 960.00),
(207, 4, 24, 0.000, 0.00, 0.00),
(208, 4, 25, 64.000, 13.00, 832.00),
(209, 4, 26, 40.000, 10.00, 400.00),
(210, 4, 27, 96.000, 12.00, 1152.00),
(211, 4, 28, 16.000, 170.00, 2720.00),
(212, 4, 29, 32.000, 12.00, 384.00),
(213, 4, 30, 0.000, 0.00, 0.00),
(214, 4, 31, 0.000, 0.00, 0.00),
(215, 4, 32, 0.000, 0.00, 0.00),
(216, 4, 33, 0.000, 0.00, 0.00),
(217, 4, 34, 0.000, 0.00, 0.00),
(218, 4, 35, 0.000, 0.00, 0.00),
(219, 4, 36, 1.000, 0.00, 0.00),
(220, 4, 37, 1.000, 0.00, 0.00);

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

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

CREATE TABLE `tbl_products` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `rate` decimal(12,2) NOT NULL DEFAULT 0.00,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1=active, 0=inactive',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `tbl_products` (`id`, `name`, `rate`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Gi Pipe 20 ft', 430.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(2, 'Sq Pipe 20 ft', 0.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(3, 'Sq to Sq Coupling', 270.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(4, 'Gi Coupling', 10.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(5, 'Sq to R Coupling', 27.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(6, 'All Direction Nipple', 10.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(7, '20 Liter Sub Tank', 25.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(8, 'Tank Nipple', 450.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(9, '3/4 Float Valve', 50.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(10, '3/4 (Thr) Elbow', 200.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(11, 'M.S. Tank Stand', 15.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(12, 'GI Clamp', 17.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(13, 'Chain', 16.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(14, 'Shook', 3.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(15, 'Nylon Rope', 2.50, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(16, 'Water Level Indicator Set', 115.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(17, '3/4 Hose Pipe', 175.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(18, '2 Inch Hosepipe', 275.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(19, '3/4 Ball Valve', 60.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(20, 'Tefflan Tape', 10.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(21, 'Square Saddles', 0.00, 1, '2026-05-13 10:14:22', '2026-05-13 12:46:48'),
(22, '1\" Screen Filter', 500.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(23, '3/4 1/2 (Thr) Tee', 30.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(24, '3/4 1/2 Plain Tee', 0.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(25, '3/4 Tee', 13.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(26, '3/4 Elbow', 10.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(27, '3/4 FTA', 12.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(28, '3/4 PVC Pipe', 170.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(29, '3/4 MTA + End Cap', 12.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(30, 'Paste', 0.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(31, '8 Kg Feeder', 0.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(32, 'Turbo Feeder', 0.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(33, 'Chick Drinker', 0.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(34, '1\" PVC Pipe', 0.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(35, 'MTA 3/4', 0.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(36, 'Transport Charge', 0.00, 1, '2026-05-13 10:14:22', '2026-05-13 10:14:22'),
(37, 'Labour Charge', 0.00, 1, '2026-05-13 11:20:02', '2026-05-13 11:20:02');

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

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

CREATE TABLE `tbl_sales` (
  `id` int(11) NOT NULL,
  `invoice_no` varchar(50) DEFAULT NULL,
  `sale_date` date DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `cust_name` varchar(255) DEFAULT NULL,
  `cust_mobile` varchar(20) DEFAULT NULL,
  `cust_address` text DEFAULT NULL,
  `estimate_id` int(11) DEFAULT NULL,
  `sale_type` varchar(10) DEFAULT 'GST',
  `subtotal` decimal(12,2) DEFAULT 0.00,
  `discount_type` varchar(20) DEFAULT 'none',
  `discount_input` decimal(12,2) DEFAULT 0.00,
  `total_discount` decimal(12,2) DEFAULT 0.00,
  `sum_after_disc` decimal(12,2) DEFAULT 0.00,
  `global_gst_percent` decimal(5,2) DEFAULT 0.00,
  `global_gst_mode` varchar(20) DEFAULT 'Exclusive',
  `total_gst` decimal(12,2) DEFAULT 0.00,
  `round_off` decimal(12,2) DEFAULT 0.00,
  `net_amount` decimal(12,2) DEFAULT 0.00,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `tbl_sales` (`id`, `invoice_no`, `sale_date`, `customer_id`, `cust_name`, `cust_mobile`, `cust_address`, `estimate_id`, `sale_type`, `subtotal`, `discount_type`, `discount_input`, `total_discount`, `sum_after_disc`, `global_gst_percent`, `global_gst_mode`, `total_gst`, `round_off`, `net_amount`, `created_at`, `updated_at`) VALUES
(1, '1', '2026-05-14', 14, 'Jayasri', '8667887995', NULL, 3, 'GST', 126767.00, 'none', 0.00, 0.00, 126767.00, 0.00, 'Exclusive', 13.50, 0.50, 126781.00, '2026-05-14 07:10:53', '2026-05-14 07:10:53'),
(2, '0003', '2026-05-14', 15, 'Monisha', '6380171735', 'RCC Complex, Angammal Colony', NULL, 'GST', 1460.00, 'none', 0.00, 0.00, 1460.00, 5.00, 'Inclusive', 69.52, 0.00, 1460.00, '2026-05-14 08:21:10', '2026-05-14 08:21:10'),
(3, '0008', '2026-05-14', 13, 'Gan', '9368184875', NULL, NULL, 'GST', 300.00, 'none', 0.00, 0.00, 300.00, 5.00, 'Inclusive', 14.29, 0.00, 300.00, '2026-05-14 11:23:36', '2026-05-14 11:23:36');

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

--
-- Table structure for table `tbl_sale_items`
--

CREATE TABLE `tbl_sale_items` (
  `id` int(11) NOT NULL,
  `sale_id` int(11) NOT NULL,
  `product_id` int(11) DEFAULT NULL,
  `product_name` varchar(255) DEFAULT NULL,
  `qty` decimal(10,2) DEFAULT 0.00,
  `rate` decimal(10,2) DEFAULT 0.00,
  `gst_percent` decimal(5,2) DEFAULT 0.00,
  `gst_mode` varchar(20) DEFAULT 'Exclusive',
  `gst_amount` decimal(10,2) DEFAULT 0.00,
  `net_amount` decimal(10,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tbl_sale_items`
--

INSERT INTO `tbl_sale_items` (`id`, `sale_id`, `product_id`, `product_name`, `qty`, `rate`, `gst_percent`, `gst_mode`, `gst_amount`, `net_amount`) VALUES
(1, 1, 1, 'Gi Pipe 20 ft', 80.00, 430.00, 0.00, 'Exclusive', 0.00, 34400.00),
(2, 1, 2, 'Sq Pipe 20 ft', 80.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(3, 1, 3, 'Sq to Sq Coupling', 80.00, 270.00, 0.00, 'Exclusive', 0.00, 21600.00),
(4, 1, 4, 'Gi Coupling', 80.00, 10.00, 0.00, 'Exclusive', 0.00, 800.00),
(5, 1, 5, 'Sq to R Coupling', 64.00, 27.00, 0.00, 'Exclusive', 0.00, 1728.00),
(6, 1, 6, 'All Direction Nipple', 1600.00, 10.00, 0.00, 'Exclusive', 0.00, 16000.00),
(7, 1, 7, '20 Liter Sub Tank', 8.00, 25.00, 0.00, 'Exclusive', 0.00, 200.00),
(8, 1, 8, 'Tank Nipple', 8.00, 450.00, 0.00, 'Exclusive', 0.00, 3600.00),
(9, 1, 9, '3/4 Float Valve', 8.00, 50.00, 0.00, 'Exclusive', 0.00, 400.00),
(10, 1, 10, '3/4 (Thr) Elbow', 16.00, 200.00, 0.00, 'Exclusive', 0.00, 3200.00),
(11, 1, 11, 'M.S. Tank Stand', 8.00, 15.00, 0.00, 'Exclusive', 0.00, 120.00),
(12, 1, 12, 'GI Clamp', 533.00, 17.00, 0.00, 'Exclusive', 0.00, 9061.00),
(13, 1, 13, 'Chain', 266.00, 16.00, 0.00, 'Exclusive', 0.00, 4256.00),
(14, 1, 14, 'Shook', 798.00, 3.00, 0.00, 'Exclusive', 0.00, 2394.00),
(15, 1, 15, 'Nylon Rope', 1064.00, 2.50, 0.00, 'Exclusive', 0.00, 2660.00),
(16, 1, 16, 'Water Level Indicator Set', 32.00, 115.00, 0.00, 'Exclusive', 0.00, 3680.00),
(17, 1, 17, '3/4 Hose Pipe', 16.00, 175.00, 0.00, 'Exclusive', 0.00, 2800.00),
(18, 1, 18, '2 Inch Hosepipe', 32.00, 275.00, 0.00, 'Exclusive', 0.00, 8800.00),
(19, 1, 19, '3/4 Ball Valve', 64.00, 60.00, 0.00, 'Exclusive', 0.00, 3840.00),
(20, 1, 20, 'Tefflan Tape', 1.00, 10.00, 0.00, 'Exclusive', 0.00, 10.00),
(21, 1, 21, 'Square Saddles', 1.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(22, 1, 22, '1\" Screen Filter', 1.00, 500.00, 0.00, 'Exclusive', 0.00, 500.00),
(23, 1, 23, '3/4 1/2 (Thr) Tee', 32.00, 30.00, 0.00, 'Exclusive', 0.00, 960.00),
(24, 1, 24, '3/4 1/2 Plain Tee', 1.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(25, 1, 25, '3/4 Tee', 64.00, 13.00, 0.00, 'Exclusive', 0.00, 832.00),
(26, 1, 26, '3/4 Elbow', 40.00, 10.00, 0.00, 'Exclusive', 0.00, 400.00),
(27, 1, 27, '3/4 FTA', 96.00, 12.00, 0.00, 'Exclusive', 0.00, 1152.00),
(28, 1, 28, '3/4 PVC Pipe', 16.00, 170.00, 0.00, 'Exclusive', 0.00, 2720.00),
(29, 1, 29, '3/4 MTA + End Cap', 32.00, 12.00, 0.00, 'Exclusive', 0.00, 384.00),
(30, 1, 30, 'Paste', 1.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(31, 1, 31, '8 Kg Feeder', 1.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(32, 1, 32, 'Turbo Feeder', 1.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(33, 1, 33, 'Chick Drinker', 1.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(34, 1, 34, '1\" PVC Pipe', 1.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(35, 1, 35, 'MTA 3/4', 1.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(36, 1, 36, 'Transport Charge', 1.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(37, 1, 37, 'Labour Charge', 1.00, 0.00, 0.00, 'Exclusive', 0.00, 0.00),
(38, 1, 3, 'Sq to Sq Coupling', 1.00, 270.00, 5.00, 'Exclusive', 13.50, 283.50),
(39, 2, 3, 'Sq to Sq Coupling', 3.00, 270.00, 0.00, 'Exclusive', 0.00, 810.00),
(40, 2, NULL, 'test', 2.00, 100.00, 0.00, 'Exclusive', 0.00, 200.00),
(41, 2, NULL, 'cable', 10.00, 45.00, 0.00, 'Exclusive', 0.00, 450.00),
(42, 3, 7, '20 Liter Sub Tank', 10.00, 25.00, 0.00, 'Exclusive', 0.00, 250.00),
(43, 3, NULL, 'TEST', 5.00, 10.00, 0.00, 'Exclusive', 0.00, 50.00);

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

--
-- Table structure for table `tbl_settings`
--

CREATE TABLE `tbl_settings` (
  `id` int(11) NOT NULL,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` text NOT NULL,
  `setting_group` varchar(50) DEFAULT 'general',
  `description` text DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_by` int(11) DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tbl_settings`
--

INSERT INTO `tbl_settings` (`id`, `setting_key`, `setting_value`, `setting_group`, `description`, `created_by`, `created_at`, `updated_by`, `updated_at`) VALUES
(1, 'software_name', 'Saanvi Poultry Equipments', 'software', 'Main software/application name', NULL, '2025-10-28 10:49:31', 1, '2026-05-13 07:52:19'),
(2, 'software_version', '1.0.0', 'software', 'Current software version', NULL, '2025-10-28 10:49:31', 1, '2026-05-13 07:52:19'),
(3, 'company_name', 'Saanvi Poultry Equipments', 'company', 'Company/organization name', NULL, '2025-10-28 10:49:31', 1, '2026-05-13 07:52:19'),
(4, 'login_title', 'Login | Saanvi Poultry Equipments', 'ui', 'Title shown on login page', NULL, '2025-10-28 10:49:31', 1, '2026-05-13 07:52:19'),
(5, 'dashboard_title', 'Dashboard - Saanvi Poultry Equipments', 'ui', 'Title shown on dashboard page', NULL, '2025-10-28 10:49:31', 1, '2026-05-13 07:52:19'),
(6, 'panel_title', 'Saanvi Poultry Equipments - Panel', 'ui', 'Title shown in panel/browser tab', NULL, '2025-10-28 10:49:31', 1, '2026-05-13 07:52:19'),
(7, 'tagline', 'Saanvi Poultry Equipments', 'software', 'Software tagline/description', NULL, '2025-10-28 10:49:31', 1, '2026-05-13 07:28:32'),
(8, 'copyright_text', '© 2025 Saanvi Poultry Equipments All Rights Received.', 'footer', 'Copyright text for footer', NULL, '2025-10-28 10:49:31', 1, '2026-05-13 07:52:19'),
(9, 'support_email', 'support@gmail.com', 'contact', 'Support email address', NULL, '2025-10-28 10:49:31', 1, '2026-05-13 07:28:32'),
(10, 'support_phone', '+91-XXXXXXXXXX', 'contact', 'Support phone number', NULL, '2025-10-28 10:49:31', 1, '2026-05-13 07:28:32'),
(15, 'brand_logo', 'uploads/branding/logo_dd73e365c37c5a0a.png', 'general', NULL, NULL, '2026-05-13 07:43:45', 1, '2026-05-13 07:52:19'),
(16, 'brand_favicon', 'uploads/branding/favicon_79fd577ea771e744.png', 'general', NULL, NULL, '2026-05-13 07:43:46', 1, '2026-05-13 07:52:19');

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

--
-- Table structure for table `tbl_user`
--

CREATE TABLE `tbl_user` (
  `id` int(11) NOT NULL,
  `user_id` varchar(50) NOT NULL,
  `role_id` int(11) DEFAULT NULL COMMENT '1=>''Super Admin'', 2=>''User'',3=>''Client''',
  `username` varchar(100) NOT NULL,
  `password` varchar(255) NOT NULL,
  `user_type` enum('employee','user','both') NOT NULL DEFAULT 'both',
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `tbl_user`
--

INSERT INTO `tbl_user` (`id`, `user_id`, `role_id`, `username`, `password`, `user_type`, `status`, `created_at`, `updated_at`, `created_by`, `updated_by`) VALUES
(1, '1', 1, 'admin@gmail.com', '123456', 'both', 'active', '2025-02-10 02:59:06', '2025-10-28 10:43:28', 1, 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `tbl_customers`
--
ALTER TABLE `tbl_customers`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `mobile_no` (`mobile_no`),
  ADD KEY `idx_status` (`status`);

--
-- Indexes for table `tbl_poulinfra_quotations`
--
ALTER TABLE `tbl_poulinfra_quotations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_poulinfra_q_date` (`quotation_date`),
  ADD KEY `idx_poulinfra_q_no` (`quotation_no`(32));

--
-- Indexes for table `tbl_poulinfra_quotation_steps`
--
ALTER TABLE `tbl_poulinfra_quotation_steps`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uq_quotation_step` (`quotation_id`,`step_no`);

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

--
-- Indexes for table `tbl_poultry_estimates`
--
ALTER TABLE `tbl_poultry_estimates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_estimate_date` (`estimate_date`),
  ADD KEY `idx_customer_id` (`customer_id`);

--
-- Indexes for table `tbl_poultry_estimate_lines`
--
ALTER TABLE `tbl_poultry_estimate_lines`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uq_est_product` (`estimate_id`,`product_id`),
  ADD KEY `idx_estimate_id` (`estimate_id`);

--
-- Indexes for table `tbl_products`
--
ALTER TABLE `tbl_products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_name` (`name`);

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

--
-- Indexes for table `tbl_sale_items`
--
ALTER TABLE `tbl_sale_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sale_id` (`sale_id`);

--
-- Indexes for table `tbl_settings`
--
ALTER TABLE `tbl_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_setting_key` (`setting_key`);

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `tbl_poulinfra_quotation_steps`
--
ALTER TABLE `tbl_poulinfra_quotation_steps`
  ADD CONSTRAINT `fk_poulinfra_step_quotation` FOREIGN KEY (`quotation_id`) REFERENCES `tbl_poulinfra_quotations` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tbl_poultry_estimate_lines`
--
ALTER TABLE `tbl_poultry_estimate_lines`
  ADD CONSTRAINT `fk_poultry_lines_estimate` FOREIGN KEY (`estimate_id`) REFERENCES `tbl_poultry_estimates` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tbl_sale_items`
--
ALTER TABLE `tbl_sale_items`
  ADD CONSTRAINT `tbl_sale_items_ibfk_1` FOREIGN KEY (`sale_id`) REFERENCES `tbl_sales` (`id`) ON DELETE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
