# Quick Fix Reference - Processing Fees Report

## Problem
Reports showing all zeros at: https://branchbusinessadvance.co.ke/reports/processing-fees/

## Solution
Upload 2 files and restart app.

## Files to Upload
1. `reports/simple_reports_service.py`
2. `reports/views.py`

## Upload via cPanel (5 minutes)

### Step 1: Login
- URL: https://branchbusinessadvance.co.ke:2083
- Login with cPanel credentials

### Step 2: Backup
- File Manager → `/home/branchbu/public_html/reports/`
- Right-click `simple_reports_service.py` → Copy → Rename to `.backup`
- Right-click `views.py` → Copy → Rename to `.backup`

### Step 3: Upload
- Click "Upload" button
- Select both files from your computer
- Confirm overwrite

### Step 4: Restart
- Navigate to `/home/branchbu/public_html/`
- Edit `passenger_wsgi.py` (add a space, save)
- OR create file `tmp/restart.txt`

### Step 5: Test
- Visit: https://branchbusinessadvance.co.ke/reports/processing-fees/
- Should now show data (not zeros)

## If Still Showing Zeros

### Check 1: Data Exists
```bash
python diagnose_production_reports.py
```

### Check 2: User Permissions
- Log in as admin user
- Select "All Branches"
- Select "All Time" period

### Check 3: App Restarted
- Touch `passenger_wsgi.py` again
- Wait 30 seconds
- Refresh browser

### Check 4: Files Uploaded
- Check file timestamps in cPanel
- Should be recent (today's date)
- Re-upload if old

## Rollback (if needed)
```bash
cd /home/branchbu/public_html/reports/
cp simple_reports_service.py.backup simple_reports_service.py
cp views.py.backup views.py
cd ..
touch tmp/restart.txt
```

## Support
- Detailed guide: `DEPLOY_REPORTS_FIX_TO_PRODUCTION.md`
- Diagnostic tool: `python diagnose_production_reports.py`
- Technical details: `PROCESSING_FEES_FIX_SUMMARY.md`

## What Changed
- Reports now use actual database fields
- Processing fees: Uses `loan.processing_fee` (not calculated)
- Interest income: Uses `loan.interest_amount` (not calculated)
- Default view: Shows all-time data (not just current month)

## Expected Results
- ✅ Processing fees show actual revenue
- ✅ Interest income shows actual income
- ✅ Historical data visible
- ✅ Charts display data
- ✅ Metrics accurate

---
**Quick Deploy:** Upload 2 files → Restart app → Test
