# Quick Reference - Invoice Header Background Color

## Summary
Added ability to customize invoice table header background color through font settings.

## Files Created/Modified

### ✅ Created Files:
1. `add-header-bgcolor.sql` - SQL script to add database column
2. `HEADER_BGCOLOR_IMPLEMENTATION.md` - Full implementation documentation
3. `QUICK_REFERENCE.md` - This file

### ✅ Modified Files:
1. `invoice-font-settings.php` - Added color picker for header background
2. `index.php` - Updated save/update logic
3. `Sales/templates/sale-invoice-template1.php` - Applied dynamic background color

## Database Changes
```sql
ALTER TABLE `tblfont_settings` 
ADD COLUMN `TableHeaderBgColor` VARCHAR(20) NOT NULL DEFAULT '#f0f0f0' 
AFTER `TableHeaderWeight`;
```

## How to Use

### For End Users:
1. Go to **Store Settings**
2. Select **Invoice Font Settings** tab
3. Scroll to **Product Table** section
4. Click **Header Background Color** field
5. Choose your color
6. Click **Save Font Settings**

### Default Color:
- **#f0f0f0** (Light Gray)

### Recommended Colors:
| Color Name | Hex Code | Description |
|------------|----------|-------------|
| Light Gray | #f0f0f0 | Default, neutral |
| Light Blue | #e3f2fd | Professional look |
| Light Green | #f1f8e9 | Fresh, eco-friendly |
| Light Orange | #fff3e0 | Warm, inviting |
| Light Pink | #fce4ec | Soft, elegant |
| White | #ffffff | Clean, minimal |

## Testing Checklist
- [x] Database column added
- [x] Form field displays correctly
- [x] Color picker functional
- [x] Settings save successfully
- [x] Invoice template uses new color
- [ ] Test with actual invoice generation
- [ ] Test with different colors
- [ ] Verify print output

## Quick Commands

### Check if column exists:
```powershell
& "C:\wamp64\bin\mysql\mysql8.0.21\bin\mysql.exe" -u root uzrs-inventorydb -e "DESCRIBE tblfont_settings;"
```

### View current settings:
```powershell
& "C:\wamp64\bin\mysql\mysql8.0.21\bin\mysql.exe" -u root uzrs-inventorydb -e "SELECT TableHeaderBgColor FROM tblfont_settings;"
```

### Reset to default:
```sql
UPDATE tblfont_settings SET TableHeaderBgColor = '#f0f0f0' WHERE StoreCode = 'ST0002';
```

## Support
- Database: `uzrs-inventorydb`
- Table: `tblfont_settings`
- Column: `TableHeaderBgColor`
- Type: `VARCHAR(20)`
- Default: `#f0f0f0`

---
**Date:** November 5, 2025
