Task #19843
openTask #19866: Sprint Planning for 12/05/2026- 26/05/2026
Clearing - Create Air Clearing File from Existing MAWB
0%
Description
A MAWB – Master Air Waybill is the airline-level shipment document.
In air freight:
1 MAWB can contain 1 or many HAWBs
Example:
MAWB: 239-12345675
├── HAWB001 – Customer A
├── HAWB002 – Customer B
└── HAWB003 – Customer C
For Air Clearing, the user may create a clearing file from the MAWB when the clearing work is managed at master level or when the user wants to start the clearing file before selecting/confirming specific HAWBs.
User Flow¶
User clicks Create Air Clearing File
→ Clicks Use Existing MAWB
→ MAWB popup opens
→ User searches and selects MAWB
→ System loads MAWB data into Clearing screen
→ User completes missing clearing details
→ User clicks Save
→ Clearing File is created
UI Component¶
Button Label¶
Use Existing MAWB
This button should be available on the New Air Clearing File screen, together with:
Use Existing HAWB
Use Existing MAWB
Use Existing Quotation
MAWB Selection Popup¶
Popup Title¶
List of MAWB
Search Filters¶
| Field | Type | Remarks |
|---|---|---|
| MAWB Reference | Textbox | Search by MAWB number/reference |
| Airline | Searchable dropdown | Search by airline name or IATA code |
| Flight Number | Textbox | Search by flight no. |
| Cargo Type | Dropdown | Import / Export / All |
| Origin Airport | Searchable dropdown | IATA airport |
| Destination Airport | Searchable dropdown | IATA airport |
| Date Range | Date range picker | Mandatory/default same approach as Ocean |
Popup Grid Columns¶
| Column | Description |
|---|---|
| MAWB Ref | Master Air Waybill reference |
| Airline | Airline linked to MAWB |
| Flight No. | Flight number |
| Cargo Type | Import / Export |
| Origin Airport | Airport of origin |
| Destination Airport | Destination airport |
| Pieces | Total pieces |
| Gross Weight | Total gross weight |
| Chargeable Weight | Total chargeable weight |
| Status | MAWB status |
| Created Date | MAWB creation date |
| Action | Select |
Functional Requirements¶
1 – Open MAWB Popup¶
When the user clicks Use Existing MAWB, the system must open the MAWB selection popup.
2 – Search MAWB¶
The user must be able to search MAWB using the following:
- MAWB Reference
- Airline
- Flight Number
- Cargo Type
- Origin Airport
- Destination Airport
- Date Range
3 – Select MAWB¶
When the user selects a MAWB:
- Popup closes
- MAWB reference is displayed on the Clearing screen
- MAWB shipment data is auto-populated
4 – Data Mapping from MAWB to Clearing File¶
Shipment Details Mapping¶
| Air Clearing Field | Source from MAWB |
|---|---|
| MAWB Reference | MAWB Reference |
| Cargo Type | Import / Export |
| Origin Airport | MAWB Origin |
| Destination Airport | MAWB Destination |
| Airline | MAWB Airline |
| Flight Number | MAWB Flight No. |
| ETD | MAWB ETD |
| ETA | MAWB ETA |
| Total Pieces | MAWB Total Pieces |
| Gross Weight | MAWB Gross Weight |
| Chargeable Weight | MAWB Chargeable Weight |
| Nature of Goods | MAWB Nature of Goods, if available |
5 – Party Information Handling¶
Because MAWB is master-level, party information may not always represent the final importer/exporter.
Therefore:
- If MAWB has shipper/consignee, populate them.
- User must be allowed to manually update party details.
6 – Prevent Duplicate Clearing File¶
System must validate if a clearing file already exists for the selected MAWB.
Suggested warning:
A clearing file already exists for this MAWB. Do you want to continue?
7 – Save Clearing File¶
When the user clicks Save Clearing File, the system must:
- Generate a unique Air Clearing Reference.
- Save the clearing file.
- Link the clearing file to the selected MAWB.
- Set status to DRAFT.
- Create an Activity Log entry
8 – Activity Log Entry¶
On successful save, system must log:
<username> created Clearing File <CLEARING_REF> from MAWB <MAWB_REF>
11 – Incomplete MAWB Data¶
If MAWB has missing data:
- System should still allow selection.
Validation Rules¶
| Field | Rule |
|---|---|
| MAWB Reference | Mandatory after selecting MAWB |
| Cargo Type | Must be Import or Export |
| Origin Airport | Mandatory |
| Destination Airport | Mandatory |
| Airline | Mandatory if available from MAWB, otherwise user must select |
| Flight Number | Mandatory if available from MAWB, otherwise user may enter |
| Date Range in popup | Mandatory/default |
Acceptance Criteria¶
1 – Open MAWB Popup¶
Given I am on the New Air Clearing File screen,
When I click Use Existing MAWB,
Then the system should open the List of MAWB popup.
2 – Search MAWB¶
Given the MAWB popup is opened,
When I enter MAWB reference or flight details and click Search,
Then matching MAWB records should be displayed.
3 – Search Airline by Code¶
Given an airline exists with IATA code EK
When I search using EK,
Then the system should return the matching airline.
4 – Select MAWB¶
Given MAWB records are displayed,
When I select one MAWB,
Then the popup should close and MAWB data should populate the clearing screen.
5 – Save Clearing File from MAWB¶
Given mandatory fields are completed,
When I click Save Clearing File,
Then the system should create the Air Clearing File with status DRAFT and link it to the selected MAWB.
6 – Duplicate MAWB Warning¶
Given a clearing file already exists for the selected MAWB,
When I try to save another clearing file,
Then the system should display a warning message before allowing continuation.
7 – Activity Log Created¶
Given the clearing file is saved from MAWB,
When the save is successful,
Then the system should create an Activity Log entry showing the file was created from the selected MAWB.
GitLab Sync Log
[{"id": "44312", "author": "Fatimah Schaik Hossen", "hours": 5.0, "created": "2026-05-14T06:32:48.431Z", "log_date": "2026-05-12", "comment": "Imported from GitLab by @Fatimah Schaik Hossen on 2026-05-14T06:32:48.431Z: 5h-(5.0)h spend at: 2026-05-12", "status": "active", "deleted_by": "", "redmine_entry_id": 13590}, {"id": "44310", "author": "Fatimah Schaik Hossen", "hours": 5.0, "created": "2026-05-14T06:32:36.604Z", "log_date": "2026-05-14", "comment": "Imported from GitLab by @Fatimah Schaik Hossen on 2026-05-14T06:32:36.604Z: 5h-(5.0)h spend at: 2026-05-14", "status": "deleted", "deleted_by": "44311", "redmine_entry_id": 13591}]