-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Jul 13, 2026 at 05:10 PM
-- Server version: 9.1.0
-- PHP Version: 8.0.30

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

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

--
-- Table structure for table `audit_logs`
--

DROP TABLE IF EXISTS `audit_logs`;
CREATE TABLE IF NOT EXISTS `audit_logs` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `activity` text,
  `ip_address` varchar(50) DEFAULT NULL,
  `activity_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `audit_logs`
--

INSERT INTO `audit_logs` (`id`, `user_id`, `activity`, `ip_address`, `activity_time`) VALUES
(1, 1, 'Logged into system', '127.0.0.1', '2026-07-13 03:49:35'),
(2, 2, 'Approved Expense Request REQ0002', '127.0.0.1', '2026-07-13 03:49:35'),
(3, 4, 'Created Expense RCT0003', '127.0.0.1', '2026-07-13 03:49:35');

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

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

DROP TABLE IF EXISTS `branches`;
CREATE TABLE IF NOT EXISTS `branches` (
  `id` int NOT NULL AUTO_INCREMENT,
  `branch_name` varchar(150) DEFAULT NULL,
  `address` text,
  `phone` varchar(50) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `status` tinyint DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `branches` (`id`, `branch_name`, `address`, `phone`, `email`, `status`) VALUES
(1, 'Main Branch', 'Lilongwe Area 49', '0999111111', 'hq@example.com', 1),
(2, 'Departmental Branch', 'Lilongwe Area 49', '0999222222', 'db@example.com', 1),
(3, 'Administration Office ', 'Lilongwe Area 49', '0999333333', 'ao@example.com', 1);

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

--
-- Table structure for table `budgets`
--

DROP TABLE IF EXISTS `budgets`;
CREATE TABLE IF NOT EXISTS `budgets` (
  `id` int NOT NULL AUTO_INCREMENT,
  `budget_year_id` int DEFAULT NULL,
  `department_id` int DEFAULT NULL,
  `category_id` int DEFAULT NULL,
  `allocated_amount` decimal(15,2) DEFAULT NULL,
  `remaining_amount` decimal(15,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `budget_year_id` (`budget_year_id`),
  KEY `department_id` (`department_id`),
  KEY `category_id` (`category_id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `budgets`
--

INSERT INTO `budgets` (`id`, `budget_year_id`, `department_id`, `category_id`, `allocated_amount`, `remaining_amount`) VALUES
(1, 1, 1, 1, 5000000.00, 5000000.00),
(2, 1, 1, 4, 1000000.00, 1000000.00),
(3, 1, 3, 3, 3000000.00, 3000000.00),
(4, 1, 2, 8, 2000000.00, 2000000.00);

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

--
-- Table structure for table `budget_years`
--

DROP TABLE IF EXISTS `budget_years`;
CREATE TABLE IF NOT EXISTS `budget_years` (
  `id` int NOT NULL AUTO_INCREMENT,
  `budget_year` year DEFAULT NULL,
  `description` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `budget_years`
--

INSERT INTO `budget_years` (`id`, `budget_year`, `description`) VALUES
(1, '2026', 'Financial Year 2026');

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

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

DROP TABLE IF EXISTS `departments`;
CREATE TABLE IF NOT EXISTS `departments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `department_name` varchar(150) DEFAULT NULL,
  `description` text,
  `status` tinyint DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `departments`
--

INSERT INTO `departments` (`id`, `department_name`, `description`, `status`) VALUES
(1, 'Finance', 'Finance Department', 1),
(2, 'Administration', 'Administration', 1),
(3, 'ICT', 'Information Technology', 1),
(4, 'Human Resources', 'HR Department', 1),
(5, 'Operations', 'Operations', 1);

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

--
-- Table structure for table `expenses`
--

DROP TABLE IF EXISTS `expenses`;
CREATE TABLE IF NOT EXISTS `expenses` (
  `id` int NOT NULL AUTO_INCREMENT,
  `expense_request_id` int DEFAULT NULL,
  `expense_date` date DEFAULT NULL,
  `category_id` int DEFAULT NULL,
  `vendor_id` int DEFAULT NULL,
  `item_id` int DEFAULT NULL,
  `project_id` int DEFAULT NULL,
  `amount` decimal(15,2) DEFAULT NULL,
  `tax` decimal(15,2) DEFAULT NULL,
  `total` decimal(15,2) DEFAULT NULL,
  `payment_method` enum('Cash','Bank','Cheque','Mobile Money','Card') DEFAULT NULL,
  `description` text,
  `receipt_no` varchar(100) DEFAULT NULL,
  `created_by` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `vendor_name_manual` varchar(150) DEFAULT NULL,
  `attachment` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `expense_request_id` (`expense_request_id`),
  KEY `category_id` (`category_id`),
  KEY `vendor_id` (`vendor_id`),
  KEY `project_id` (`project_id`),
  KEY `created_by` (`created_by`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `expenses`
--

INSERT INTO `expenses` (`id`, `expense_request_id`, `expense_date`, `category_id`, `vendor_id`, `item_id`, `project_id`, `amount`, `tax`, `total`, `payment_method`, `description`, `receipt_no`, `created_by`, `created_at`, `vendor_name_manual`, `attachment`) VALUES
(1, 1, '2026-07-01', 3, 4, NULL, 1, 500000.00, 50000.00, 550000.00, 'Bank', 'Purchase of Printer and Toner', 'RCT0001', 4, '2026-07-13 03:48:47', NULL, NULL),
(2, 2, '2026-07-03', 4, 2, NULL, 1, 100000.00, 16000.00, 116000.00, 'Mobile Money', 'Monthly Internet', 'RCT0002', 4, '2026-07-13 03:48:47', NULL, NULL),
(6, NULL, '2026-07-13', 2, 4, NULL, NULL, NULL, NULL, 890000.00, 'Mobile Money', 'Newspaper', NULL, 1, '2026-07-13 05:11:40', NULL, NULL),
(9, NULL, '2026-07-13', 5, 9, 0, NULL, NULL, NULL, 89000.00, 'Bank', 'hello', NULL, 1, '2026-07-13 12:05:27', NULL, NULL),
(7, NULL, '2026-07-13', 2, 4, 1, NULL, NULL, NULL, 55000.00, 'Mobile Money', 'Insurance', NULL, 1, '2026-07-13 06:00:59', NULL, NULL),
(8, NULL, '2026-07-13', 2, 2, 1, NULL, NULL, NULL, 45000.00, 'Cash', 'COF', NULL, 1, '2026-07-13 06:01:32', NULL, NULL),
(10, NULL, '2026-07-13', 10, 1, 2, NULL, NULL, NULL, 78000.00, 'Bank', 'Great Stuff', NULL, 1, '2026-07-13 12:17:57', NULL, NULL),
(11, NULL, '2026-07-13', 8, 1, 3, NULL, NULL, NULL, 123000.00, 'Card', 'New features', NULL, 1, '2026-07-13 12:21:07', NULL, NULL);

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

--
-- Table structure for table `expense_categories`
--

DROP TABLE IF EXISTS `expense_categories`;
CREATE TABLE IF NOT EXISTS `expense_categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_name` varchar(150) DEFAULT NULL,
  `description` text,
  `budget_limit` decimal(15,2) DEFAULT NULL,
  `status` tinyint DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `expense_categories`
--

INSERT INTO `expense_categories` (`id`, `category_name`, `description`, `budget_limit`, `status`) VALUES
(1, 'Fuel', 'Vehicle Fuel', 3000000.00, 1),
(2, 'Transport', 'Public Transport', 1000000.00, 1),
(3, 'Office Supplies', 'Office Items', 2000000.00, 1),
(4, 'Internet', 'Internet Bills', 500000.00, 1),
(5, 'Electricity', 'Electricity Bills', 800000.00, 1),
(6, 'Water', 'Water Bills', 300000.00, 1),
(7, 'Accommodation', 'Hotel Expenses', 4000000.00, 1),
(8, 'Meals', 'Food Expenses', 1500000.00, 1),
(9, 'Maintenance', 'Equipment Maintenance', 2500000.00, 1),
(10, 'Marketing', 'Advertising', 3000000.00, 1);

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

--
-- Table structure for table `expense_items`
--

DROP TABLE IF EXISTS `expense_items`;
CREATE TABLE IF NOT EXISTS `expense_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `item_name` varchar(100) NOT NULL,
  `registration_no` varchar(50) DEFAULT NULL,
  `item_type` varchar(50) DEFAULT NULL,
  `status` tinyint DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `expense_items`
--

INSERT INTO `expense_items` (`id`, `item_name`, `registration_no`, `item_type`, `status`, `created_at`) VALUES
(1, 'Bus', 'LL658', 'Vehicle', 1, '2026-07-13 05:49:55'),
(2, 'Toyota Hilux', 'BL2345', 'Vehicle', 1, '2026-07-13 05:49:55'),
(4, 'Sugar', 'None', 'Furniture', 1, '2026-07-13 17:00:32');

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

--
-- Table structure for table `expense_payments`
--

DROP TABLE IF EXISTS `expense_payments`;
CREATE TABLE IF NOT EXISTS `expense_payments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `expense_id` int DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `amount` decimal(15,2) DEFAULT NULL,
  `payment_method` varchar(100) DEFAULT NULL,
  `reference_no` varchar(100) DEFAULT NULL,
  `bank` varchar(150) DEFAULT NULL,
  `paid_by` int DEFAULT NULL,
  `notes` text,
  PRIMARY KEY (`id`),
  KEY `expense_id` (`expense_id`),
  KEY `paid_by` (`paid_by`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `expense_payments`
--

INSERT INTO `expense_payments` (`id`, `expense_id`, `payment_date`, `amount`, `payment_method`, `reference_no`, `bank`, `paid_by`, `notes`) VALUES
(1, 1, '2026-07-02', 348000.00, 'Bank Transfer', 'TXN001', 'National Bank', 2, NULL),
(2, 2, '2026-07-03', 116000.00, 'Mobile Money', 'AIRTEL12345', 'Airtel Money', 2, NULL);

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

--
-- Table structure for table `expense_requests`
--

DROP TABLE IF EXISTS `expense_requests`;
CREATE TABLE IF NOT EXISTS `expense_requests` (
  `id` int NOT NULL AUTO_INCREMENT,
  `request_no` varchar(50) DEFAULT NULL,
  `requested_by` int DEFAULT NULL,
  `department_id` int DEFAULT NULL,
  `branch_id` int DEFAULT NULL,
  `total_amount` decimal(15,2) DEFAULT NULL,
  `purpose` text,
  `request_date` date DEFAULT NULL,
  `status` enum('Pending','Approved','Rejected','Paid') DEFAULT 'Pending',
  `approved_by` int DEFAULT NULL,
  `approved_date` datetime DEFAULT NULL,
  `remarks` text,
  PRIMARY KEY (`id`),
  KEY `requested_by` (`requested_by`),
  KEY `department_id` (`department_id`),
  KEY `branch_id` (`branch_id`),
  KEY `approved_by` (`approved_by`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `expense_requests`
--

INSERT INTO `expense_requests` (`id`, `request_no`, `requested_by`, `department_id`, `branch_id`, `total_amount`, `purpose`, `request_date`, `status`, `approved_by`, `approved_date`, `remarks`) VALUES
(1, 'REQ0001', 5, 3, 1, 350000.00, 'Purchase Office Supplies', '2026-07-01', 'Approved', 3, '2026-07-13 05:48:19', NULL),
(2, 'REQ0002', 5, 3, 1, 120000.00, 'Internet Subscription', '2026-07-03', 'Paid', 2, '2026-07-13 05:48:19', NULL),
(3, 'REQ0003', 5, 2, 2, 450000.00, 'Fuel for Company Vehicles', '2026-07-04', 'Pending', NULL, NULL, NULL);

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

--
-- Table structure for table `mileage_claims`
--

DROP TABLE IF EXISTS `mileage_claims`;
CREATE TABLE IF NOT EXISTS `mileage_claims` (
  `id` int NOT NULL AUTO_INCREMENT,
  `employee_id` int DEFAULT NULL,
  `travel_date` date DEFAULT NULL,
  `from_location` varchar(150) DEFAULT NULL,
  `to_location` varchar(150) DEFAULT NULL,
  `kilometers` decimal(10,2) DEFAULT NULL,
  `rate` decimal(10,2) DEFAULT NULL,
  `total` decimal(15,2) DEFAULT NULL,
  `purpose` text,
  `status` enum('Pending','Approved','Rejected','Paid') DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_id` (`employee_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `notifications`
--

DROP TABLE IF EXISTS `notifications`;
CREATE TABLE IF NOT EXISTS `notifications` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `message` text,
  `is_read` tinyint DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `notifications`
--

INSERT INTO `notifications` (`id`, `user_id`, `title`, `message`, `is_read`, `created_at`) VALUES
(1, 3, 'Expense Approval', 'Expense Request REQ0003 requires your approval.', 0, '2026-07-13 03:49:24'),
(2, 2, 'Payment Due', 'Expense REQ0002 has been approved for payment.', 0, '2026-07-13 03:49:24');

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

--
-- Table structure for table `password_resets`
--

DROP TABLE IF EXISTS `password_resets`;
CREATE TABLE IF NOT EXISTS `password_resets` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `token` varchar(255) NOT NULL,
  `expires_at` datetime NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `password_resets`
--

INSERT INTO `password_resets` (`id`, `user_id`, `token`, `expires_at`, `created_at`) VALUES
(1, 2, 'fe6c7ea7256f4c2134e0ddcbc4ab4d843acc7d5f06b397bbf227f6fe8b8aeaa9', '2026-07-13 10:39:59', '2026-07-13 10:09:59');

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

--
-- Table structure for table `petty_cash`
--

DROP TABLE IF EXISTS `petty_cash`;
CREATE TABLE IF NOT EXISTS `petty_cash` (
  `id` int NOT NULL AUTO_INCREMENT,
  `transaction_date` date DEFAULT NULL,
  `transaction_type` enum('Deposit','Expense') DEFAULT NULL,
  `amount` decimal(15,2) DEFAULT NULL,
  `description` text,
  `expense_id` int DEFAULT NULL,
  `created_by` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `expense_id` (`expense_id`),
  KEY `created_by` (`created_by`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `petty_cash`
--

INSERT INTO `petty_cash` (`id`, `transaction_date`, `transaction_type`, `amount`, `description`, `expense_id`, `created_by`) VALUES
(1, '2026-07-01', 'Deposit', 1000000.00, 'Opening Balance', NULL, 1),
(2, '2026-07-04', 'Expense', 464000.00, 'Fuel Purchase', 3, 4);

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

--
-- Table structure for table `projects`
--

DROP TABLE IF EXISTS `projects`;
CREATE TABLE IF NOT EXISTS `projects` (
  `id` int NOT NULL AUTO_INCREMENT,
  `project_name` varchar(200) DEFAULT NULL,
  `project_code` varchar(50) DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `budget` decimal(15,2) DEFAULT NULL,
  `manager_id` int DEFAULT NULL,
  `status` enum('Planning','Running','Completed','Cancelled') DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `manager_id` (`manager_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `projects`
--

INSERT INTO `projects` (`id`, `project_name`, `project_code`, `start_date`, `end_date`, `budget`, `manager_id`, `status`) VALUES
(1, 'Digital Transformation', 'PRJ001', '2026-01-01', '2026-12-31', 50000000.00, 3, 'Running'),
(2, 'Infrastructure Upgrade', 'PRJ002', '2026-02-01', '2026-11-30', 25000000.00, 3, 'Running');

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

--
-- Table structure for table `receipts`
--

DROP TABLE IF EXISTS `receipts`;
CREATE TABLE IF NOT EXISTS `receipts` (
  `id` int NOT NULL AUTO_INCREMENT,
  `expense_id` int DEFAULT NULL,
  `file_name` varchar(255) DEFAULT NULL,
  `original_name` varchar(255) DEFAULT NULL,
  `uploaded_by` int DEFAULT NULL,
  `uploaded_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `expense_id` (`expense_id`),
  KEY `uploaded_by` (`uploaded_by`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `recurring_expenses`
--

DROP TABLE IF EXISTS `recurring_expenses`;
CREATE TABLE IF NOT EXISTS `recurring_expenses` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id` int DEFAULT NULL,
  `vendor_id` int DEFAULT NULL,
  `amount` decimal(15,2) DEFAULT NULL,
  `frequency` enum('Daily','Weekly','Monthly','Quarterly','Yearly') DEFAULT NULL,
  `next_due` date DEFAULT NULL,
  `description` text,
  `status` tinyint DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `category_id` (`category_id`),
  KEY `vendor_id` (`vendor_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `reimbursements`
--

DROP TABLE IF EXISTS `reimbursements`;
CREATE TABLE IF NOT EXISTS `reimbursements` (
  `id` int NOT NULL AUTO_INCREMENT,
  `employee_id` int DEFAULT NULL,
  `expense_id` int DEFAULT NULL,
  `amount` decimal(15,2) DEFAULT NULL,
  `reimbursement_date` date DEFAULT NULL,
  `status` enum('Pending','Paid') DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `employee_id` (`employee_id`),
  KEY `expense_id` (`expense_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

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

DROP TABLE IF EXISTS `settings`;
CREATE TABLE IF NOT EXISTS `settings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `company_name` varchar(200) DEFAULT NULL,
  `address` text,
  `phone` varchar(50) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `currency` varchar(20) DEFAULT NULL,
  `financial_year` varchar(20) DEFAULT NULL,
  `tax_rate` decimal(10,2) DEFAULT NULL,
  `system_name` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `settings` (`id`, `company_name`, `address`, `phone`, `email`, `logo`, `currency`, `financial_year`, `tax_rate`, `system_name`) VALUES
(1, 'GiantPlus', 'Lilongwe, Malawi', '+265999000000', 'giantplusmw@gmail.com', 'logo.png', 'MWK', '2026', 17.50, 'Expense Pro');

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

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `fullname` varchar(150) DEFAULT NULL,
  `username` varchar(100) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `role` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
  `status` tinyint DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `fullname`, `username`, `email`, `password`, `phone`, `role`, `status`, `created_at`) VALUES
(1, 'Admin', 'admin', 'giantplusmw@gmail.com', 'admin123', '0999000001', 'Administrator', 1, '2026-07-13 03:45:11'),
(2, 'John Banda', 'jbanda', 'kondwanichimatiro@gmail.com', 'admin1234', '0999000002', 'Finance', 1, '2026-07-13 03:45:11');

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

--
-- Table structure for table `vendors`
--

DROP TABLE IF EXISTS `vendors`;
CREATE TABLE IF NOT EXISTS `vendors` (
  `id` int NOT NULL AUTO_INCREMENT,
  `vendor_name` varchar(200) DEFAULT NULL,
  `contact_person` varchar(150) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `address` text,
  `tax_number` varchar(100) DEFAULT NULL,
  `bank_name` varchar(150) DEFAULT NULL,
  `account_number` varchar(100) DEFAULT NULL,
  `status` tinyint DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `vendors`
--

INSERT INTO `vendors` (`id`, `vendor_name`, `contact_person`, `phone`, `email`, `address`, `tax_number`, `bank_name`, `account_number`, `status`) VALUES
(1, 'Total Energies', 'James Banda', '0999888881', 'sales@total.com', 'Lilongwe', NULL, NULL, NULL, 1),
(2, 'Airtel Malawi', 'Support', '0999888882', 'support@airtel.mw', 'Lilongwe', NULL, NULL, NULL, 1),
(3, 'TNM Plc', 'Support', '0999888883', 'support@tnm.mw', 'Blantyre', NULL, NULL, NULL, 1),
(4, 'HighView Motors', 'Sales', '0999888884', 'sales@highviewmotors.mw', 'Lilongwe', NULL, NULL, NULL, 1),
(8, 'Prime Insurance', 'K Chimatiro', '0995393960', 'kondwanichimatiro@gmail.com', 'Great', '08u02', 'National Bank', '', 1),
(6, 'Unknown Vendor', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1),
(9, 'Kanengo Drillers', 'James Banda', '0995393960', 'kondwanichimatiro@gmail.com', 'Great', '27837', 'MyBucks Banking Corporation', '238767738', 1);
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 */;
