requireLogin(); $page_title = 'Finance Management'; $error_message = ''; // Test database connection and table existence try { // Test if tables exist $tables_check = []; $stmt = $pdo->query("SHOW TABLES LIKE 'investments'"); $tables_check['investments'] = $stmt->rowCount() > 0; $stmt = $pdo->query("SHOW TABLES LIKE 'withdrawals'"); $tables_check['withdrawals'] = $stmt->rowCount() > 0; $stmt = $pdo->query("SHOW TABLES LIKE 'emi_schedule'"); $tables_check['emi_schedule'] = $stmt->rowCount() > 0; $stmt = $pdo->query("SHOW TABLES LIKE 'loan_payments'"); $tables_check['loan_payments'] = $stmt->rowCount() > 0; } catch (Exception $e) { $error_message = 'Database connection error: ' . $e->getMessage(); $tables_check = []; } include 'includes/header.php'; ?>
| Database Table | Status | Action Required |
|---|---|---|
| ✅ EXISTS ❌ MISSING | Create table using SQL script Ready to use |
The finance system requires additional database tables to function properly. Please follow these steps to set up the database:
Log into phpMyAdmin or your database management tool
Execute the following SQL commands:
After running the SQL script, refresh this page to continue with the finance setup.
All required database tables are present. The finance system is ready to use!
Create the required database tables using the SQL script above.
Record your business investments and capital contributions.
Manage EMI loans and interest-based loans with payment tracking.
Generate comprehensive financial statements and profit/loss reports.
| PHP Version | |
| Database Connection | |
| Current User | getUserName()); ?> (getUserRole()); ?>) |
| Server Time |