-- phpMyAdmin SQL Dump
-- version 5.2.1deb3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 04, 2026 at 12:26 PM
-- Server version: 10.11.14-MariaDB-0ubuntu0.24.04.1
-- PHP Version: 8.3.6

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: `inetinfo_amc`
--

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

--
-- Table structure for table `activity_logs`
--

CREATE TABLE `activity_logs` (
  `log_id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `action` varchar(255) NOT NULL,
  `module` varchar(100) NOT NULL,
  `record_id` int(11) DEFAULT NULL,
  `old_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`old_values`)),
  `new_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`new_values`)),
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `activity_logs`
--

INSERT INTO `activity_logs` (`log_id`, `user_id`, `action`, `module`, `record_id`, `old_values`, `new_values`, `ip_address`, `user_agent`, `created_at`) VALUES
(1, 1, 'login', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-18 17:54:00'),
(2, 1, 'create', 'company', 1, NULL, '{\"company_name\":\"I-Net Infotech\",\"address\":\"Flat 02, BLDG B1, Shantinath, Ostwal Empire,\\r\\nBoisar, Maharashtra 401501\",\"city\":\"Palghar\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401501\",\"gst_number\":\"\",\"pan\":\"\",\"cin\":\"\",\"mobile\":\"09175418884\",\"email\":\"aniket143@gmail.com\",\"website\":\"https:\\/\\/inetinfo.in\\/\",\"bank_name\":\"\",\"bank_account\":\"\",\"bank_ifsc\":\"\",\"upi_id\":\"\",\"terms_conditions\":\"\",\"invoice_footer\":\"\",\"status\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-18 18:50:55'),
(3, 1, 'login', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 07:13:29'),
(4, 1, 'create', 'customers', 1, NULL, '{\"customer_id\":\"CUS-01001\",\"company_name\":\"Alchemie Gases &amp; Chemical Pvt. Ltd.\",\"contact_person\":\"Sushma Patil\",\"designation\":\"Director\",\"mobile\":\"9619490322\",\"alternate_mobile\":\"\",\"email\":\"tarapur@alchemiegases.com\",\"website\":\"https:\\/\\/www.alchemiegases.com\\/\",\"gst_number\":\"27AABCA4554F1ZW\",\"pan\":\"\",\"customer_type\":\"Enterprise\",\"industry\":\"Pharmaceutical\",\"address\":\"Plot No. T-112, M.I.D.C., Tarapur, Dist. Palghar-401 506. (Maharashtra), India.\",\"city\":\"Palghar\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401501\",\"notes\":\"\",\"status\":\"active\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 07:22:00'),
(5, 1, 'create', 'software', 1, NULL, '{\"software_code\":\"SW001\",\"software_name\":\"Cylinder tracking and Inventory Management System\",\"category\":\"Custom\",\"version\":\"1.6\",\"platform\":\"Linux\",\"technology\":\"PHP,Mysql,Jquery,HTML\",\"description\":\"Comprehensive ERP solution for tracking industrial gas cylinders across 50+ distribution centers, also generating auto billing and reminders.\",\"license_type\":\"Single\",\"annual_amc_amount\":0,\"monthly_amc_amount\":0,\"quarterly_amc_amount\":7812,\"half_yearly_amc_amount\":0,\"custom_amc_amount\":0,\"installation_charge\":0,\"support_charge\":0,\"status\":1,\"updated_at\":\"2026-07-19 12:57:04\",\"created_at\":\"2026-07-19 12:57:04\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 07:27:04'),
(6, 1, 'create', 'software', 2, NULL, '{\"software_code\":\"SW002\",\"software_name\":\"Gas Manufacturing Process System (MPS)\",\"category\":\"Custom\",\"version\":\"1.5\",\"platform\":\"Linux\",\"technology\":\"PHP,Mysql,HTML\",\"description\":\"GAS Manufacturing Details\",\"license_type\":\"Single\",\"annual_amc_amount\":0,\"monthly_amc_amount\":0,\"quarterly_amc_amount\":7080,\"half_yearly_amc_amount\":0,\"custom_amc_amount\":0,\"installation_charge\":0,\"support_charge\":0,\"status\":1,\"updated_at\":\"2026-07-19 12:59:40\",\"created_at\":\"2026-07-19 12:59:40\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 07:29:41'),
(7, 1, 'create', 'software', 3, NULL, '{\"software_code\":\"SW003\",\"software_name\":\"GAS CRM(Customer Managment System)\",\"category\":\"Custom\",\"version\":\"1.3\",\"platform\":\"Linux\",\"technology\":\"Php,Mysql,HTML\",\"description\":\"CRM\",\"license_type\":\"Single\",\"annual_amc_amount\":0,\"monthly_amc_amount\":0,\"quarterly_amc_amount\":6150,\"half_yearly_amc_amount\":0,\"custom_amc_amount\":0,\"installation_charge\":0,\"support_charge\":0,\"status\":1,\"updated_at\":\"2026-07-19 15:33:59\",\"created_at\":\"2026-07-19 15:33:59\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 10:03:59'),
(8, 1, 'create', 'amc', 1, NULL, '{\"amc_number\":\"AMC-00001\",\"customer_id\":1,\"software_id\":1,\"amc_type\":\"custom\",\"amc_type_label\":\"Custom\",\"amc_frequency\":\"quarterly\",\"amc_amount\":7812,\"gst_rate\":18,\"gst_amount\":1406.16,\"discount\":0,\"net_amount\":9218.16,\"start_date\":\"2026-03-01\",\"end_date\":\"2027-04-01\",\"renewal_date\":\"2027-03-31\",\"billing_cycle\":\"Quaterly\",\"payment_terms\":\"30\",\"service_visits\":0,\"support_hours\":\"10 AM- 6PM\",\"response_time\":\"8hrs\",\"priority\":\"Medium\",\"auto_renewal\":0,\"status\":\"active\",\"created_by\":1,\"created_at\":\"2026-07-19 16:15:18\",\"updated_at\":\"2026-07-19 16:15:18\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 10:45:18'),
(9, 1, 'create', 'amc', 2, NULL, '{\"amc_number\":\"AMC-00002\",\"customer_id\":1,\"software_id\":1,\"amc_type\":\"custom\",\"amc_type_label\":\"Custom\",\"amc_frequency\":\"quarterly\",\"amc_amount\":7812.5,\"gst_rate\":18,\"gst_amount\":1406.25,\"discount\":0,\"net_amount\":9218.75,\"start_date\":\"2026-04-01\",\"end_date\":\"2027-03-31\",\"renewal_date\":\"2027-03-31\",\"billing_cycle\":\"Quterly\",\"payment_terms\":\"30\",\"service_visits\":0,\"support_hours\":\"\",\"response_time\":\"\",\"priority\":\"\",\"auto_renewal\":0,\"status\":\"active\",\"created_by\":1,\"created_at\":\"2026-07-19 16:18:09\",\"updated_at\":\"2026-07-19 16:18:09\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 10:48:09'),
(10, 1, 'create', 'amc', 3, NULL, '{\"amc_number\":\"AMC-00003\",\"customer_id\":1,\"software_id\":1,\"amc_type\":\"custom\",\"amc_type_label\":\"\",\"amc_frequency\":\"quarterly\",\"amc_amount\":7812.5,\"gst_rate\":18,\"gst_amount\":1406.25,\"discount\":0,\"net_amount\":9218.75,\"start_date\":\"2026-04-01\",\"end_date\":\"2027-03-31\",\"renewal_date\":\"2027-03-31\",\"billing_cycle\":\"\",\"payment_terms\":\"\",\"service_visits\":0,\"support_hours\":\"\",\"response_time\":\"\",\"priority\":\"\",\"auto_renewal\":0,\"status\":\"active\",\"created_by\":1,\"created_at\":\"2026-07-19 16:29:28\",\"updated_at\":\"2026-07-19 16:29:28\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 10:59:28'),
(11, 1, 'create', 'amc', 4, NULL, '{\"amc_number\":\"AMC-00004\",\"customer_id\":1,\"software_id\":1,\"amc_type\":\"custom\",\"amc_type_label\":\"Custom\",\"amc_frequency\":\"quarterly\",\"amc_amount\":7812.5,\"gst_rate\":18,\"gst_amount\":1406.25,\"discount\":0,\"net_amount\":9218.75,\"start_date\":\"2026-04-01\",\"end_date\":\"2027-03-31\",\"renewal_date\":\"2027-03-31\",\"billing_cycle\":\"Quaterly\",\"payment_terms\":\"30\",\"service_visits\":0,\"support_hours\":\"10 AM - 6 PM\",\"response_time\":\"24hrs\",\"priority\":\"medium\",\"auto_renewal\":1,\"status\":\"active\",\"created_by\":1,\"created_at\":\"2026-07-19 16:37:48\",\"updated_at\":\"2026-07-19 16:37:48\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 11:07:48'),
(12, 1, 'update', 'amc', 2, '{\"id\":2,\"amc_number\":\"AMC-00002\",\"customer_id\":1,\"software_id\":1,\"amc_type\":\"custom\",\"amc_type_label\":\"Custom\",\"amc_frequency\":\"quarterly\",\"amc_amount\":\"7812.50\",\"gst_rate\":\"18.00\",\"gst_amount\":\"1406.25\",\"discount\":\"0.00\",\"net_amount\":\"9218.75\",\"start_date\":\"2026-04-01\",\"end_date\":\"2027-03-31\",\"renewal_date\":\"2027-03-31\",\"billing_cycle\":\"Quterly\",\"payment_terms\":\"30\",\"service_visits\":0,\"support_hours\":\"\",\"response_time\":\"\",\"priority\":\"\",\"auto_renewal\":0,\"agreement_pdf\":null,\"status\":\"active\",\"created_by\":1,\"created_at\":\"2026-07-19 16:18:09\",\"updated_at\":\"2026-07-19 16:18:09\"}', '{\"customer_id\":1,\"software_id\":2,\"amc_type\":\"custom\",\"amc_type_label\":\"Custom\",\"amc_frequency\":\"quarterly\",\"amc_amount\":7080,\"gst_rate\":18,\"gst_amount\":1274.4,\"discount\":0,\"net_amount\":8354.4,\"start_date\":\"2026-04-01\",\"end_date\":\"2027-03-31\",\"renewal_date\":\"2027-03-31\",\"billing_cycle\":\"Quterly\",\"payment_terms\":\"30\",\"service_visits\":0,\"support_hours\":\"\",\"response_time\":null,\"priority\":\"medium\",\"auto_renewal\":0,\"updated_at\":\"2026-07-19 16:42:19\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 11:12:19'),
(13, 1, 'update', 'amc', 3, '{\"id\":3,\"amc_number\":\"AMC-00003\",\"customer_id\":1,\"software_id\":1,\"amc_type\":\"custom\",\"amc_type_label\":\"\",\"amc_frequency\":\"quarterly\",\"amc_amount\":\"7812.50\",\"gst_rate\":\"18.00\",\"gst_amount\":\"1406.25\",\"discount\":\"0.00\",\"net_amount\":\"9218.75\",\"start_date\":\"2026-04-01\",\"end_date\":\"2027-03-31\",\"renewal_date\":\"2027-03-31\",\"billing_cycle\":\"\",\"payment_terms\":\"\",\"service_visits\":0,\"support_hours\":\"\",\"response_time\":\"\",\"priority\":\"\",\"auto_renewal\":0,\"agreement_pdf\":null,\"status\":\"active\",\"created_by\":1,\"created_at\":\"2026-07-19 16:29:28\",\"updated_at\":\"2026-07-19 16:29:28\"}', '{\"customer_id\":1,\"software_id\":3,\"amc_type\":\"custom\",\"amc_type_label\":\"\",\"amc_frequency\":\"quarterly\",\"amc_amount\":6150,\"gst_rate\":18,\"gst_amount\":1107,\"discount\":0,\"net_amount\":7257,\"start_date\":\"2026-04-01\",\"end_date\":\"2027-03-31\",\"renewal_date\":\"2027-03-31\",\"billing_cycle\":\"\",\"payment_terms\":\"\",\"service_visits\":0,\"support_hours\":\"\",\"response_time\":null,\"priority\":\"medium\",\"auto_renewal\":0,\"updated_at\":\"2026-07-19 16:43:36\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 11:13:36'),
(14, 1, 'create', 'invoice', 1, NULL, '{\"invoice_number\":\"INV-00001\",\"amc_id\":1,\"customer_id\":1,\"invoice_date\":\"2026-03-01\",\"due_date\":\"2026-03-31\",\"subtotal\":7812,\"gst_rate\":18,\"gst_amount\":1406.16,\"discount\":0,\"total_amount\":9218.16,\"paid_amount\":0,\"balance_amount\":9218.16,\"payment_status\":\"pending\",\"hsn_code\":\"998314\",\"description\":\"\",\"terms\":\"Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.\",\"qr_code\":\"https:\\/\\/api.qrserver.com\\/v1\\/create-qr-code\\/?size=200x200&data=1-AMC-00001-Alchemie+Gases+%26amp%3B+Chemical+Pvt.+Ltd.\",\"status\":\"draft\",\"created_by\":1,\"created_at\":\"2026-07-19 17:04:56\",\"updated_at\":\"2026-07-19 17:04:56\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 11:34:56'),
(15, 1, 'create', 'payment', 1, NULL, '{\"payment_id\":\"PAY-00001\",\"invoice_id\":1,\"customer_id\":1,\"invoice_amount\":9218.16,\"received_amount\":9218,\"pending_amount\":0.15999999999985448,\"payment_date\":\"2026-04-05\",\"payment_mode\":\"bank_transfer\",\"reference_number\":\"\",\"transaction_id\":\"\",\"bank_name\":\"\",\"cheque_number\":\"\",\"cheque_date\":\"\",\"remarks\":\"\",\"receipt_number\":\"RCT-20260719-00001\",\"status\":\"completed\",\"created_by\":1,\"created_at\":\"2026-07-19 17:08:59\",\"updated_at\":\"2026-07-19 17:08:59\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 11:38:59'),
(16, 1, 'update', 'amc', 1, '{\"id\":1,\"amc_number\":\"AMC-00001\",\"customer_id\":1,\"software_id\":1,\"amc_type\":\"custom\",\"amc_type_label\":\"Custom\",\"amc_frequency\":\"quarterly\",\"amc_amount\":\"7812.00\",\"gst_rate\":\"18.00\",\"gst_amount\":\"1406.16\",\"discount\":\"0.00\",\"net_amount\":\"9218.16\",\"start_date\":\"2026-03-01\",\"end_date\":\"2027-04-01\",\"renewal_date\":\"2027-03-31\",\"billing_cycle\":\"Quaterly\",\"payment_terms\":\"30\",\"service_visits\":0,\"support_hours\":\"10 AM- 6PM\",\"response_time\":\"8hrs\",\"priority\":\"medium\",\"auto_renewal\":0,\"agreement_pdf\":null,\"status\":\"active\",\"created_by\":1,\"created_at\":\"2026-07-19 16:15:18\",\"updated_at\":\"2026-07-19 16:15:18\"}', '{\"customer_id\":1,\"software_id\":1,\"amc_type\":\"custom\",\"amc_type_label\":\"Custom\",\"amc_frequency\":\"quarterly\",\"amc_amount\":7812,\"gst_rate\":18,\"gst_amount\":1406.16,\"discount\":0,\"net_amount\":9218.16,\"start_date\":\"2026-03-01\",\"end_date\":\"2027-04-01\",\"renewal_date\":\"2027-03-31\",\"billing_cycle\":\"Quaterly\",\"payment_terms\":\"30\",\"service_visits\":0,\"support_hours\":\"10 AM- 6PM\",\"response_time\":\"8hrs\",\"priority\":\"medium\",\"auto_renewal\":1,\"updated_at\":\"2026-07-19 17:18:27\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 11:48:27'),
(17, 1, 'create', 'customer_software', 1, NULL, '{\"customer_id\":1,\"software_id\":1,\"license_number\":\"INET-SW001-01\",\"activation_date\":\"2020-07-27\",\"installation_date\":\"2020-07-10\",\"warranty_start\":null,\"warranty_end\":null,\"amc_start\":\"2021-06-19\",\"amc_end\":null,\"number_of_users\":20,\"license_type\":\"Single\",\"installation_engineer\":\"Aniket Dalvi\",\"remarks\":\"\",\"status\":\"active\",\"updated_at\":\"2026-07-19 20:51:37\",\"created_at\":\"2026-07-19 20:51:37\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 15:21:37'),
(18, 1, 'create', 'invoice', 2, NULL, '{\"invoice_number\":\"INV-00002\",\"amc_id\":3,\"customer_id\":1,\"invoice_date\":\"2026-07-19\",\"due_date\":\"2026-08-18\",\"subtotal\":6150,\"gst_rate\":18,\"gst_amount\":1107,\"discount\":0,\"total_amount\":7257,\"paid_amount\":0,\"balance_amount\":7257,\"payment_status\":\"pending\",\"hsn_code\":\"998314\",\"description\":\"Service Period - 1-APR-2026 To 31-JUN-2026\",\"terms\":\"Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.\",\"qr_code\":\"https:\\/\\/api.qrserver.com\\/v1\\/create-qr-code\\/?size=200x200&data=1-AMC-00003-Alchemie+Gases+%26amp%3B+Chemical+Pvt.+Ltd.\",\"status\":\"draft\",\"created_by\":1,\"created_at\":\"2026-07-19 21:54:35\",\"updated_at\":\"2026-07-19 21:54:35\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 16:24:35'),
(19, 1, 'create', 'invoice', 3, NULL, '{\"invoice_number\":\"INV-00003\",\"amc_id\":4,\"customer_id\":1,\"invoice_date\":\"2026-07-19\",\"due_date\":\"2026-08-18\",\"subtotal\":7812.5,\"gst_rate\":18,\"gst_amount\":1406.25,\"discount\":0,\"total_amount\":9218.75,\"paid_amount\":0,\"balance_amount\":9218.75,\"payment_status\":\"pending\",\"hsn_code\":\"998314\",\"description\":\"AMC - AMC-00004 (Alchemie Gases &amp; Chemical Pvt. Ltd.)\",\"terms\":\"Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.\",\"qr_code\":\"https:\\/\\/api.qrserver.com\\/v1\\/create-qr-code\\/?size=200x200&data=Alchemie+Gases+%26amp%3B+Chemical+Pvt.+Ltd.-AMC-00004\",\"status\":\"draft\",\"created_by\":1,\"created_at\":\"2026-07-19 22:01:44\",\"updated_at\":\"2026-07-19 22:01:44\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-19 16:31:44'),
(20, 1, 'login', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0', '2026-07-20 09:08:50'),
(21, 1, 'login', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-20 10:26:34'),
(22, 1, 'create', 'invoice', 4, NULL, '{\"invoice_number\":\"INV-00004\",\"amc_id\":2,\"customer_id\":1,\"invoice_date\":\"2026-07-20\",\"due_date\":\"2026-08-19\",\"subtotal\":7080,\"gst_rate\":18,\"gst_amount\":1274.4,\"discount\":0,\"total_amount\":8354.4,\"paid_amount\":0,\"balance_amount\":8354.4,\"payment_status\":\"pending\",\"hsn_code\":\"998314\",\"description\":\"\",\"terms\":\"Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.\",\"qr_code\":\"https:\\/\\/api.qrserver.com\\/v1\\/create-qr-code\\/?size=200x200&data=1-AMC-00002-Alchemie+Gases+%26amp%3B+Chemical+Pvt.+Ltd.\",\"status\":\"draft\",\"created_by\":1,\"created_at\":\"2026-07-20 16:01:56\",\"updated_at\":\"2026-07-20 16:01:56\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-20 10:31:56'),
(23, 1, 'login', 'auth', 1, NULL, NULL, '103.48.100.130', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-20 11:25:54'),
(24, 1, 'login', 'auth', 1, NULL, NULL, '103.48.100.130', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-20 11:28:04'),
(25, 1, 'update', 'company', 1, '{\"id\":\"1\",\"logo\":null,\"upi_qr\":null,\"signature_image\":null}', '{\"company_name\":\"I-Net Infotech\",\"address\":\"Flat 02, BLDG B1, Shantinath, Ostwal Empire,\\r\\nBoisar, Maharashtra 401501\",\"city\":\"Palghar\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401501\",\"gst_number\":\"27AAFFI1991R1ZM\",\"pan\":\"\",\"cin\":\"\",\"mobile\":\"09175418884\",\"email\":\"aniket143@gmail.com\",\"website\":\"https:\\/\\/inetinfo.in\\/\",\"bank_name\":\"Kotak Mahindra Bank\",\"bank_account\":\"6111613955\",\"bank_ifsc\":\"KKBK0000672\",\"upi_id\":\"\",\"terms_conditions\":\"1.Thanks for your business.\\r\\n2.This invoice is generated using I-Net Inventory\",\"invoice_footer\":\"This is a computer generated invoice no signature required\",\"logo\":\"company\\/logod31fb6dca56523f773f29f5ce319abf8.png\"}', '103.48.100.130', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-20 11:30:26'),
(26, 1, 'update', 'company', 1, '{\"id\":\"1\",\"logo\":\"company\\/logod31fb6dca56523f773f29f5ce319abf8.png\",\"upi_qr\":null,\"signature_image\":null}', '{\"company_name\":\"I-Net Infotech\",\"address\":\"Flat 02, BLDG B1, Shantinath, Ostwal Empire,\\r\\nBoisar, Maharashtra 401501\",\"city\":\"Palghar\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401501\",\"gst_number\":\"27AAFFI1991R1ZM\",\"pan\":\"\",\"cin\":\"\",\"mobile\":\"09175418884\",\"email\":\"aniket143@gmail.com\",\"website\":\"https:\\/\\/inetinfo.in\\/\",\"bank_name\":\"Kotak Mahindra Bank\",\"bank_account\":\"6111613955\",\"bank_ifsc\":\"KKBK0000672\",\"upi_id\":\"\",\"terms_conditions\":\"1.Thanks for your business.\\r\\n2.This invoice is generated using I-Net Inventory\",\"invoice_footer\":\"This is a computer generated invoice no signature required\",\"logo\":\"company\\/logoe870f2bccbdb2e69348e6861b2ff4d2d.png\"}', '103.48.100.130', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-20 11:30:29'),
(27, 1, 'create', 'customers', 2, NULL, '{\"customer_id\":\"CUS-01002\",\"company_name\":\"Autocal Solution Pvt. Ltd.\",\"contact_person\":\"Kiran Dalvi\",\"designation\":\"\",\"mobile\":\"09890624789\",\"alternate_mobile\":\"\",\"email\":\"kiran.a.dalvi2010@gmail.com\",\"website\":\"\",\"gst_number\":\"27AAGCA9480PIZV\",\"pan\":\"\",\"customer_type\":\"Enterprise\",\"industry\":\"Other\",\"address\":\"Unit No.4, Ruby Industrial estate, PCS ltd, Navghar,\",\"city\":\"Vasai(E)\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401 210\",\"notes\":\"\",\"status\":\"active\"}', '103.48.100.130', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-20 11:34:47'),
(28, 1, 'login', 'auth', 1, NULL, NULL, '2401:4900:891e:f7d8:b4c2:d95:414c:3ee4', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-21 16:46:09'),
(29, 1, 'update', 'company', 1, '{\"id\":\"1\",\"logo\":\"company\\/logoe870f2bccbdb2e69348e6861b2ff4d2d.png\",\"upi_qr\":null,\"signature_image\":null}', '{\"company_name\":\"I-Net Infotech\",\"address\":\"Flat 02, BLDG B1, Shantinath, Ostwal Empire,\\r\\nBoisar, Maharashtra 401501\",\"city\":\"Palghar\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401501\",\"gst_number\":\"27AAFFI1991R1ZM\",\"pan\":\"\",\"cin\":\"\",\"mobile\":\"09175418884\",\"email\":\"admin@sbitinfo.in\",\"website\":\"https:\\/\\/inetinfo.in\\/\",\"bank_name\":\"Kotak Mahindra Bank\",\"bank_account\":\"6111613955\",\"bank_ifsc\":\"KKBK0000672\",\"upi_id\":\"\",\"terms_conditions\":\"1.Thanks for your business.\\r\\n2.This invoice is generated using I-Net Inventory\",\"invoice_footer\":\"This is a computer generated invoice no signature required\"}', '2401:4900:891e:f7d8:b4c2:d95:414c:3ee4', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-21 17:03:24'),
(30, 1, 'update', 'customers', 1, '{\"id\":\"1\",\"customer_id\":\"CUS-01001\",\"company_name\":\"Alchemie Gases &amp; Chemical Pvt. Ltd.\",\"contact_person\":\"Sushma Patil\",\"designation\":\"Director\",\"mobile\":\"9619490322\",\"alternate_mobile\":\"\",\"email\":\"tarapur@alchemiegases.com\",\"website\":\"https:\\/\\/www.alchemiegases.com\\/\",\"gst_number\":\"27AABCA4554F1ZW\",\"pan\":\"\",\"address\":\"Plot No. T-112, M.I.D.C., Tarapur, Dist. Palghar-401 506. (Maharashtra), India.\",\"city\":\"Palghar\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401501\",\"customer_type\":\"Enterprise\",\"industry\":\"Pharmaceutical\",\"notes\":\"\",\"logo\":null,\"agreement_copy\":null,\"pan_copy\":null,\"gst_certificate\":null,\"other_documents\":null,\"status\":\"active\",\"created_at\":\"2026-07-19 12:52:00\",\"updated_at\":\"2026-07-19 12:52:00\"}', '{\"company_name\":\"Alchemie Gases and Chemical Pvt. Ltd.\",\"contact_person\":\"Sushma Patil\",\"designation\":\"Director\",\"mobile\":\"9619490322\",\"alternate_mobile\":\"\",\"email\":\"tarapur@alchemiegases.com\",\"website\":\"https:\\/\\/www.alchemiegases.com\\/\",\"gst_number\":\"27AABCA4554F1ZW\",\"pan\":\"\",\"customer_type\":\"Enterprise\",\"industry\":\"Pharmaceutical\",\"address\":\"Plot No. T-112, M.I.D.C., Tarapur, Dist. Palghar-401 506. (Maharashtra), India.\",\"city\":\"Palghar\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401501\",\"notes\":\"\",\"status\":\"active\"}', '2401:4900:891e:f7d8:b4c2:d95:414c:3ee4', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-21 17:04:14'),
(31, 1, 'login', 'auth', 1, NULL, NULL, '103.89.43.187', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-22 06:02:05'),
(32, 1, 'login', 'auth', 1, NULL, NULL, '103.77.153.242', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-29 11:11:47'),
(33, 1, 'create', 'customers', 3, NULL, '{\"customer_id\":\"CUS-01003\",\"company_name\":\"kusmo\",\"contact_person\":\"Nilesh Darade\",\"designation\":\"Manager\",\"mobile\":\"9322314166\",\"alternate_mobile\":\"9311066000\",\"email\":\"kusmochemicals@yahoo.co.in\",\"website\":\"www.kusmochemicals.com\",\"gst_number\":\"\",\"pan\":\"\",\"customer_type\":\"\",\"industry\":\"Pharmaceutical\",\"address\":\"Unit No. 7-8, Kedia Compound, Wada Road,\\r\\nShelar Village, Bhiwandi, Thane-421 302, Maharashtra, India\",\"city\":\"Thane\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"421 302\",\"notes\":\"\",\"status\":\"active\"}', '103.77.153.242', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-30 06:31:27'),
(34, 1, 'create', 'software', 4, NULL, '{\"software_code\":\"WS-01\",\"software_name\":\"Website\",\"category\":\"Web\",\"version\":\"1.2\",\"platform\":\"Linux\",\"technology\":\"PHP,HTML\",\"description\":\"Kusmochemical website\",\"license_type\":\"Single\",\"annual_amc_amount\":2500,\"monthly_amc_amount\":0,\"quarterly_amc_amount\":0,\"half_yearly_amc_amount\":0,\"custom_amc_amount\":0,\"installation_charge\":0,\"support_charge\":0,\"status\":1,\"updated_at\":\"2026-07-30 12:27:59\",\"created_at\":\"2026-07-30 12:27:59\"}', '103.77.153.242', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-30 06:57:59'),
(35, 1, 'create', 'amc', 5, NULL, '{\"amc_number\":\"AMC-00005\",\"customer_id\":3,\"software_id\":4,\"amc_type\":\"support_only\",\"amc_type_label\":\"\",\"amc_frequency\":\"yearly\",\"amc_amount\":2500,\"gst_rate\":18,\"gst_amount\":450,\"discount\":0,\"net_amount\":2950,\"start_date\":\"2026-04-01\",\"end_date\":\"2027-03-30\",\"renewal_date\":\"2027-03-01\",\"billing_cycle\":\"Yearly\",\"payment_terms\":\"Valid For 30 Days\",\"service_visits\":0,\"support_hours\":\"\",\"response_time\":null,\"priority\":\"medium\",\"auto_renewal\":1,\"status\":\"active\",\"created_by\":1,\"created_at\":\"2026-07-30 12:57:16\",\"updated_at\":\"2026-07-30 12:57:16\"}', '103.77.153.242', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-07-30 07:27:16'),
(36, 1, 'login', 'auth', 1, NULL, NULL, '103.174.30.231', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-08-10 11:15:39'),
(37, 1, 'login', 'auth', 1, NULL, NULL, '2401:4900:891e:93f:f8c8:bf65:b72:b842', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-09-01 12:49:31'),
(38, 1, 'create', 'software', 5, NULL, '{\"software_code\":\"SW-004\",\"software_name\":\"Calibration Management System\",\"category\":\"Custom\",\"version\":\"1.2\",\"platform\":\"Linux\",\"technology\":\"PHP,Mysql\",\"description\":\"Calibration certificate creation, instrument inventory managemnt\",\"license_type\":\"Single\",\"annual_amc_amount\":0,\"monthly_amc_amount\":0,\"quarterly_amc_amount\":19000,\"half_yearly_amc_amount\":0,\"custom_amc_amount\":0,\"installation_charge\":0,\"support_charge\":0,\"status\":1,\"updated_at\":\"2026-09-01 18:24:36\",\"created_at\":\"2026-09-01 18:24:36\"}', '2401:4900:891e:93f:f8c8:bf65:b72:b842', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-09-01 12:54:36'),
(39, 1, 'create', 'amc', 6, NULL, '{\"amc_number\":\"AMC-00006\",\"customer_id\":2,\"software_id\":5,\"amc_type\":\"support_only\",\"amc_type_label\":\"\",\"amc_frequency\":\"quarterly\",\"amc_amount\":19000,\"gst_rate\":18,\"gst_amount\":3420,\"discount\":0,\"net_amount\":22420,\"start_date\":\"2026-03-01\",\"end_date\":\"2027-02-28\",\"renewal_date\":\"2027-03-01\",\"billing_cycle\":\"Quaterly\",\"payment_terms\":\"Net 15 Days\",\"service_visits\":0,\"support_hours\":\"\",\"response_time\":null,\"priority\":\"medium\",\"auto_renewal\":1,\"status\":\"active\",\"created_by\":1,\"created_at\":\"2026-09-01 18:27:35\",\"updated_at\":\"2026-09-01 18:27:35\"}', '2401:4900:891e:93f:f8c8:bf65:b72:b842', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-09-01 12:57:35'),
(40, 1, 'create', 'invoice', 5, NULL, '{\"invoice_number\":\"INV-00005\",\"amc_id\":6,\"customer_id\":2,\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"subtotal\":19000,\"gst_rate\":18,\"gst_amount\":3420,\"discount\":0,\"total_amount\":22420,\"paid_amount\":0,\"balance_amount\":22420,\"payment_status\":\"pending\",\"hsn_code\":\"998314\",\"description\":\"\",\"terms\":\"Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.\",\"qr_code\":\"https:\\/\\/api.qrserver.com\\/v1\\/create-qr-code\\/?size=200x200&data=2-AMC-00006-Autocal+Solution+Pvt.+Ltd.\",\"status\":\"draft\",\"created_by\":1,\"created_at\":\"2026-09-01 18:28:14\",\"updated_at\":\"2026-09-01 18:28:14\"}', '2401:4900:891e:93f:f8c8:bf65:b72:b842', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-09-01 12:58:14'),
(41, 1, 'login', 'auth', 1, NULL, NULL, '2401:4900:8925:5f02:4d65:5629:3f53:ddcb', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36', '2026-09-02 10:31:12'),
(42, 1, 'login', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 11:35:02'),
(43, 1, 'update', 'invoice', 5, '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":\"18.00\",\"discount\":\"0.00\",\"total_amount\":\"22420.00\",\"status\":\"draft\"}', '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":18,\"gst_amount\":3420,\"discount\":0,\"total_amount\":22420,\"balance_amount\":22420,\"payment_status\":\"pending\",\"hsn_code\":\"998314\",\"description\":\"\",\"terms\":\"Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.\",\"status\":\"draft\",\"updated_at\":\"2026-09-02 17:12:35\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 11:42:35'),
(44, 1, 'update', 'invoice', 5, '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":\"18.00\",\"discount\":\"0.00\",\"total_amount\":\"22420.00\",\"status\":\"draft\"}', '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":18,\"gst_amount\":3420,\"discount\":0,\"total_amount\":22420,\"balance_amount\":22420,\"payment_status\":\"pending\",\"hsn_code\":\"998314\",\"description\":\"\",\"terms\":\"Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.\",\"status\":\"draft\",\"updated_at\":\"2026-09-02 17:16:01\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 11:46:01'),
(45, 1, 'update', 'amc', 6, '{\"id\":6,\"amc_number\":\"AMC-00006\",\"customer_id\":2,\"software_id\":5,\"amc_type\":\"support_only\",\"amc_type_label\":\"\",\"amc_frequency\":\"quarterly\",\"amc_amount\":\"19000.00\",\"gst_rate\":\"18.00\",\"gst_amount\":\"3420.00\",\"discount\":\"0.00\",\"net_amount\":\"22420.00\",\"start_date\":\"2026-03-01\",\"end_date\":\"2027-02-28\",\"renewal_date\":\"2027-03-01\",\"billing_cycle\":\"Quaterly\",\"payment_terms\":\"Net 15 Days\",\"service_visits\":0,\"support_hours\":\"\",\"response_time\":null,\"priority\":\"medium\",\"auto_renewal\":1,\"agreement_pdf\":null,\"status\":\"active\",\"created_by\":1,\"created_at\":\"2026-09-01 18:27:35\",\"updated_at\":\"2026-09-01 18:27:35\"}', '{\"customer_id\":2,\"software_id\":5,\"amc_type\":\"support_only\",\"amc_type_label\":\"\",\"amc_frequency\":\"quarterly\",\"amc_amount\":19000,\"gst_rate\":18,\"gst_amount\":3420,\"discount\":0,\"net_amount\":22420,\"start_date\":\"2026-03-01\",\"end_date\":\"2027-02-28\",\"renewal_date\":\"2027-03-01\",\"billing_cycle\":\"Quaterly\",\"payment_terms\":\"Net 15 Days\",\"service_visits\":0,\"support_hours\":\"\",\"response_time\":null,\"priority\":\"medium\",\"auto_renewal\":1,\"updated_at\":\"2026-09-02 17:19:52\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 11:49:52'),
(46, 1, 'update', 'invoice', 5, '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":\"18.00\",\"discount\":\"0.00\",\"total_amount\":\"22420.00\",\"status\":\"draft\"}', '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":18,\"gst_amount\":3420,\"discount\":0,\"total_amount\":22420,\"balance_amount\":22420,\"payment_status\":\"pending\",\"hsn_code\":\"998314\",\"description\":\"\",\"terms\":\"Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.\",\"status\":\"draft\",\"updated_at\":\"2026-09-02 17:30:16\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 12:00:16'),
(47, 1, 'cache_cleared', 'settings', NULL, NULL, '{\"files_cleared\":1}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 12:13:41'),
(48, 1, 'update', 'company', 1, '{\"id\":1,\"logo\":\"company\\/logoe870f2bccbdb2e69348e6861b2ff4d2d.png\",\"upi_qr\":null,\"signature_image\":null}', '{\"company_name\":\"I-Net Infotech\",\"address\":\"Shiv Sagar building, 102, khodaram bagh road, behind Don Bosco school, Sainath Nagar, Boisar, Maharashtra 401501\",\"city\":\"Palghar\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401501\",\"gst_number\":\"27AAFFI1991R1ZM\",\"pan\":\"\",\"cin\":\"\",\"mobile\":\"09175418884\",\"email\":\"admin@sbitinfo.in\",\"website\":\"https:\\/\\/inetinfo.in\\/\",\"bank_name\":\"Kotak Mahindra Bank\",\"bank_account\":\"6111613955\",\"bank_ifsc\":\"KKBK0000672\",\"upi_id\":\"\",\"terms_conditions\":\"1.Thanks for your business.\\r\\n2.This invoice is generated using I-Net Inventory\",\"invoice_footer\":\"This is a computer generated invoice no signature required\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 12:15:29'),
(49, 1, 'logout', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 12:48:53'),
(50, 1, 'login', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 12:54:42'),
(51, 1, 'update', 'invoice', 5, '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":\"18.00\",\"gst_amount\":\"3420.00\",\"discount\":\"0.00\",\"total_amount\":\"22420.00\"}', '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":18,\"discount\":0,\"total_amount\":22420}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 12:59:22'),
(52, 1, 'update', 'invoice', 5, '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":\"18.00\",\"gst_amount\":\"3420.00\",\"discount\":\"0.00\",\"total_amount\":\"22420.00\"}', '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":18,\"discount\":0,\"total_amount\":22420}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 12:59:44'),
(53, 1, 'update', 'invoice', 5, '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":\"18.00\",\"gst_amount\":\"3420.00\",\"discount\":\"0.00\",\"total_amount\":\"22420.00\"}', '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":18,\"discount\":0,\"total_amount\":22420}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 13:00:29'),
(54, 1, 'update', 'invoice', 5, '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":\"18.00\",\"gst_amount\":\"3420.00\",\"discount\":\"0.00\",\"total_amount\":\"22420.00\"}', '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":18,\"discount\":0,\"total_amount\":22420}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-02 13:03:29'),
(55, 1, 'login', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 04:55:46'),
(56, 1, 'update', 'software', 5, '{\"id\":5,\"software_code\":\"SW-004\",\"software_name\":\"Calibration Management System\",\"category\":\"Custom\",\"version\":\"1.2\",\"platform\":\"Linux\",\"technology\":\"PHP,Mysql\",\"description\":\"Calibration certificate creation, instrument inventory managemnt\",\"license_type\":\"Single\",\"annual_amc_amount\":\"0.00\",\"monthly_amc_amount\":\"0.00\",\"quarterly_amc_amount\":\"19000.00\",\"half_yearly_amc_amount\":\"0.00\",\"custom_amc_amount\":\"0.00\",\"installation_charge\":\"0.00\",\"support_charge\":\"0.00\",\"status\":1,\"created_at\":\"2026-09-01 18:24:36\",\"updated_at\":\"2026-09-01 18:24:36\"}', '{\"software_code\":\"SW-004\",\"software_name\":\"Calibration Management System\",\"category\":\"Custom\",\"version\":\"1.2\",\"platform\":\"Linux\",\"technology\":\"PHP,Mysql\",\"description\":\"Calibration certificate creation, instrument inventory managemnt\",\"license_type\":\"Open Source\",\"annual_amc_amount\":0,\"monthly_amc_amount\":0,\"quarterly_amc_amount\":19000,\"half_yearly_amc_amount\":0,\"custom_amc_amount\":0,\"installation_charge\":0,\"support_charge\":0,\"status\":1,\"updated_at\":\"2026-09-03 10:26:40\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 04:56:40'),
(57, 1, 'login', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 08:34:04'),
(58, 1, 'update', 'software', 5, '{\"id\":5,\"software_code\":\"SW-004\",\"software_name\":\"Calibration Management System\",\"category\":\"Custom\",\"version\":\"1.2\",\"platform\":\"Linux\",\"technology\":\"PHP,Mysql\",\"description\":\"Calibration certificate creation, instrument inventory managemnt\",\"license_type\":\"Open Source\",\"annual_amc_amount\":\"0.00\",\"monthly_amc_amount\":\"0.00\",\"quarterly_amc_amount\":\"19000.00\",\"half_yearly_amc_amount\":\"0.00\",\"custom_amc_amount\":\"0.00\",\"installation_charge\":\"0.00\",\"support_charge\":\"0.00\",\"status\":1,\"created_at\":\"2026-09-01 18:24:36\",\"updated_at\":\"2026-09-03 10:26:40\"}', '{\"software_code\":\"SW-004\",\"software_name\":\"Calibration Management System\",\"category\":\"Custom\",\"version\":\"1.2\",\"platform\":\"Linux\",\"technology\":\"PHP,Mysql\",\"description\":\"Calibration certificate creation, instrument inventory managemnt\",\"license_type\":\"Open Source\",\"annual_amc_amount\":0,\"monthly_amc_amount\":0,\"quarterly_amc_amount\":0,\"half_yearly_amc_amount\":0,\"custom_amc_amount\":0,\"installation_charge\":0,\"support_charge\":0,\"status\":1,\"updated_at\":\"2026-09-03 14:14:37\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 08:44:37'),
(59, 1, 'update', 'software', 5, '{\"id\":5,\"software_code\":\"SW-004\",\"software_name\":\"Calibration Management System\",\"category\":\"Custom\",\"version\":\"1.2\",\"platform\":\"Linux\",\"technology\":\"PHP,Mysql\",\"description\":\"Calibration certificate creation, instrument inventory managemnt\",\"license_type\":\"Open Source\",\"annual_amc_amount\":\"0.00\",\"monthly_amc_amount\":\"0.00\",\"quarterly_amc_amount\":\"0.00\",\"half_yearly_amc_amount\":\"0.00\",\"custom_amc_amount\":\"0.00\",\"installation_charge\":\"0.00\",\"support_charge\":\"0.00\",\"status\":1,\"created_at\":\"2026-09-01 18:24:36\",\"updated_at\":\"2026-09-03 14:14:37\"}', '{\"software_code\":\"SW-004\",\"software_name\":\"Calibration Management System\",\"category\":\"Custom\",\"version\":\"1.2\",\"platform\":\"Linux\",\"technology\":\"PHP,Mysql\",\"description\":\"Calibration certificate creation, instrument inventory managemnt\",\"license_type\":\"Open Source\",\"annual_amc_amount\":0,\"monthly_amc_amount\":0,\"quarterly_amc_amount\":19000,\"half_yearly_amc_amount\":0,\"custom_amc_amount\":0,\"installation_charge\":0,\"support_charge\":0,\"status\":1,\"updated_at\":\"2026-09-03 14:14:56\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 08:44:56'),
(60, 1, 'login', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 11:02:32'),
(61, 1, 'update', 'invoice', 5, '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":\"18.00\",\"gst_amount\":\"3420.00\",\"discount\":\"0.00\",\"total_amount\":\"22420.00\"}', '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":18,\"discount\":0,\"total_amount\":22420}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 11:21:25'),
(62, 1, 'update', 'invoice', 5, '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":\"18.00\",\"gst_amount\":\"3420.00\",\"discount\":\"0.00\",\"total_amount\":\"22420.00\"}', '{\"invoice_date\":\"2026-09-01\",\"due_date\":\"2026-09-24\",\"gst_rate\":18,\"discount\":0,\"total_amount\":22420}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 11:22:07'),
(63, 1, 'update', 'company', 1, '{\"id\":1,\"logo\":\"company\\/logoe870f2bccbdb2e69348e6861b2ff4d2d.png\",\"upi_qr\":null,\"signature_image\":null}', '{\"company_name\":\"I-Net Infotech\",\"address\":\"Shiv Sagar building, 102, khodaram bagh road, behind Don Bosco school, Sainath Nagar, Boisar, Maharashtra 401501\",\"city\":\"Palghar\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401501\",\"gst_number\":\"27AAFFI1991R1ZM\",\"pan\":\"\",\"cin\":\"\",\"mobile\":\"09175418884\",\"email\":\"admin@sbitinfo.in\",\"website\":\"https:\\/\\/inetinfo.in\\/\",\"bank_name\":\"Kotak Mahindra Bank\",\"bank_account\":\"6111613955\",\"bank_ifsc\":\"KKBK0000672\",\"upi_id\":\"\",\"terms_conditions\":\"1.Thanks for your business.\\r\\n2.This invoice is generated using I-Net Inventory\",\"invoice_footer\":\"\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 11:26:54'),
(64, 1, 'create', 'customers', 4, NULL, '{\"customer_id\":\"CUS-01004\",\"company_name\":\"Adeshwar Meditex Limited\",\"contact_person\":\"Omkar Raut\",\"designation\":\"\",\"mobile\":\"7709176484\",\"alternate_mobile\":\"\",\"email\":\"adeshwarmedi@gmail.com\",\"website\":\"https:\\/\\/adeshwarmeditex.com\\/\",\"gst_number\":\"27AAGCA2560A1Z7\",\"pan\":\"\",\"customer_type\":\"Enterprise\",\"industry\":\"Pharmaceutical\",\"address\":\"17\\/18, Dewan &amp; Sons, Udyog Nagar, Palghar west, Pin- 401404\\r\\nMaharashtra \\u2013 INDIA\",\"city\":\"Palghar\",\"state\":\"Maharashtra\",\"country\":\"India\",\"pin_code\":\"401501\",\"notes\":\"\",\"status\":\"active\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 11:46:58'),
(65, 1, 'create', 'software', 6, NULL, '{\"software_code\":\"WS-02\",\"software_name\":\"Web Hosting\",\"category\":\"Web\",\"version\":\"1.1\",\"platform\":\"Linux\",\"technology\":\"PHP,HTML,Wordpress\",\"description\":\"\",\"license_type\":\"Single\",\"annual_amc_amount\":5000,\"monthly_amc_amount\":0,\"quarterly_amc_amount\":0,\"half_yearly_amc_amount\":0,\"custom_amc_amount\":0,\"installation_charge\":0,\"support_charge\":0,\"status\":1,\"updated_at\":\"2026-09-03 17:19:28\",\"created_at\":\"2026-09-03 17:19:28\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 11:49:28'),
(66, 1, 'create', 'customer_software', 2, NULL, '{\"customer_id\":4,\"software_id\":6,\"license_number\":\"\",\"activation_date\":\"2026-06-25\",\"installation_date\":\"2023-05-12\",\"warranty_start\":\"2026-06-25\",\"warranty_end\":\"2027-06-14\",\"amc_start\":\"2026-06-15\",\"amc_end\":\"2027-06-14\",\"number_of_users\":1,\"license_type\":\"Single\",\"installation_engineer\":\"Aniket Dalvi\",\"remarks\":\"\",\"status\":\"active\",\"updated_at\":\"2026-09-03 17:23:18\",\"created_at\":\"2026-09-03 17:23:18\"}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-03 11:53:18'),
(67, 1, 'login', 'auth', 1, NULL, NULL, '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-04 05:26:24'),
(68, 1, 'create', 'role_master', 7, NULL, '{\"role_name\":\"User\",\"role_description\":\"\",\"is_system\":0}', '::1', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', '2026-09-04 12:11:17');

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

--
-- Table structure for table `ai_conversations`
--

CREATE TABLE `ai_conversations` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `message` text NOT NULL,
  `response` text NOT NULL,
  `action_type` varchar(50) DEFAULT 'chat',
  `created_at` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ai_conversations`
--

INSERT INTO `ai_conversations` (`id`, `user_id`, `message`, `response`, `action_type`, `created_at`) VALUES
(1, 1, 'hello', 'Hello! 👋 I\'m your AMC Assistant. I can help you:\n\n• Create/update/delete AMC contracts\n• Create invoices and bills\n• Manage customers and software\n• Check payment and renewal status\n• Get notifications and reminders\n\nJust tell me what you need!', 'greet', '2026-09-04 11:49:18'),
(2, 1, 'hello', 'Hello! 👋 I\'m your AMC Assistant. I can help you:\n\n• Create/update/delete AMC contracts\n• Create invoices and bills\n• Manage customers and software\n• Check payment and renewal status\n• Get notifications and reminders\n\nJust tell me what you need!', 'greet', '2026-09-04 11:50:24'),
(3, 1, 'hello', 'Hello! 👋 I\'m your AMC Assistant. I can help you:\n\n• Create/update/delete AMC contracts\n• Create invoices and bills\n• Manage customers and software\n• Check payment and renewal status\n• Get notifications and reminders\n\nJust tell me what you need!', 'greet', '2026-09-04 12:02:29'),
(4, 1, 'hello', 'Hello! 👋 I\'m your AMC Assistant. I can help you:\n\n• Create/update/delete AMC contracts\n• Create invoices and bills\n• Manage customers and software\n• Check payment and renewal status\n• Get notifications and reminders\n\nJust tell me what you need!', 'greet', '2026-09-04 12:09:11'),
(5, 1, 'Check pending payments', 'Checking for pending payments and renewals... I can look into:\n• Overdue payments\n• Upcoming AMC expiries\n• Pending invoices\n\nI\'ll pull up the latest notifications.', 'check_notifications', '2026-09-04 12:14:31'),
(6, 1, 'hello', 'Hello! 👋 I\'m your AMC Assistant. I can help you:\n\n• Create/update/delete AMC contracts\n• Create invoices and bills\n• Manage customers and software\n• Check payment and renewal status\n• Get notifications and reminders\n\nJust tell me what you need!', 'greet', '2026-09-04 12:15:46'),
(7, 1, 'Check AMC renewals', 'Checking for pending payments and renewals... I can look into:\n• Overdue payments\n• Upcoming AMC expiries\n• Pending invoices\n\nI\'ll pull up the latest notifications.', 'check_notifications', '2026-09-04 12:22:18'),
(8, 1, 'Check AMC renewals', 'Checking for pending payments and renewals... I can look into:\n• Overdue payments\n• Upcoming AMC expiries\n• Pending invoices\n\nI\'ll pull up the latest notifications.', 'check_notifications', '2026-09-04 12:22:23'),
(9, 1, 'Check AMC renewals', 'Checking for pending payments and renewals... I can look into:\n• Overdue payments\n• Upcoming AMC expiries\n• Pending invoices\n\nI\'ll pull up the latest notifications.', 'check_notifications', '2026-09-04 12:32:29'),
(10, 1, 'Check AMC renewals', 'Checking for pending payments and renewals... I can look into:\n• Overdue payments\n• Upcoming AMC expiries\n• Pending invoices\n\nI\'ll pull up the latest notifications.', 'check_notifications', '2026-09-04 12:32:40'),
(11, 1, 'List all software', 'Fetching list of list...', 'list_records', '2026-09-04 12:33:15'),
(12, 1, 'List all invoices', 'Fetching list of list...', 'list_records', '2026-09-04 12:33:53'),
(13, 1, 'List all customers', 'Fetching list of list...', 'list_records', '2026-09-04 12:34:38'),
(14, 1, 'List all invoices', 'Fetching list of list...', 'list_records', '2026-09-04 12:34:54'),
(15, 1, 'Check pending payments', 'Checking for pending payments and renewals... I can look into:\n• Overdue payments\n• Upcoming AMC expiries\n• Pending invoices\n\nI\'ll pull up the latest notifications.', 'check_notifications', '2026-09-04 15:07:40'),
(16, 1, 'hi', 'Hello! 👋 I\'m your AMC Assistant. I can help you:\n\n• Create/update/delete AMC contracts\n• Create invoices and bills\n• Manage customers and software\n• Check payment and renewal status\n• Get notifications and reminders\n\nJust tell me what you need!', 'greet', '2026-09-04 15:14:42'),
(17, 1, 'Check payment and renewal status', 'Checking for pending payments and renewals... I can look into:\n• Overdue payments\n• Upcoming AMC expiries\n• Pending invoices\n\nI\'ll pull up the latest notifications.', 'check_notifications', '2026-09-04 15:15:04'),
(18, 1, 'Upcoming AMC expiries', 'I understand. I can help you with AMC management, billing, and notifications. Try asking me to:\n• \"Create AMC for Customer X\"\n• \"Check pending payments\"\n• \"List all invoices\"\n• \"Generate invoice for Customer Y\"\n• \"Check AMC renewals\"', 'chat', '2026-09-04 15:15:24'),
(19, 1, '\"Create AMC for Customer X', 'To create an AMC for X with the software, I\'ll need:\n• Customer name\n• Software name\n• Start and end dates\n• Amount\n\nPlease provide these details and I\'ll create it for you.', 'create_amc', '2026-09-04 15:16:15');

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

--
-- Table structure for table `amc_master`
--

CREATE TABLE `amc_master` (
  `id` int(11) NOT NULL,
  `amc_number` varchar(20) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `software_id` int(11) NOT NULL,
  `amc_type` enum('comprehensive','non_comprehensive','support_only','custom') NOT NULL DEFAULT 'comprehensive',
  `amc_type_label` varchar(100) DEFAULT NULL,
  `amc_frequency` enum('monthly','quarterly','half_yearly','yearly','custom') NOT NULL DEFAULT 'yearly',
  `amc_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `gst_rate` decimal(5,2) NOT NULL DEFAULT 18.00,
  `gst_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `discount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `net_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `renewal_date` date DEFAULT NULL,
  `billing_cycle` varchar(50) DEFAULT NULL,
  `payment_terms` varchar(255) DEFAULT NULL,
  `service_visits` int(11) NOT NULL DEFAULT 0,
  `support_hours` varchar(50) DEFAULT NULL,
  `response_time` varchar(100) DEFAULT NULL,
  `priority` enum('low','medium','high','critical') NOT NULL DEFAULT 'medium',
  `auto_renewal` tinyint(1) NOT NULL DEFAULT 0,
  `agreement_pdf` varchar(255) DEFAULT NULL,
  `status` enum('active','expired','cancelled','pending') NOT NULL DEFAULT 'pending',
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `amc_master`
--

INSERT INTO `amc_master` (`id`, `amc_number`, `customer_id`, `software_id`, `amc_type`, `amc_type_label`, `amc_frequency`, `amc_amount`, `gst_rate`, `gst_amount`, `discount`, `net_amount`, `start_date`, `end_date`, `renewal_date`, `billing_cycle`, `payment_terms`, `service_visits`, `support_hours`, `response_time`, `priority`, `auto_renewal`, `agreement_pdf`, `status`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'AMC-00001', 1, 1, 'custom', 'Custom', 'quarterly', 7812.00, 18.00, 1406.16, 0.00, 9218.16, '2026-03-01', '2027-04-01', '2027-03-31', 'Quaterly', '30', 0, '10 AM- 6PM', '8hrs', 'medium', 1, NULL, 'active', 1, '2026-07-19 10:45:18', '2026-07-19 11:48:27'),
(2, 'AMC-00002', 1, 2, 'custom', 'Custom', 'quarterly', 7080.00, 18.00, 1274.40, 0.00, 8354.40, '2026-04-01', '2027-03-31', '2027-03-31', 'Quterly', '30', 0, '', NULL, 'medium', 0, NULL, 'active', 1, '2026-07-19 10:48:09', '2026-07-19 11:12:19'),
(3, 'AMC-00003', 1, 3, 'custom', '', 'quarterly', 6150.00, 18.00, 1107.00, 0.00, 7257.00, '2026-04-01', '2027-03-31', '2027-03-31', '', '', 0, '', NULL, 'medium', 0, NULL, 'active', 1, '2026-07-19 10:59:28', '2026-07-19 11:13:36'),
(4, 'AMC-00004', 1, 1, 'custom', 'Custom', 'quarterly', 7812.50, 18.00, 1406.25, 0.00, 9218.75, '2026-04-01', '2027-03-31', '2027-03-31', 'Quaterly', '30', 0, '10 AM - 6 PM', '24hrs', 'medium', 1, NULL, 'active', 1, '2026-07-19 11:07:48', '2026-07-19 11:07:48'),
(5, 'AMC-00005', 3, 4, 'support_only', '', 'yearly', 2500.00, 18.00, 450.00, 0.00, 2950.00, '2026-04-01', '2027-03-30', '2027-03-01', 'Yearly', 'Valid For 30 Days', 0, '', NULL, 'medium', 1, NULL, 'active', 1, '2026-07-30 07:27:16', '2026-07-30 07:27:16'),
(6, 'AMC-00006', 2, 5, 'support_only', '', 'quarterly', 19000.00, 18.00, 3420.00, 0.00, 22420.00, '2026-03-01', '2027-02-28', '2027-03-01', 'Quaterly', 'Net 15 Days', 0, '', NULL, 'medium', 1, NULL, 'active', 1, '2026-09-01 12:57:35', '2026-09-02 11:49:52');

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

--
-- Table structure for table `amc_renewal_history`
--

CREATE TABLE `amc_renewal_history` (
  `id` int(11) NOT NULL,
  `old_amc_id` int(11) NOT NULL,
  `new_amc_id` int(11) NOT NULL,
  `renewal_date` date NOT NULL,
  `remarks` text DEFAULT NULL,
  `renewed_by` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `amc_seq`
--

CREATE TABLE `amc_seq` (
  `id` int(11) NOT NULL,
  `prefix` varchar(10) NOT NULL DEFAULT 'AMC-',
  `current_value` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `amc_seq`
--

INSERT INTO `amc_seq` (`id`, `prefix`, `current_value`, `created_at`, `updated_at`) VALUES
(1, 'AMC-', 0, '2026-07-17 18:59:17', '2026-07-17 18:59:17');

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

--
-- Table structure for table `company_master`
--

CREATE TABLE `company_master` (
  `id` int(11) NOT NULL,
  `company_name` varchar(255) NOT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `gst_number` varchar(20) DEFAULT NULL,
  `pan` varchar(20) DEFAULT NULL,
  `cin` varchar(30) DEFAULT NULL,
  `mobile` varchar(20) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `bank_account` varchar(50) DEFAULT NULL,
  `bank_ifsc` varchar(20) DEFAULT NULL,
  `upi_id` varchar(100) DEFAULT NULL,
  `upi_qr` varchar(255) DEFAULT NULL,
  `terms_conditions` text DEFAULT NULL,
  `invoice_footer` text DEFAULT NULL,
  `signature_image` varchar(255) DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `city` varchar(100) DEFAULT NULL,
  `state` varchar(100) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `pin_code` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_master`
--

INSERT INTO `company_master` (`id`, `company_name`, `logo`, `address`, `gst_number`, `pan`, `cin`, `mobile`, `email`, `website`, `bank_name`, `bank_account`, `bank_ifsc`, `upi_id`, `upi_qr`, `terms_conditions`, `invoice_footer`, `signature_image`, `status`, `created_at`, `updated_at`, `city`, `state`, `country`, `pin_code`) VALUES
(1, 'I-Net Infotech', 'company/logoe870f2bccbdb2e69348e6861b2ff4d2d.png', 'Shiv Sagar building, 102, khodaram bagh road, behind Don Bosco school, Sainath Nagar, Boisar, Maharashtra 401501', '27AAFFI1991R1ZM', '', '', '09175418884', 'admin@sbitinfo.in', 'https://inetinfo.in/', 'Kotak Mahindra Bank', '6111613955', 'KKBK0000672', '', NULL, '1.Thanks for your business.\r\n2.This invoice is generated using I-Net Inventory', '', NULL, 1, '2026-07-18 18:50:55', '2026-09-03 11:26:54', 'Palghar', 'Maharashtra', 'India', '401501');

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

--
-- Table structure for table `customer_id_seq`
--

CREATE TABLE `customer_id_seq` (
  `id` int(11) NOT NULL,
  `prefix` varchar(10) NOT NULL DEFAULT 'CUS-',
  `current_value` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_id_seq`
--

INSERT INTO `customer_id_seq` (`id`, `prefix`, `current_value`, `created_at`, `updated_at`) VALUES
(1, 'CUS-', 0, '2026-07-17 18:59:17', '2026-07-17 18:59:17');

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

--
-- Table structure for table `customer_master`
--

CREATE TABLE `customer_master` (
  `id` int(11) NOT NULL,
  `customer_id` varchar(20) NOT NULL,
  `company_name` varchar(255) NOT NULL,
  `contact_person` varchar(150) DEFAULT NULL,
  `designation` varchar(100) DEFAULT NULL,
  `mobile` varchar(20) DEFAULT NULL,
  `alternate_mobile` varchar(20) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `gst_number` varchar(20) DEFAULT NULL,
  `pan` varchar(20) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `state` varchar(100) DEFAULT NULL,
  `country` varchar(100) DEFAULT 'India',
  `pin_code` varchar(10) DEFAULT NULL,
  `customer_type` varchar(50) DEFAULT NULL,
  `industry` varchar(100) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `agreement_copy` varchar(255) DEFAULT NULL,
  `pan_copy` varchar(255) DEFAULT NULL,
  `gst_certificate` varchar(255) DEFAULT NULL,
  `other_documents` varchar(255) DEFAULT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_master`
--

INSERT INTO `customer_master` (`id`, `customer_id`, `company_name`, `contact_person`, `designation`, `mobile`, `alternate_mobile`, `email`, `website`, `gst_number`, `pan`, `address`, `city`, `state`, `country`, `pin_code`, `customer_type`, `industry`, `notes`, `logo`, `agreement_copy`, `pan_copy`, `gst_certificate`, `other_documents`, `status`, `created_at`, `updated_at`) VALUES
(1, 'CUS-01001', 'Alchemie Gases and Chemical Pvt. Ltd.', 'Sushma Patil', 'Director', '9619490322', '', 'tarapur@alchemiegases.com', 'https://www.alchemiegases.com/', '27AABCA4554F1ZW', '', 'Plot No. T-112, M.I.D.C., Tarapur, Dist. Palghar-401 506. (Maharashtra), India.', 'Palghar', 'Maharashtra', 'India', '401501', 'Enterprise', 'Pharmaceutical', '', NULL, NULL, NULL, NULL, NULL, 'active', '2026-07-19 07:22:00', '2026-07-21 17:04:14'),
(2, 'CUS-01002', 'Autocal Solution Pvt. Ltd.', 'Kiran Dalvi', '', '09890624789', '', 'kiran.a.dalvi2010@gmail.com', '', '27AAGCA9480PIZV', '', 'Unit No.4, Ruby Industrial estate, PCS ltd, Navghar,', 'Vasai(E)', 'Maharashtra', 'India', '401 210', 'Enterprise', 'Other', '', NULL, NULL, NULL, NULL, NULL, 'active', '2026-07-20 11:34:47', '2026-07-20 11:34:47'),
(3, 'CUS-01003', 'kusmo', 'Nilesh Darade', 'Manager', '9322314166', '9311066000', 'kusmochemicals@yahoo.co.in', 'www.kusmochemicals.com', '', '', 'Unit No. 7-8, Kedia Compound, Wada Road,\r\nShelar Village, Bhiwandi, Thane-421 302, Maharashtra, India', 'Thane', 'Maharashtra', 'India', '421 302', '', 'Pharmaceutical', '', NULL, NULL, NULL, NULL, NULL, 'active', '2026-07-30 06:31:27', '2026-07-30 06:31:27'),
(4, 'CUS-01004', 'Adeshwar Meditex Limited', 'Omkar Raut', '', '7709176484', '', 'adeshwarmedi@gmail.com', 'https://adeshwarmeditex.com/', '27AAGCA2560A1Z7', '', '17/18, Dewan &amp; Sons, Udyog Nagar, Palghar west, Pin- 401404\r\nMaharashtra – INDIA', 'Palghar', 'Maharashtra', 'India', '401501', 'Enterprise', 'Pharmaceutical', '', NULL, NULL, NULL, NULL, NULL, 'active', '2026-09-03 11:46:58', '2026-09-03 11:46:58');

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

--
-- Table structure for table `customer_software`
--

CREATE TABLE `customer_software` (
  `id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `software_id` int(11) NOT NULL,
  `license_number` varchar(100) DEFAULT NULL,
  `activation_date` date DEFAULT NULL,
  `installation_date` date DEFAULT NULL,
  `warranty_start` date DEFAULT NULL,
  `warranty_end` date DEFAULT NULL,
  `amc_start` date DEFAULT NULL,
  `amc_end` date DEFAULT NULL,
  `number_of_users` int(11) DEFAULT 1,
  `license_type` varchar(50) DEFAULT NULL,
  `installation_engineer` varchar(150) DEFAULT NULL,
  `remarks` text DEFAULT NULL,
  `status` enum('active','inactive','expired') NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_software`
--

INSERT INTO `customer_software` (`id`, `customer_id`, `software_id`, `license_number`, `activation_date`, `installation_date`, `warranty_start`, `warranty_end`, `amc_start`, `amc_end`, `number_of_users`, `license_type`, `installation_engineer`, `remarks`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'INET-SW001-01', '2020-07-27', '2020-07-10', NULL, NULL, '2021-06-19', NULL, 20, 'Single', 'Aniket Dalvi', '', 'active', '2026-07-19 15:21:37', '2026-07-19 15:21:37'),
(2, 4, 6, '', '2026-06-25', '2023-05-12', '2026-06-25', '2027-06-14', '2026-06-15', '2027-06-14', 1, 'Single', 'Aniket Dalvi', '', 'active', '2026-09-03 11:53:18', '2026-09-03 11:53:18');

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

--
-- Table structure for table `document_master`
--

CREATE TABLE `document_master` (
  `id` int(11) NOT NULL,
  `document_type` enum('agreement','invoice','receipt','license','support','other') NOT NULL DEFAULT 'other',
  `entity_type` varchar(50) NOT NULL,
  `entity_id` int(11) NOT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `file_name` varchar(255) NOT NULL,
  `file_path` varchar(500) NOT NULL,
  `file_size` int(11) DEFAULT NULL,
  `mime_type` varchar(100) DEFAULT NULL,
  `uploaded_by` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `email_logs`
--

CREATE TABLE `email_logs` (
  `id` int(11) NOT NULL,
  `to_email` varchar(150) NOT NULL,
  `from_email` varchar(150) DEFAULT NULL,
  `subject` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `status` enum('sent','failed','queued') NOT NULL DEFAULT 'queued',
  `error_message` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `invoice_master`
--

CREATE TABLE `invoice_master` (
  `id` int(11) NOT NULL,
  `invoice_number` varchar(20) NOT NULL,
  `amc_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `invoice_date` date NOT NULL,
  `due_date` date DEFAULT NULL,
  `subtotal` decimal(12,2) NOT NULL DEFAULT 0.00,
  `gst_rate` decimal(5,2) NOT NULL DEFAULT 18.00,
  `gst_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `discount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `paid_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `balance_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `payment_status` enum('pending','partial','paid','overdue') NOT NULL DEFAULT 'pending',
  `hsn_code` varchar(20) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `terms` text DEFAULT NULL,
  `digital_signature` varchar(255) DEFAULT NULL,
  `qr_code` varchar(255) DEFAULT NULL,
  `status` enum('draft','sent','paid','overdue','cancelled') NOT NULL DEFAULT 'draft',
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invoice_master`
--

INSERT INTO `invoice_master` (`id`, `invoice_number`, `amc_id`, `customer_id`, `invoice_date`, `due_date`, `subtotal`, `gst_rate`, `gst_amount`, `discount`, `total_amount`, `paid_amount`, `balance_amount`, `payment_status`, `hsn_code`, `description`, `terms`, `digital_signature`, `qr_code`, `status`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'INV-00001', 1, 1, '2026-03-01', '2026-03-31', 7812.00, 18.00, 1406.16, 0.00, 9218.16, 9218.00, 0.16, 'partial', '998314', '', 'Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.', NULL, 'https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=1-AMC-00001-Alchemie+Gases+%26amp%3B+Chemical+Pvt.+Ltd.', 'draft', 1, '2026-07-19 11:34:56', '2026-07-19 11:38:59'),
(2, 'INV-00002', 3, 1, '2026-07-19', '2026-08-18', 6150.00, 18.00, 1107.00, 0.00, 7257.00, 0.00, 7257.00, 'pending', '998314', 'Service Period - 1-APR-2026 To 31-JUN-2026', 'Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.', NULL, 'https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=1-AMC-00003-Alchemie+Gases+%26amp%3B+Chemical+Pvt.+Ltd.', 'draft', 1, '2026-07-19 16:24:35', '2026-07-19 16:24:35'),
(3, 'INV-00003', 4, 1, '2026-07-19', '2026-08-18', 7812.50, 18.00, 1406.25, 0.00, 9218.75, 0.00, 9218.75, 'pending', '998314', 'AMC - AMC-00004 (Alchemie Gases &amp; Chemical Pvt. Ltd.)', 'Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.', NULL, 'https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=Alchemie+Gases+%26amp%3B+Chemical+Pvt.+Ltd.-AMC-00004', 'draft', 1, '2026-07-19 16:31:44', '2026-07-19 16:31:44'),
(4, 'INV-00004', 2, 1, '2026-07-20', '2026-08-19', 7080.00, 18.00, 1274.40, 0.00, 8354.40, 0.00, 8354.40, 'pending', '998314', '', 'Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.', NULL, 'https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=1-AMC-00002-Alchemie+Gases+%26amp%3B+Chemical+Pvt.+Ltd.', 'draft', 1, '2026-07-20 10:31:56', '2026-07-20 10:31:56'),
(5, 'INV-00005', 6, 2, '2026-09-01', '2026-09-24', 19000.00, 18.00, 3420.00, 0.00, 22420.00, 0.00, 22420.00, 'pending', '998314', 'Billing Of 01-July-2026 - 28-Sep-2026', 'Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.', NULL, 'https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=2-AMC-00006-Autocal+Solution+Pvt.+Ltd.', 'draft', 1, '2026-09-01 12:58:14', '2026-09-03 11:22:07');

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

--
-- Table structure for table `invoice_seq`
--

CREATE TABLE `invoice_seq` (
  `id` int(11) NOT NULL,
  `prefix` varchar(10) NOT NULL DEFAULT 'INV-',
  `current_value` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `invoice_seq`
--

INSERT INTO `invoice_seq` (`id`, `prefix`, `current_value`, `created_at`, `updated_at`) VALUES
(1, 'INV-', 0, '2026-07-17 18:59:17', '2026-07-17 18:59:17');

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

--
-- Table structure for table `leads`
--

CREATE TABLE `leads` (
  `id` int(11) NOT NULL,
  `first_name` varchar(100) NOT NULL,
  `last_name` varchar(100) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `company` varchar(200) DEFAULT NULL,
  `service` varchar(100) NOT NULL,
  `budget` varchar(50) DEFAULT NULL,
  `message` text DEFAULT NULL,
  `status` enum('new','contacted','qualified','converted','lost') DEFAULT 'new',
  `notes` text DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `notification_master`
--

CREATE TABLE `notification_master` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `notification_type` varchar(50) NOT NULL,
  `title` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `is_read` tinyint(1) NOT NULL DEFAULT 0,
  `link` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `payment_master`
--

CREATE TABLE `payment_master` (
  `id` int(11) NOT NULL,
  `payment_id` varchar(20) NOT NULL,
  `invoice_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `invoice_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `received_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `pending_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `payment_date` date DEFAULT NULL,
  `payment_mode` enum('cash','bank_transfer','cheque','upi','card','online') DEFAULT NULL,
  `reference_number` varchar(100) DEFAULT NULL,
  `transaction_id` varchar(100) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `cheque_number` varchar(50) DEFAULT NULL,
  `cheque_date` date DEFAULT NULL,
  `remarks` text DEFAULT NULL,
  `receipt_number` varchar(50) DEFAULT NULL,
  `status` enum('pending','completed','failed','refunded') NOT NULL DEFAULT 'completed',
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_master`
--

INSERT INTO `payment_master` (`id`, `payment_id`, `invoice_id`, `customer_id`, `invoice_amount`, `received_amount`, `pending_amount`, `payment_date`, `payment_mode`, `reference_number`, `transaction_id`, `bank_name`, `cheque_number`, `cheque_date`, `remarks`, `receipt_number`, `status`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'PAY-00001', 1, 1, 9218.16, 9218.00, 0.16, '2026-04-05', 'bank_transfer', '', '', '', '', '0000-00-00', '', 'RCT-20260719-00001', 'completed', 1, '2026-07-19 11:38:59', '2026-07-19 11:38:59');

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

--
-- Table structure for table `payment_receipts`
--

CREATE TABLE `payment_receipts` (
  `id` int(11) NOT NULL,
  `payment_id` int(11) NOT NULL,
  `receipt_number` varchar(50) NOT NULL,
  `receipt_date` date NOT NULL,
  `amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `pdf_path` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_receipts`
--

INSERT INTO `payment_receipts` (`id`, `payment_id`, `receipt_number`, `receipt_date`, `amount`, `pdf_path`, `created_at`) VALUES
(1, 1, 'RCT-20260719-00001', '2026-04-05', 9218.00, NULL, '2026-07-19 11:38:59');

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

--
-- Table structure for table `payment_seq`
--

CREATE TABLE `payment_seq` (
  `id` int(11) NOT NULL,
  `prefix` varchar(10) NOT NULL DEFAULT 'PAY-',
  `current_value` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payment_seq`
--

INSERT INTO `payment_seq` (`id`, `prefix`, `current_value`, `created_at`, `updated_at`) VALUES
(1, 'PAY-', 0, '2026-07-17 18:59:17', '2026-07-17 18:59:17');

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

--
-- Table structure for table `permission_master`
--

CREATE TABLE `permission_master` (
  `permission_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  `module` varchar(100) NOT NULL,
  `can_view` tinyint(1) NOT NULL DEFAULT 0,
  `can_create` tinyint(1) NOT NULL DEFAULT 0,
  `can_edit` tinyint(1) NOT NULL DEFAULT 0,
  `can_delete` tinyint(1) NOT NULL DEFAULT 0,
  `can_export` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permission_master`
--

INSERT INTO `permission_master` (`permission_id`, `role_id`, `module`, `can_view`, `can_create`, `can_edit`, `can_delete`, `can_export`, `created_at`) VALUES
(1, 1, 'dashboard', 1, 0, 0, 0, 0, '2026-07-17 18:59:18'),
(2, 1, 'customers', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(3, 1, 'software', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(4, 1, 'customer_software', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(5, 1, 'amc', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(6, 1, 'invoices', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(7, 1, 'payments', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(8, 1, 'receipts', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(9, 1, 'reminders', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(10, 1, 'documents', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(11, 1, 'users', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(12, 1, 'roles', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(13, 1, 'permissions', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(14, 1, 'settings', 1, 1, 1, 0, 0, '2026-07-17 18:59:18'),
(15, 1, 'reports', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(16, 1, 'activity_logs', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(17, 1, 'email_logs', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(18, 1, 'sms_logs', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(19, 1, 'whatsapp_logs', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(20, 1, 'notifications', 1, 1, 1, 1, 0, '2026-07-17 18:59:18'),
(21, 1, 'company', 1, 1, 1, 0, 0, '2026-07-17 18:59:18'),
(22, 1, 'amc_renewals', 1, 1, 1, 1, 1, '2026-07-17 18:59:18'),
(23, 1, 'reports_customer', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(24, 1, 'reports_amc', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(25, 1, 'reports_invoice', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(26, 1, 'reports_payment', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(27, 1, 'reports_revenue', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(28, 1, 'reports_expiry', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(29, 1, 'reports_due', 1, 0, 0, 0, 1, '2026-07-17 18:59:18'),
(30, 1, 'backup', 1, 1, 0, 1, 0, '2026-07-17 18:59:18');

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

--
-- Table structure for table `reminder_logs`
--

CREATE TABLE `reminder_logs` (
  `id` int(11) NOT NULL,
  `reminder_id` int(11) NOT NULL,
  `channel` enum('email','sms','whatsapp') NOT NULL,
  `status` enum('sent','failed') NOT NULL,
  `response` text DEFAULT NULL,
  `sent_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `reminder_master`
--

CREATE TABLE `reminder_master` (
  `id` int(11) NOT NULL,
  `reminder_type` enum('amc_expiry','invoice_due','payment_due') NOT NULL,
  `entity_id` int(11) NOT NULL,
  `entity_type` varchar(50) NOT NULL,
  `customer_id` int(11) NOT NULL,
  `reminder_date` date NOT NULL,
  `reminder_status` enum('pending','sent','failed') NOT NULL DEFAULT 'pending',
  `channel` enum('email','sms','whatsapp','all') NOT NULL DEFAULT 'all',
  `message` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `role_master`
--

CREATE TABLE `role_master` (
  `role_id` int(11) NOT NULL,
  `role_name` varchar(100) NOT NULL,
  `role_description` varchar(255) DEFAULT NULL,
  `is_system` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_master`
--

INSERT INTO `role_master` (`role_id`, `role_name`, `role_description`, `is_system`, `created_at`) VALUES
(1, 'Super Admin', 'Full system access with all permissions', 1, '2026-07-17 18:59:18'),
(2, 'Admin', 'Administrative access to most modules', 1, '2026-07-17 18:59:18'),
(3, 'Accounts', 'Access to invoices, payments, and financial modules', 1, '2026-07-17 18:59:18'),
(4, 'Sales', 'Access to customers, AMC, and sales-related modules', 1, '2026-07-17 18:59:18'),
(5, 'Support Engineer', 'Access to support tickets and customer software', 1, '2026-07-17 18:59:18'),
(6, 'Viewer', 'Read-only access to all modules', 1, '2026-07-17 18:59:18'),
(7, 'User', '', 0, '2026-09-04 12:11:17');

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

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `setting_group` varchar(50) DEFAULT NULL,
  `setting_type` varchar(20) NOT NULL DEFAULT 'text',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `setting_key`, `setting_value`, `setting_group`, `setting_type`, `created_at`, `updated_at`) VALUES
(1, 'gst_rate', '18', 'invoice', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(2, 'currency', 'INR', 'invoice', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(3, 'currency_symbol', '₹', 'invoice', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(4, 'invoice_prefix', 'INV-', 'invoice', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(5, 'invoice_starting_number', '1001', 'invoice', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(6, 'amc_prefix', 'AMC-', 'amc', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(7, 'amc_starting_number', '1001', 'amc', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(8, 'customer_prefix', 'CUS-', 'customer', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(9, 'customer_starting_number', '1001', 'customer', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(10, 'payment_prefix', 'PAY-', 'payment', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(11, 'payment_starting_number', '1001', 'payment', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(12, 'company_name', 'AMC Management System', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(13, 'company_email', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(14, 'company_phone', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(15, 'company_address', '', 'company', 'textarea', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(16, 'company_gst', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(17, 'company_pan', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(18, 'company_website', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(19, 'default_payment_terms', 'Net 30 Days', 'invoice', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(20, 'default_hsn_code', '998314', 'invoice', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(21, 'default_gst_rate', '18', 'invoice', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(22, 'smtp_host', '', 'email', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(23, 'smtp_port', '587', 'email', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(24, 'smtp_username', '', 'email', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(25, 'smtp_password', '', 'email', 'password', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(26, 'smtp_encryption', 'tls', 'email', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(27, 'smtp_from_email', '', 'email', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(28, 'smtp_from_name', 'AMC Management', 'email', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(29, 'sms_api_key', '', 'sms', 'password', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(30, 'sms_sender_id', '', 'sms', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(31, 'whatsapp_api_url', '', 'whatsapp', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(32, 'whatsapp_api_token', '', 'whatsapp', 'password', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(33, 'reminder_days_before', '30', 'reminder', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(34, 'auto_reminder_enabled', '1', 'reminder', 'boolean', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(35, 'date_format', 'd/m/Y', 'general', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(36, 'timezone', 'Asia/Kolkata', 'general', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(37, 'pagination_limit', '25', 'general', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(38, 'session_timeout', '120', 'security', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(39, 'max_login_attempts', '5', 'security', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(40, 'lockout_duration', '15', 'security', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(41, 'two_factor_enabled', '0', 'security', 'boolean', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(42, 'logo', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(43, 'signature_image', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(44, 'invoice_footer', 'Thank you for your business!', 'invoice', 'textarea', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(45, 'terms_conditions', 'Payment is due within 30 days of invoice date. Late payments will incur a 1.5% monthly interest charge.', 'invoice', 'textarea', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(46, 'amc_terms', 'This AMC is effective from the start date to the end date specified. Support is available during business hours (9 AM - 6 PM, Monday to Saturday).', 'amc', 'textarea', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(47, 'bank_name', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(48, 'bank_account', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(49, 'bank_ifsc', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(50, 'upi_id', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(51, 'cin', '', 'company', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(52, 'app_version', '1.0.0', 'general', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(53, 'maintenance_mode', '0', 'general', 'boolean', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(54, 'allow_registration', '0', 'general', 'boolean', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(55, 'items_per_page', '20', 'general', 'number', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(56, 'backup_enabled', '1', 'general', 'boolean', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(57, 'backup_frequency', 'daily', 'general', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18'),
(58, 'backup_path', 'backups/', 'general', 'text', '2026-07-17 18:59:18', '2026-07-17 18:59:18');

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

--
-- Table structure for table `sms_logs`
--

CREATE TABLE `sms_logs` (
  `id` int(11) NOT NULL,
  `phone_number` varchar(20) NOT NULL,
  `message` text NOT NULL,
  `status` enum('sent','failed','queued') NOT NULL DEFAULT 'queued',
  `response` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `software_master`
--

CREATE TABLE `software_master` (
  `id` int(11) NOT NULL,
  `software_code` varchar(50) NOT NULL,
  `software_name` varchar(255) NOT NULL,
  `category` varchar(100) DEFAULT NULL,
  `version` varchar(50) DEFAULT NULL,
  `platform` varchar(100) DEFAULT NULL,
  `technology` varchar(100) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `license_type` varchar(50) DEFAULT NULL,
  `annual_amc_amount` decimal(12,2) DEFAULT 0.00,
  `monthly_amc_amount` decimal(12,2) DEFAULT 0.00,
  `quarterly_amc_amount` decimal(12,2) DEFAULT 0.00,
  `half_yearly_amc_amount` decimal(12,2) DEFAULT 0.00,
  `custom_amc_amount` decimal(12,2) DEFAULT 0.00,
  `installation_charge` decimal(12,2) DEFAULT 0.00,
  `support_charge` decimal(12,2) DEFAULT 0.00,
  `status` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `software_master`
--

INSERT INTO `software_master` (`id`, `software_code`, `software_name`, `category`, `version`, `platform`, `technology`, `description`, `license_type`, `annual_amc_amount`, `monthly_amc_amount`, `quarterly_amc_amount`, `half_yearly_amc_amount`, `custom_amc_amount`, `installation_charge`, `support_charge`, `status`, `created_at`, `updated_at`) VALUES
(1, 'SW001', 'Cylinder tracking and Inventory Management System', 'Custom', '1.6', 'Linux', 'PHP,Mysql,Jquery,HTML', 'Comprehensive ERP solution for tracking industrial gas cylinders across 50+ distribution centers, also generating auto billing and reminders.', 'Single', 0.00, 0.00, 7812.00, 0.00, 0.00, 0.00, 0.00, 1, '2026-07-19 07:27:04', '2026-07-19 07:27:04'),
(2, 'SW002', 'Gas Manufacturing Process System (MPS)', 'Custom', '1.5', 'Linux', 'PHP,Mysql,HTML', 'GAS Manufacturing Details', 'Single', 0.00, 0.00, 7080.00, 0.00, 0.00, 0.00, 0.00, 1, '2026-07-19 07:29:40', '2026-07-19 07:29:40'),
(3, 'SW003', 'GAS CRM(Customer Managment System)', 'Custom', '1.3', 'Linux', 'Php,Mysql,HTML', 'CRM', 'Single', 0.00, 0.00, 6150.00, 0.00, 0.00, 0.00, 0.00, 1, '2026-07-19 10:03:59', '2026-07-19 10:03:59'),
(4, 'WS-01', 'Website', 'Web', '1.2', 'Linux', 'PHP,HTML', 'Kusmochemical website', 'Single', 2500.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1, '2026-07-30 06:57:59', '2026-07-30 06:57:59'),
(5, 'SW-004', 'Calibration Management System', 'Custom', '1.2', 'Linux', 'PHP,Mysql', 'Calibration certificate creation, instrument inventory managemnt', 'Open Source', 0.00, 0.00, 19000.00, 0.00, 0.00, 0.00, 0.00, 1, '2026-09-01 12:54:36', '2026-09-03 08:44:56'),
(6, 'WS-02', 'Web Hosting', 'Web', '1.1', 'Linux', 'PHP,HTML,Wordpress', '', 'Single', 5000.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1, '2026-09-03 11:49:28', '2026-09-03 11:49:28');

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

--
-- Table structure for table `user_master`
--

CREATE TABLE `user_master` (
  `user_id` int(11) NOT NULL,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `email` varchar(150) NOT NULL,
  `full_name` varchar(150) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `role_id` int(11) NOT NULL,
  `avatar` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `last_login` datetime DEFAULT NULL,
  `last_ip` varchar(45) DEFAULT NULL,
  `failed_attempts` int(11) NOT NULL DEFAULT 0,
  `lockout_time` datetime DEFAULT NULL,
  `two_factor_secret` varchar(255) DEFAULT NULL,
  `two_factor_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_master`
--

INSERT INTO `user_master` (`user_id`, `username`, `password`, `email`, `full_name`, `phone`, `role_id`, `avatar`, `is_active`, `last_login`, `last_ip`, `failed_attempts`, `lockout_time`, `two_factor_secret`, `two_factor_enabled`, `created_at`, `updated_at`) VALUES
(1, 'admin', '$2y$10$Eea8MkednVtw2cK7zBYsk.Nh24OSfB2wqdJdg96t/XZNptNvZwpbC', 'admin@amc.local', 'System Administrator', '9999999999', 1, NULL, 1, '2026-09-04 10:56:24', '::1', 0, NULL, NULL, 0, '2026-07-17 18:59:18', '2026-09-04 05:26:24');

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

--
-- Table structure for table `whatsapp_logs`
--

CREATE TABLE `whatsapp_logs` (
  `id` int(11) NOT NULL,
  `phone_number` varchar(20) NOT NULL,
  `message` text NOT NULL,
  `status` enum('sent','failed','queued') NOT NULL DEFAULT 'queued',
  `response` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `activity_logs`
--
ALTER TABLE `activity_logs`
  ADD PRIMARY KEY (`log_id`),
  ADD KEY `idx_alog_user_id` (`user_id`),
  ADD KEY `idx_alog_module` (`module`),
  ADD KEY `idx_alog_action` (`action`),
  ADD KEY `idx_alog_record_id` (`record_id`),
  ADD KEY `idx_alog_created_at` (`created_at`);

--
-- Indexes for table `ai_conversations`
--
ALTER TABLE `ai_conversations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_user_id` (`user_id`),
  ADD KEY `idx_action_type` (`action_type`),
  ADD KEY `idx_created_at` (`created_at`);

--
-- Indexes for table `amc_master`
--
ALTER TABLE `amc_master`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_amc_number` (`amc_number`),
  ADD KEY `idx_amc_customer_id` (`customer_id`),
  ADD KEY `idx_amc_software_id` (`software_id`),
  ADD KEY `idx_amc_status` (`status`),
  ADD KEY `idx_amc_type` (`amc_type`),
  ADD KEY `idx_amc_frequency` (`amc_frequency`),
  ADD KEY `idx_amc_start_date` (`start_date`),
  ADD KEY `idx_amc_end_date` (`end_date`),
  ADD KEY `idx_amc_renewal_date` (`renewal_date`),
  ADD KEY `idx_amc_priority` (`priority`),
  ADD KEY `idx_amc_created_by` (`created_by`);

--
-- Indexes for table `amc_renewal_history`
--
ALTER TABLE `amc_renewal_history`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_renewal_old_amc` (`old_amc_id`),
  ADD KEY `idx_renewal_new_amc` (`new_amc_id`),
  ADD KEY `idx_renewal_date` (`renewal_date`),
  ADD KEY `idx_renewal_renewed_by` (`renewed_by`);

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

--
-- Indexes for table `company_master`
--
ALTER TABLE `company_master`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_company_gst` (`gst_number`),
  ADD KEY `idx_company_pan` (`pan`),
  ADD KEY `idx_company_status` (`status`);

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

--
-- Indexes for table `customer_master`
--
ALTER TABLE `customer_master`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_customer_id` (`customer_id`),
  ADD KEY `idx_customer_company` (`company_name`),
  ADD KEY `idx_customer_contact` (`contact_person`),
  ADD KEY `idx_customer_mobile` (`mobile`),
  ADD KEY `idx_customer_email` (`email`),
  ADD KEY `idx_customer_gst` (`gst_number`),
  ADD KEY `idx_customer_pan` (`pan`),
  ADD KEY `idx_customer_status` (`status`),
  ADD KEY `idx_customer_city` (`city`),
  ADD KEY `idx_customer_state` (`state`),
  ADD KEY `idx_customer_type` (`customer_type`);

--
-- Indexes for table `customer_software`
--
ALTER TABLE `customer_software`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_cs_customer_id` (`customer_id`),
  ADD KEY `idx_cs_software_id` (`software_id`),
  ADD KEY `idx_cs_status` (`status`),
  ADD KEY `idx_cs_amc_start` (`amc_start`),
  ADD KEY `idx_cs_amc_end` (`amc_end`);

--
-- Indexes for table `document_master`
--
ALTER TABLE `document_master`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_doc_type` (`document_type`),
  ADD KEY `idx_doc_entity` (`entity_type`,`entity_id`),
  ADD KEY `idx_doc_customer_id` (`customer_id`),
  ADD KEY `idx_doc_uploaded_by` (`uploaded_by`);

--
-- Indexes for table `email_logs`
--
ALTER TABLE `email_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_elog_to` (`to_email`),
  ADD KEY `idx_elog_status` (`status`),
  ADD KEY `idx_elog_created_at` (`created_at`);

--
-- Indexes for table `invoice_master`
--
ALTER TABLE `invoice_master`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_invoice_number` (`invoice_number`),
  ADD KEY `idx_inv_amc_id` (`amc_id`),
  ADD KEY `idx_inv_customer_id` (`customer_id`),
  ADD KEY `idx_inv_invoice_date` (`invoice_date`),
  ADD KEY `idx_inv_due_date` (`due_date`),
  ADD KEY `idx_inv_status` (`status`),
  ADD KEY `idx_inv_payment_status` (`payment_status`),
  ADD KEY `idx_inv_created_by` (`created_by`);

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

--
-- Indexes for table `leads`
--
ALTER TABLE `leads`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_email` (`email`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_created` (`created_at`);

--
-- Indexes for table `notification_master`
--
ALTER TABLE `notification_master`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_notif_user_id` (`user_id`),
  ADD KEY `idx_notif_type` (`notification_type`),
  ADD KEY `idx_notif_read` (`is_read`),
  ADD KEY `idx_notif_created_at` (`created_at`);

--
-- Indexes for table `payment_master`
--
ALTER TABLE `payment_master`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_payment_id` (`payment_id`),
  ADD KEY `idx_pay_invoice_id` (`invoice_id`),
  ADD KEY `idx_pay_customer_id` (`customer_id`),
  ADD KEY `idx_pay_payment_date` (`payment_date`),
  ADD KEY `idx_pay_status` (`status`),
  ADD KEY `idx_pay_mode` (`payment_mode`),
  ADD KEY `idx_pay_created_by` (`created_by`);

--
-- Indexes for table `payment_receipts`
--
ALTER TABLE `payment_receipts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_receipt_payment_id` (`payment_id`),
  ADD KEY `idx_receipt_number` (`receipt_number`),
  ADD KEY `idx_receipt_date` (`receipt_date`);

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

--
-- Indexes for table `permission_master`
--
ALTER TABLE `permission_master`
  ADD PRIMARY KEY (`permission_id`),
  ADD KEY `idx_permission_role_id` (`role_id`),
  ADD KEY `idx_permission_module` (`module`);

--
-- Indexes for table `reminder_logs`
--
ALTER TABLE `reminder_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_rlog_reminder_id` (`reminder_id`),
  ADD KEY `idx_rlog_channel` (`channel`),
  ADD KEY `idx_rlog_status` (`status`);

--
-- Indexes for table `reminder_master`
--
ALTER TABLE `reminder_master`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_reminder_type` (`reminder_type`),
  ADD KEY `idx_reminder_entity` (`entity_type`,`entity_id`),
  ADD KEY `idx_reminder_customer_id` (`customer_id`),
  ADD KEY `idx_reminder_date` (`reminder_date`),
  ADD KEY `idx_reminder_status` (`reminder_status`);

--
-- Indexes for table `role_master`
--
ALTER TABLE `role_master`
  ADD PRIMARY KEY (`role_id`),
  ADD UNIQUE KEY `uk_role_name` (`role_name`);

--
-- Indexes for table `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_setting_key` (`setting_key`),
  ADD KEY `idx_setting_group` (`setting_group`);

--
-- Indexes for table `sms_logs`
--
ALTER TABLE `sms_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_smslog_phone` (`phone_number`),
  ADD KEY `idx_smslog_status` (`status`),
  ADD KEY `idx_smslog_created_at` (`created_at`);

--
-- Indexes for table `software_master`
--
ALTER TABLE `software_master`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_software_code` (`software_code`),
  ADD KEY `idx_software_name` (`software_name`),
  ADD KEY `idx_software_category` (`category`),
  ADD KEY `idx_software_status` (`status`);

--
-- Indexes for table `user_master`
--
ALTER TABLE `user_master`
  ADD PRIMARY KEY (`user_id`),
  ADD UNIQUE KEY `uk_user_username` (`username`),
  ADD UNIQUE KEY `uk_user_email` (`email`),
  ADD KEY `idx_user_role_id` (`role_id`),
  ADD KEY `idx_user_is_active` (`is_active`);

--
-- Indexes for table `whatsapp_logs`
--
ALTER TABLE `whatsapp_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_walog_phone` (`phone_number`),
  ADD KEY `idx_walog_status` (`status`),
  ADD KEY `idx_walog_created_at` (`created_at`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `activity_logs`
--
ALTER TABLE `activity_logs`
  MODIFY `log_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=69;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `permission_master`
--
ALTER TABLE `permission_master`
  MODIFY `permission_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `amc_master`
--
ALTER TABLE `amc_master`
  ADD CONSTRAINT `fk_amc_created_by` FOREIGN KEY (`created_by`) REFERENCES `user_master` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_amc_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer_master` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_amc_software` FOREIGN KEY (`software_id`) REFERENCES `software_master` (`id`) ON UPDATE CASCADE;

--
-- Constraints for table `amc_renewal_history`
--
ALTER TABLE `amc_renewal_history`
  ADD CONSTRAINT `fk_renewal_new_amc` FOREIGN KEY (`new_amc_id`) REFERENCES `amc_master` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_renewal_old_amc` FOREIGN KEY (`old_amc_id`) REFERENCES `amc_master` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_renewal_user` FOREIGN KEY (`renewed_by`) REFERENCES `user_master` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `customer_software`
--
ALTER TABLE `customer_software`
  ADD CONSTRAINT `fk_cs_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer_master` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_cs_software` FOREIGN KEY (`software_id`) REFERENCES `software_master` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `document_master`
--
ALTER TABLE `document_master`
  ADD CONSTRAINT `fk_doc_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer_master` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_doc_uploaded_by` FOREIGN KEY (`uploaded_by`) REFERENCES `user_master` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `invoice_master`
--
ALTER TABLE `invoice_master`
  ADD CONSTRAINT `fk_inv_amc` FOREIGN KEY (`amc_id`) REFERENCES `amc_master` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_inv_created_by` FOREIGN KEY (`created_by`) REFERENCES `user_master` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_inv_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer_master` (`id`) ON UPDATE CASCADE;

--
-- Constraints for table `payment_master`
--
ALTER TABLE `payment_master`
  ADD CONSTRAINT `fk_pay_created_by` FOREIGN KEY (`created_by`) REFERENCES `user_master` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_pay_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer_master` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_pay_invoice` FOREIGN KEY (`invoice_id`) REFERENCES `invoice_master` (`id`) ON UPDATE CASCADE;

--
-- Constraints for table `payment_receipts`
--
ALTER TABLE `payment_receipts`
  ADD CONSTRAINT `fk_receipt_payment` FOREIGN KEY (`payment_id`) REFERENCES `payment_master` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `permission_master`
--
ALTER TABLE `permission_master`
  ADD CONSTRAINT `fk_permission_role` FOREIGN KEY (`role_id`) REFERENCES `role_master` (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `reminder_logs`
--
ALTER TABLE `reminder_logs`
  ADD CONSTRAINT `fk_rlog_reminder` FOREIGN KEY (`reminder_id`) REFERENCES `reminder_master` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `reminder_master`
--
ALTER TABLE `reminder_master`
  ADD CONSTRAINT `fk_reminder_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer_master` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `user_master`
--
ALTER TABLE `user_master`
  ADD CONSTRAINT `fk_user_role` FOREIGN KEY (`role_id`) REFERENCES `role_master` (`role_id`) ON UPDATE 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 */;
