# Add Journal Entry Columns - REQUIRED

You MUST run this SQL command before the journal entry feature will work correctly.

## Option 1: Using MySQL Command Line

Open your terminal and run:
```bash
mysql -u john -p ledgerpro
```

Enter your password, then run:
```sql
ALTER TABLE journal_entries 
ADD COLUMN debit_amount DECIMAL(15, 2) DEFAULT 0.00 AFTER amount,
ADD COLUMN credit_amount DECIMAL(15, 2) DEFAULT 0.00 AFTER debit_amount;
```

Then type `exit` to close MySQL.

## Option 2: Using phpMyAdmin or MySQL Workbench

1. Connect to your database
2. Select the `ledgerpro` database
3. Open SQL tab
4. Paste this query:

```sql
ALTER TABLE journal_entries 
ADD COLUMN debit_amount DECIMAL(15, 2) DEFAULT 0.00 AFTER amount,
ADD COLUMN credit_amount DECIMAL(15, 2) DEFAULT 0.00 AFTER debit_amount;
```

5. Execute

## After Running SQL

Once you've added the columns, the journal entry feature will work correctly with:
- Separate debit and credit amounts stored
- Proper calculation where debit > credit = negative amount
- Accurate totals display
