Task #19886
openClearing - Cost Management Section
0%
Description
In freight forwarding and clearing, costs are the expenses paid by the freight forwarder to suppliers or service providers.
Examples:
- Customs handling charges
- Airline handling charges
- Transport charges
- Documentation charges
- Scanning or examination charges
- Delivery charges
- Agency charges
These are not customer invoices.
They represent what the company pays or owes to suppliers.
The Air Clearing Cost section should follow the same structure and reuse the same Add/Edit Charges popup currently used in Ocean Clearing, with the data saved against the Air Clearing File instead of Ocean Clearing.
Note that the Air Clearing Cost popup must use the charges configured in Charge Maintenance.The Charge dropdown must not show all charges. It must show only charges that match the Air Clearing context.
Screen Section¶
Section Name: Costs
The Costs section should appear after the List of BOE section in the Air Clearing Add/Update screen.
Screen Layout¶
The Costs section should include:
- Add Cost button +
- Cost grid
- Row selection checkbox
- Delete Selected button
- Update Supplier button, the same behaviour as exists in Ocean Clearing
- Action buttons, where applicable
- Empty grid message when no cost exists
If no cost exists, display "No record(s) found." or use the same message currently used in Ocean Clearing.
Cost Grid Columns¶
The Cost grid should follow the existing Ocean Clearing grid structure.
| Column | Description |
|---|---|
| Checkbox | Allows user to select one or more cost lines |
| Charges | Charge code and description |
| Type | PREPAID / COLLECT or other configured values |
| Currency | Currency of the charge |
| Amount | Amount without VAT |
| VAT | VAT type/rate |
| VAT Amount | Calculated VAT amount |
| Total | Amount + VAT Amount |
| Exchange Rate | Exchange rate used |
| Additional Information | Extra charge note |
| Supplier | Supplier linked to the cost |
| Supplier Invoice Ref. | Supplier invoice reference |
| Supplier Invoice Date | Supplier invoice date |
| Manifested Freight / Ex-Works | Indicator from selected charge |
| Lock | Indicates whether charge is locked |
| Action | Edit/Delete where applicable |
Add / Edit Cost Popup¶
Popup Title¶
For adding a new cost: "Add Charges"
For updating an existing cost: "Edit Charges" or use the same popup title currently used in Ocean Clearing.
Popup Buttons¶
| Button | Behaviour |
|---|---|
| Cancel | Closes popup without saving |
| Add | Saves new cost charge |
| Update | Updates existing cost charge |
Popup Fields¶
The Air Clearing Add/Edit Charges popup must include the same fields as the Ocean Clearing charge popup.
| Field | Type | Mandatory | Remarks |
|---|---|---|---|
| Charge | Dropdown/searchable dropdown | Yes | Filtered from Charge Maintenance |
| Type | Dropdown | Yes | Same values as Ocean |
| Currency | Dropdown | Yes | Currency master |
| Amount | Numeric | Yes | Amount without VAT |
| VAT | Dropdown | Yes | VAT type/rate |
| VAT Amount | Numeric/calculated | No | Auto-calculated based on VAT |
| Exchange Rate | Numeric | Yes | Default 1 for MUR |
| Total | Numeric/calculated | No | Amount + VAT Amount |
| Additional Information | Textbox | No | Extra charge description/note |
| Unit of Measure | Dropdown | No | UOM list as per Air |
| Supplier | Searchable dropdown | No/Conditional | From supplier master |
| Supplier Invoice Ref | Textbox | No | Supplier invoice reference |
| Supplier Invoice Date | Date picker | No | Supplier invoice date |
| Display Add. Info in PDF | Checkbox | No | Controls whether additional info appears in PDF |
| Manifested Freight / Ex-Works | Checkbox/indicator | No | Same behaviour as Ocean |
| Lock | Checkbox | No | Same behaviour as Ocean |
| Exported | Checkbox | No | Same behaviour as Ocean |
| Profit Margin | Checkbox | No | Same behaviour as Ocean |
Functional Requirements¶
1 – Display Costs Section¶
The system must display the Costs section in the Air Clearing Add/Update screen.
2 – Add Cost¶
When the user clicks the Add + button:
- The Add Charges popup should open.
- The Charge dropdown should show only valid Air charges based on:
- Shipment Channel = AIR
- Cargo Type = Import or Export
- Active = Yes
- Clearing = Yes
- User enters or confirms details.
- User clicks Add.
- System saves the cost line against the Air Clearing File.
- Grid refreshes.
3 – Update Cost¶
When the user edits an existing cost line:
- The Edit Charges popup should open.
- Existing cost details should be populated.
- User modifies allowed fields.
- User clicks Update.
- System validates and saves the update.
- Grid refreshes.
4 – Type Dropdown¶
The Type dropdown must use the same configured values as Ocean Clearing.
Examples may include:
PREPAID
COLLECT
5 – Currency and Exchange Rate¶
The Currency field must use the currency master.
If Currency = MUR:
Exchange Rate = 1
If Currency is foreign currency:
- Exchange Rate is mandatory.
- Exchange Rate must be greater than zero.
- Exchange rate may default from exchange rate maintenance.
- User may modify it if needed.
6 – VAT Calculation¶
The VAT dropdown must use the same VAT configuration as Ocean Clearing.
Calculation:
VAT Amount = Amount × VAT RateTotal = Amount + VAT Amount
If VAT type is zero-rated or exempt:
VAT Amount = 0
7 – Total Calculation¶
The Total must be calculated as:
Total = Amount + VAT Amount
8 – Unit of Measure¶
The Unit of Measure dropdown must use the UOM list as for air module.
9 – Supplier¶
Supplier should be selected from supplier master.
10 – Supplier Invoice Details¶
The user may capture:
- Supplier Invoice Ref
- Supplier Invoice Date
Supplier Invoice Date must be a valid date.
11 – Display Additional Information in PDF¶
If the user ticks: "Display Add. Info in PDF" then the Additional Information entered on the charge should be available for display in relevant PDF outputs/reports, using the same rule as Ocean Clearing.
12 – Manifested Freight / Ex-Works¶
The Manifested Freight / Ex-Works field must follow the same behaviour as Ocean Clearing.
This value is controlled by Charge Maintenance, the system should auto-populate it when the charge is selected.
13 – Lock¶
If the user ticks Lock:
- Lock behaviour should be the same as Ocean Clearing.
14– Exported¶
The Exported checkbox must follow the same meaning and behaviour as Ocean Clearing.
Recommended interpretation:
- Indicates whether the charge has already been exported to another process/report/accounting interface.
The actual rule must reuse Ocean Clearing logic.
15 – Profit Margin¶
The Profit Margin checkbox must follow the same behaviour as Ocean Clearing.
Recommended interpretation:
- Indicates whether the charge should be considered in profit margin/profitability calculations.
The exact rule must reuse existing Ocean Clearing logic.
16 – Delete Selected Cost Lines¶
When the user selects one or more cost rows and clicks Delete Selected:
- System should ask for confirmation.
- If confirmed, selected rows should be deleted or soft-deleted based on existing Ocean behaviour.
- Locked rows must not be deleted.
17 – Update Supplier¶
If the existing Ocean Clearing module supports Update Supplier, Air Clearing must support the same behaviour.
Expected behaviour:
- User selects one or more cost rows.
- User clicks Update Supplier.
- System opens supplier selection popup.
- User selects supplier.
- System applies supplier, supplier Invoice Ref and Supplier Invoice Date to selected cost rows.
- Activity Log is updated.
18 – Air Clearing Status¶
| Air Clearing Status | Cost Behaviour |
|---|---|
| Draft | Add/Edit/Delete allowed |
| Awaiting Approval | Based on permission |
| Confirmed | Based on permission |
| Closed | Read-only |
| Cancelled | Read-only |
19 – Activity Log¶
The system must record cost actions in the Activity Log section at the bottom of the Air Clearing page.
Add Cost¶
<username> added cost charge <CHARGE_NAME> for Air Clearing File <CLEARING_REF>
Update Cost¶
<username> updated cost charge <CHARGE_NAME> for Air Clearing File <CLEARING_REF>
Delete Cost¶
<username> deleted cost charge <CHARGE_NAME> for Air Clearing File <CLEARING_REF>
Update Supplier¶
<username> updated supplier for selected cost line(s) in Air Clearing File for Air Clearing File <CLEARING_REF>
Validation Rules¶
| Field | Validation |
|---|---|
| Charge | Mandatory |
| Charge | Must be from filtered Charge Maintenance list |
| Shipment Channel | Must be AIR for Air Clearing |
| Cargo Type | Must match current Air Clearing Cargo Type |
| Active | Charge must be active for new entries |
| Clearing | Charge must be clearing-applicable |
| Type | Mandatory |
| Currency | Mandatory |
| Amount | Mandatory, numeric, greater than or equal to zero |
| VAT | Mandatory |
| VAT Amount | Numeric, cannot be negative |
| Exchange Rate | Mandatory and greater than zero |
| Total | Numeric, cannot be negative |
| Supplier Invoice Date | Must be a valid date |
| Unit of Measure | Must come from configured UOM list if selected |
| Locked Charge | Cannot be edited/deleted unless user has permission |
| Closed File | Costs cannot be updated |
| Cancelled File | Costs cannot be updated |
Acceptance Criteria¶
1 – Display Costs Section¶
Given I open an Air Clearing File,
When the page loads,
Then the system should display the Costs section.
2 – Empty Cost Grid¶
Given no cost exists for the Air Clearing File,
When the Costs section loads,
Then the system should display: "No record(s) found."
3 – Open Add Charges Popup¶
Given I click the Add + button in the Costs section,
When the action is triggered,
Then the system should open the Add Charges popup.
4 – Display All Cost Popup Fields¶
Given the Add/Edit Charges popup is opened,
Then the system should display:
- Charge
- Type
- Currency
- Amount
- VAT
- VAT Amount
- Exchange Rate
- Total
- Additional Information
- Unit of Measure
- Supplier
- Supplier Invoice Ref
- Supplier Invoice Date
- Display Add. Info in PDF
- Manifested Freight / Ex-Works
- Lock
- Exported
- Profit Margin
5 – Filter Charges by Air Shipment Channel¶
Given I am adding a cost in Air Clearing,
When I open the Charge dropdown,
Then the system should display only charges configured with: Shipment Channel = AIR
6 – Filter Charges by Import Cargo Type¶
Given the Air Clearing File Cargo Type is Import,
When I open the Charge dropdown,
Then the system should display only active Air Import clearing charges.
7 – Filter Charges by Export Cargo Type¶
Given the Air Clearing File Cargo Type is Export,
When I open the Charge dropdown,
Then the system should display only active Air Export clearing charges.
8 – Exclude Sea Charges¶
Given a charge is configured with: Shipment Channel = SEA
When I open the Charge dropdown in Air Clearing,
Then the Sea charge should not be available for selection.
9 – Exclude Inactive Charges¶
Given a charge is inactive in Charge Maintenance,
When I add a new Air Clearing cost,
Then the inactive charge should not be displayed in the Charge dropdown.
10 – Exclude Non-clearing Charges¶
Given a charge is not marked as Clearing applicable,
When I add a new Air Clearing cost,
Then the charge should not be displayed in the Charge dropdown.
11 – Auto-populate Charge Defaults¶
Given I select a charge from the dropdown,
When the charge is selected,
Then the system should auto-populate available defaults such as:
- Currency
- VAT
- Amount Without VAT
- Freight Type
- Manifested Freight / Ex-Works
- Disbursement flag
- Default flag, if used
12 – Save Cost Successfully¶
Given all mandatory fields are completed,
When I click Add or Update,
Then the system should save the cost charge and refresh the Costs grid.
13 – Calculate VAT and Total¶
Given I enter Amount and select VAT,
When the values are changed,
Then VAT Amount and Total should be calculated according to existing Ocean Clearing logic.
14 – Display Additional Information in PDF¶
Given Additional Information is entered and Display Add. Info in PDF is ticked,
When relevant PDFs/reports are generated,
Then the additional information should be available for display using the same rule as Ocean Clearing.
15 – Prevent Locked Charge Update¶
Given a charge line is locked,
When I try to update it without permission,
Then the system should prevent the action.
16 – Prevent Locked Charge Delete¶
Given a charge line is locked,
When I try to delete it without permission,
Then the system should prevent the action.
17 – Delete Selected Cost Lines¶
Given I select one or more editable cost lines,
When I click Delete Selected and confirm,
Then the system should remove or soft-delete the selected cost lines based on existing Ocean behaviour.
18 – Update Supplier¶
Given one or more cost lines are selected,
When I click Update Supplier and choose a supplier,
Then the system should update supplier details for selected lines.
19 – Read-only When Cancelled¶
Given the Air Clearing File status is Cancelled,
When I open the Costs section,
Then cost lines should be read-only.
20 – Activity Log¶
Given a cost charge is added, updated, deleted, or supplier is updated,
When the action is completed,
Then the system should record the action in the Activity Log section.
GitLab Sync Log
[]