Steps to Cancel:
- Open the Credit Note
- Click Edit (Cyan Button)
- Click Cancel (Red Button)
📌 Cancellation Effects & System Actions when you cancel
✅ Reverses changes made to the linked invoice
✅ Removes entries from Client & Project Statements
✅ Restores the original invoice status (e.g., Partial, Paid)
✅ Restores stock quantity in the Catalogue (if items were deducted)
✅ Reverses related accounting entries automatically
✅ Creates an audit trail log recording:
- Who cancelled it
- When cancellation occurred
- All reversals performed
🚫 Additional System Checks Before Cancellation
If the credited quantity is no longer available in stock (e.g., already sold in another invoice), cancellation will be blocked. User will see an error indicating insufficient stock to reverse.
⚙️ Updated UI Workflow
- Cancel Credit Note Button:
- Clearly labeled in red in the Edit view
- Confirmation Dialog:
- Before final cancellation, a summary popup shows all impacts:
- Invoice status restoration
- Stock adjustment
- Accounting reversal
- Client/Project Statement update
- Before final cancellation, a summary popup shows all impacts:
- User must confirm the action.

