# Fix Production Settings - phpMyAdmin Instructions

## 🔍 **The Issue**

You're looking at the wrong table! The `loan_products` table contains hardcoded model values, but the system uses the `utils_systemsetting` table for actual settings.

## 📊 **What You're Seeing vs What You Need**

### ❌ **Wrong Table: `loan_products`**
- This contains hardcoded model values
- These are just fallback values
- **Don't change these values**

### ✅ **Correct Table: `utils_systemsetting`**
- This contains the actual settings used by the system
- This is what the settings page updates
- **This is what you need to update**

## 🔧 **How to Fix in phpMyAdmin**

### Step 1: Find the Correct Table
1. In phpMyAdmin, look for the table: **`utils_systemsetting`**
2. If you don't see it, check if it's named differently like:
   - `utils_system_setting`
   - `system_settings`
   - `settings`

### Step 2: Update the Settings
Once you find the `utils_systemsetting` table, look for these rows:

```sql
-- Update Boost Plus processing fee to 2%
UPDATE utils_systemsetting 
SET value = '2.0' 
WHERE key = 'boost_plus_processing_fee';

-- Verify the settings
SELECT key, value FROM utils_systemsetting 
WHERE key LIKE '%boost%' OR key LIKE '%processing%';
```

### Step 3: Expected Results
You should see something like:
```
key                           | value
------------------------------|-------
boost_interest_rate          | 20.0
boost_processing_fee         | 2.0
boost_plus_interest_rate     | 20.0
boost_plus_processing_fee    | 2.0
mwamba_interest_rate         | 20.0
mwamba_processing_fee        | 2.0
imara_interest_rate          | 10.0
imara_processing_fee         | 2.0
```

## 🚨 **If You Can't Find the Settings Table**

### Option 1: Check Table Names
Look for tables with these names:
- `utils_systemsetting`
- `utils_system_setting`
- `system_settings`
- `settings`
- `loan_settings`

### Option 2: Search All Tables
1. In phpMyAdmin, go to "Search" tab
2. Search for "boost_plus_processing_fee" across all tables
3. This will show you which table contains the settings

### Option 3: Check Django Admin
1. Go to your Django admin: `https://yourdomain.com/admin/`
2. Look for "System Settings" or "Settings"
3. Update the values there instead

## 🔍 **Alternative: Check via Django Admin**

If you can't find the settings table, use Django admin:

1. **Go to Django Admin**: `https://yourdomain.com/admin/`
2. **Look for**: "System Settings" or "Settings" section
3. **Find and edit**: `boost_plus_processing_fee`
4. **Change value from**: `5.0` to `2.0`
5. **Save**

## ✅ **Verification**

After updating, check a Boost Plus loan detail page:
- Interest Rate should show: **20.0%**
- Processing Fee should show: **2.0%**

## 🎯 **Why This Happens**

The system has two sets of values:
1. **Model values** (in `loan_products` table) - hardcoded fallbacks
2. **System settings** (in `utils_systemsetting` table) - actual values used

The `get_interest_rate()` and `get_processing_fee()` methods check the system settings first, then fall back to model values if no setting exists.

## 📞 **Still Can't Find It?**

If you still can't find the settings table, try:

1. **Check your Django settings.py** for the database table names
2. **Look for any table with "setting" in the name**
3. **Use Django shell** (if available in cPanel Terminal):
   ```python
   from utils.models import SystemSetting
   print(SystemSetting.objects.all())
   ```

The key is finding the `utils_systemsetting` table, not the `loan_products` table!
