What It Does
Automatically generates credit notes when invoices are refunded. Creates proper PDF documents with negative amounts for EU/Belgian accounting compliance.
Features
- Automatic credit note generation on invoice refund
- Professional PDFs matching WHMCS invoice style
- Diagonal "CREDIT NOTE" watermark
- Negative amounts (EU compliance)
- Net/VAT/Total breakdown with VAT rate
- Client self-service portal
- CSV and Excel export
- Optional Nextcloud integration
- 7 languages included
Requirements
- WHMCS 8.9+
- PHP 7.4+
- MySQL 5.7+
Installation
- Upload files to
/modules/addons/credit_notes/ - Go to Setup → Addon Modules
- Activate "Credit Notes"
- Enter your license key
- Configure settings (or leave defaults)
Done. Refunds now generate credit notes automatically.
How It Works
- Invoice gets refunded in WHMCS
- Module creates credit note automatically
- PDF is generated and stored
- Client can view/download in their billing area
- Optional: PDF uploads to Nextcloud automatically
Admin Features
- View all credit notes with statistics
- VAT breakdown columns: Net (excl. VAT), VAT %, VAT amount, Total (incl. VAT)
- Export to CSV or Excel
- Manual credit note generation for any refunded invoice
- Resend credit note emails
- View and download PDFs
- Bulk export all PDFs to ZIP
- Upload to Nextcloud (individual or bulk)
Client Features
- "My Credit Notes" link in Billing sidebar
- View credit notes online
- Download PDFs
- See credit amount and linked invoice
PDF Output
Generated PDFs include:
- WHMCS invoice design (matches your existing invoices)
- Diagonal "CREDIT NOTE" watermark (blue)
- Company logo and address
- VAT/Tax ID
- Client billing info
- Net/VAT/Total breakdown with VAT rate
- Negative amounts
- Generation timestamp
Configuration
Auto Generate: Enable/disable automatic generation (default: on)
Auto Email: Send PDF to client automatically (default: off)
Credit Note Prefix: Customize numbering (default: CN)
Create To-Do on Error: Admin notification if generation fails (default: on)
Description Template: Customize credit description text
Email Subject/Body: Customize notification emails
Allowed Invoice Statuses: Comma-separated list of invoice statuses eligible for credit note generation (default: Refunded). Useful if WHMCS sets invoices to "Collections" instead of "Refunded" after a refund transaction.
Language Support
Included translations:
- English
- Dutch
- French
- German
- Italian
- Russian
- Spanish
Add more by creating lang/[language].php following the existing format.
Nextcloud Integration
Optional feature — requires Nextcloud Invoice Feeder module.
How It Works
Credit notes upload automatically to your Nextcloud:
Invoices/
└── 2025/
└── Q1/
├── Invoices/ ← Your invoices
└── CreditNotes/ ← Credit notes go here
└── 20250120_CN001.pdf
Features
- Automatic upload on generation
- Duplicate detection (won't overwrite unless forced)
- Retroactive upload for existing credit notes
- Bulk upload capability
- Same folder structure as invoices
File Naming
Format: YYYYMMDD_CN###.pdf (example: 20250120_CN001.pdf)
Troubleshooting
Credit notes not generating:
- Check module is activated
- Verify "Enable Auto Generate" is on
- Check invoice status matches "Allowed Invoice Statuses" setting
- Review WHMCS activity log
Client can't see credit notes:
- Verify they have refunded invoices
- Check module is active
- Clear template cache
PDF not generating:
- Check WHMCS can write to temp directory
- Verify TCPDF library exists (included in WHMCS)
- Check error logs
Nextcloud upload failing:
- Check Nextcloud Invoice Feeder module is active
- Verify WebDAV credentials in Nextcloud Invoice Feeder settings
- Test Nextcloud Invoice Feeder with invoices first
- Check activity log for specific errors
- Try manual upload to see specific error
Security
- Client access validated (users only see their own credit notes)
- All files check WHMCS constant
- SQL injection protected (Capsule ORM)
- PDF generation uses WHMCS TCPDF library
Database
Creates one table: mod_credit_notes_mapping
Stores invoice/credit linkage, credit note numbers, client info, amounts, status tracking, and email sent status.
Changelog
v1.2
- Added VAT/tax breakdown columns: Net (excl. VAT), VAT %, VAT amount, Total (incl. VAT)
- Added Excel export option alongside CSV export
- Updated PDF credit notes to show Net/VAT/Total breakdown
v1.1
- Added configurable "Allowed Invoice Statuses" option
v1.0
- Initial release
License
Licensed per WHMCS installation.
Purchase: Credit Notes for WHMCS
Invalid license? Module shows warning and disables credit note generation until valid key is entered.