Task #19481
Updated by Redmine Admin 6 months ago
A refund request is sent to the Finance Department when an invoice is cancelled and a full credit note is issued, so that Finance can process the refund of the amount previously paid by the customer.
This functionality allows users to send a refund request email to the Finance Department when a Credit Note has been issued for a cancelled invoice.
The MFreight system does not process the refund itself. It only notifies Finance and records the request for tracking and audit purposes.
This functionality applies to:
* Ocean Module
* Air Module
The Refund Request will follow the same rules already implemented in the Ocean module, with enhancements for tracking and status visibility.
#### 1. Preconditions
A refund request can only be created if:
1. The invoice status = Cancelled
2. A Credit Note exists for the full invoice amount
3. A payment has been recorded against the initial invoice.
4. A refund request has not already been sent
If any of these conditions are not met, the Send Refund Request button must not be available.
#### 2. Credit Note Retrieve Screen Enhancement
1. The Credit Note Retrieve Screen must include two additional columns:
| Column | Description |
|--------|-------------|
| Refund Status | Indicates whether a refund request has already been sent |
| Download / Preview Refund Request | Allows the user to view or download the PDF sent to the recipient and allows sending the request again. |
2. Add a filter by Refund Status: \[All | Requested | Not Requested\]
#### 3. Refund Request Status
The Credit Notes for which payment has already been made against the invoice must include a Refund Request Status field.
Possible values:
| Refund Status | Description |
|---------------|-------------|
| Not Requested | No refund request has been sent |
| Requested | Refund request has been sent to Finance |
**Default value:**
Not Requested
#### 4. Functional Behaviour
#### Send Refund Request
A "Send Refund Request" button should be available on the Credit Note screen only if a payment exists for the related invoice.
When the user clicks the button:
1. The system performs validation.
2. If validation succeeds, an email popup window is displayed.
The popup must contain the following:
| Field | Description | Required |
|-------|-------------|----------|
| Email To | Finance department email | Yes |
| Email CC | Optional additional recipients | No |
3. Once the user clicks "Send Email":
The system must:
1. Send the email to the recipient provided. This will be same as in current process in the ocean module.
2. Update the refund request information.
The following information must be recorded:
| Field | Description |
|-------|-------------|
| Refund Request Status | Requested |
| Refund Request Date | Date request was sent |
| Refund Requested By | System user |
| Email Sent To | Finance email |
| Email CC | CC emails |
4. Once a refund request has been sent:
* The Refund Request Status column must display "Requested"
* The Send Refund Request button must be disabled
* The following information must be available via tooltip on hover:
| Tooltip Information |
|---------------------|
| Refund Request Date |
| Refund Requested By |
| Email Sent To |
**Example tooltip:**
Refund Requested On: 26-01-2026\
Requested By: supervisor\
Email Sent To: finance@maccs.mu
#### Activity Log
All refund request actions must be recorded in the Activity Log.
The system must log the following information:
<table>
<tr>
<th>
**Activity Date & Time**
</th>
<th>
**Activity By**
</th>
<th>
**Activity**
</th>
</tr>
<tr>
<td>26-01-2026 13:38</td>
<td>supervisor</td>
<td>
Refund Request sent to \<Email Recicipient\> for \<Credit Note Refrence\>
e.g, Refund Request sent to Jack@gmail.com for MACCS26CRN01057.
</td>
</tr>
</table>
Note that the activity log will not be on this screen; instead, all logs will be updated on the invoice screen to their corresponding invoice.
\
**Acceptance Criteria**
* A refund request can only be sent once per Credit Note
* The system validates Credit Note status before sending request
* Refund request only available if payment exists
* The system records request date,user and email recipients
* Refund Request Status visible in the Credit Note screen
* Send Refund Request button disabled after request is sent
* Email popup displayed for inputting recipient details before sending request
* Activity log created for refund request event
#### Example Scenario
1. Invoice **MACCS26INV02326** is cancelled.
2. Credit Note **MACCS26CRN02063** is issued.
3. Payment already exists for the invoice.
4. User clicks **Send Refund Request**.
5. Email popup appears.
6. User enters email and sends request.
System outcome:
* Email sent to recipient
* Refund Request Status = **Requested**
* Request date stored in system
* Activity log updated