Project

General

Profile

Actions

Task #19889

open

Clearing - Sales Management Section

Added by Redmine Admin 4 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
05/13/2026
Due date:
05/13/2026 (about 4 months late)
% Done:

0%

Estimated time:
0:00 h
GitLab ID:
4418
GitLab Milestone:
GitLab Ticket Number:
1529
GitLab Time Logged:
0
Lock Timeline Date:
No
gitlab project trace:

Description

In the clearing process, Sales are the charges that the freight forwarder will bill to the customer.

Examples:

  • Clearing fee
  • Brokerage fee
  • Documentation fee
  • Disbursement service fee
  • Delivery fee
  • Customs handling fee
  • Scanning/exam fee charged back to customer
  • Agency charges billed to customer

The Costs section records what the company pays to suppliers.
The Sales section records what the company charges to the customer.

The Sales section should follow the same structure and behaviour as the existing Ocean Clearing Sales section, but it must save records against the Air Clearing File.

Screen Section

Section Name : Sales

The Sales section should appear after the Costs section in the Air Clearing Add/Update screen.

Screen Layout

The Sales section should include:

  • Add Sales Charge button +
  • Sales grid
  • Row selection checkbox
  • Delete Selected button on top right of the grid
  • Action buttons, where applicable
  • Empty grid message when no sales charge exists

If no sales charge exists, display "No record(s) found" or use the same message currently used in Ocean Clearing

Sales Grid Columns

The Sales grid should follow the existing Ocean Clearing grid structure.

Column Description
Checkbox Allows user to select one or more sales lines
Charges Charge code and description
Type PREPAID / COLLECT or other configured values
Currency Currency used
Amount Amount without VAT
VAT VAT type/rate
VAT Amount Calculated VAT amount
Total Amount + VAT Amount
Exchange Rate Exchange rate used
Discount Discount value, if applicable
Bill of Entry Ref BOE reference linked to the sales charge, if applicable
Disbursement Indicates whether charge is disbursement
Bill To Customer / party to be billed
Manifested Freight Indicator from selected charge
Action Edit/Delete where applicable

Add / Edit Sales Charge Popup

Popup Title

For adding a new sales charge:

Add Charges

For adding a new sales charge:

Edit Charges

or use the same title currently used in Ocean Clearing.

Popup Buttons

Button Behaviour
Cancel Closes popup without saving
Add Saves new sales charge
Update Updates existing sales charge

Popup Fields

The Air Clearing Sales Add/Edit popup should reuse the same component as Ocean Clearing where possible.

Field Type Mandatory Remarks
Charge Dropdown/searchable dropdown Yes Filtered from Charge Maintenance
Type Dropdown Yes Same values as Ocean Sales
Currency Dropdown Yes Currency master
Amount Numeric Yes Amount without VAT
VAT Dropdown Yes VAT type/rate
VAT Amount Numeric/calculated No Calculated from Amount and VAT
Exchange Rate Numeric Yes Default 1 for MUR
Discount Numeric No Optional discount amount
Total Numeric/calculated No Calculated total
Bill of Entry Ref Textbox/dropdown No BOE reference linked to the sales line
Bill To Dropdown/searchable dropdown Yes Customer/party to be billed
Disbursement Checkbox No Defaulted from charge maintenance where applicable
Display Add. Info in PDF Checkbox No Controls whether additional information appears in PDF
Manifested Freight / Ex-Works Indicator / checkbox No Same behaviour as Ocean Sales

Functional Requirements

Charge Maintenance Filtering Rules

1 – Use Charge Maintenance as Source

The Charge dropdown must retrieve sales charges from the existing Charge Maintenance setup.

2 – Filter by Shipment Channel

For Air Clearing Sales, the Charge dropdown must show only charges where: "Shipment Channel = AIR"

Charges configured for: "Shipment Channel = SEA" must not appear in Air Clearing Sales.

3 – Filter by Cargo Type

The Charge dropdown must filter based on the Cargo Type selected in the Air Clearing File.

Air Clearing Cargo Type Charges to Display
Import Charges where Cargo Type = IMPORT
Export Charges where Cargo Type = EXPORT

Example:

For Air Import: Shipment Channel = AIRCargo Type = IMPORT

For Air Export: Shipment Channel = AIRCargo Type = EXPORT

4 – Filter by Active Flag

Only active charges should be available for new sales selection.

Active = Yes

Inactive charges should not appear for new entries.

If an old sales line already uses a charge that later becomes inactive, the system should still display the historical charge on existing records.

5 – Filter by Clearing Flag

If Charge Maintenance contains a Clearing flag/checkbox, the Sales Charge dropdown should show only charges where:

Clearing = Yes

6 – Disbursement Flag

If the selected charge is marked as Disbursement in Charge Maintenance, the system should default the Disbursement checkbox/indicator accordingly.

The behaviour must follow the existing Ocean Clearing Sales logic.

7 – Default Values from Charge Maintenance

When a charge is selected, the system should auto-populate available values from Charge Maintenance.

Sales Popup Field Source from Charge Maintenance
Charge Code Code
Charge Description Description
Currency Currency
VAT VAT
Type Freight Type, if maintained
Amount Amount Without VAT, if maintained
Manifested Freight / Ex-Works Maintained flag
Disbursement Maintained flag
Default Maintained flag, if used
Active Maintained flag
Clearing Maintained flag

The user may edit populated values

8 – Display Sales Section

The system must display the Sales section in the Air Clearing Add/Update screen.

9 – Add Sales Charge

When the user clicks the Add + button:

  • The Add Charges popup should open.
  • The Charge dropdown should show only valid Air Clearing charges based on:
    • Shipment Channel = AIR
    • Cargo Type = Import or Export
    • Active = Yes
    • Clearing = Yes
  • User enters or confirms details.
  • User clicks Add.
  • The system validates the entered data.
  • The system saves the sales charge against the Air Clearing File
  • The Sales grid refreshes.

10 – Update Sales Charge

When the user edits an existing sales line:

  • The Edit Charges popup opens.
  • Existing sales charge values are populated.
  • The user updates allowed fields.
  • The user clicks Update.
  • The system validates and saves the changes.
  • The Sales grid refreshes.

11 – Delete Individual Sales Charge

Each sales row should have a delete icon, same as Ocean Clearing.

When clicked:

  • The system asks for confirmation.
  • If confirmed, the system deletes or soft-deletes the selected sales line based on existing Ocean behaviour.
  • If the sales line has already been invoiced, used in a standard invoice, deletion should be prevented.

12 – Delete Selected Sales Charges

The Sales grid must include a Delete Selected button.

Expected behaviour:

  1. User selects one or more sales lines using checkboxes.
  2. User clicks Delete Selected.
  3. System asks for confirmation.
  4. System deletes or soft-deletes selected sales lines, as per ocean clearing rules.
  5. Grid refreshes.
  6. Activity Log is updated.

Suggested confirmation:

"Are you sure you want to delete the selected sales line(s)?"

If no line is selected and the user clicks Delete Selected, display:

"Please select at least one sales line to delete."

13 – Header Checkbox

The Sales grid should include a header checkbox.

When selected:

  • All eligible visible rows are selected.
  • Ineligible rows, such as already invoiced/locked rows, should either remain unselected or be blocked during deletion based on existing Ocean behaviour.

14 – Bill To Party

The Bill To field is mandatory for sales charges.

The Bill To Dropdown should allow selection from valid parties/customers.

Suggested defaulting:

Cargo Type Default Bill To
Air Import Consignee / Importer
Air Export Shipper / Exporter

The user should be allowed to change Bill To where required.

15 – Bill of Entry Ref

The Bill of Entry Ref field should allow the user to either enter a BOE reference manually or select an existing BOE reference linked to the current Air Clearing File.

Rules

  1. If BOEs exist, the dropdown/list should display only BOEs linked to the current Air Clearing File.
  2. BOEs from other clearing files must not be displayed.
  3. The field may remain blank if the sales charge is not linked to a BOE.
  4. Manual entry should still be allowed if required.

Rationale

In the Ocean Clearing Sales popup, the Bill of Entry Ref field is a free-text field. However, in Air Clearing, it would be more convenient for users to select from BOEs already entered in the BOEs section, instead of typing the same reference again.

This would reduce duplicate data entry and help prevent typographical errors.

16 – Type Dropdown

The Type dropdown must use the same configured values as Ocean Clearing.

Examples may include:

PREPAID

COLLECT

17 – Currency and Exchange Rate

Currency must use the currency master.

If Currency = MUR:

xchange 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, if available.
  • User may modify it.

18 – VAT and Total Calculation

VAT Amount and Total must be calculated using the same logic as Ocean Clearing.

19 – Discount

If discount is available in the Ocean Clearing Sales popup, it must also be available in Air Clearing Sales.

Validation:

  • Discount cannot be negative.
  • Discount cannot exceed charge amount.
  • Total should recalculate after discount changes.

20 – Display Additional Information in PDF

If the user ticks: "Display Add. Info in PDF" then the Additional Information entered as the BOE Ref should be available for relevant PDFs/reports using the same rule as Ocean Clearing.

21 – Disbursement

The Disbursement must follow existing Ocean Clearing behaviour.

22 – Manifested Freight / Ex-Works

The Manifested Freight / Ex-Works indicator must follow existing Ocean Clearing behaviour.

If defaulted from Charge Maintenance, it should populate automatically when the charge is selected.

23 – Read-only Behaviour by Air Clearing Status

Air Clearing Status Sales Behaviour
Draft Add/Edit/Delete allowed
Awaiting Approval Status is changed to draft on update
Confirmed |Status is changed to draft on update
Closed Read-only
Cancelled Read-only

When the file is Closed or Cancelled:

  • Add button should be disabled or hidden.
  • Edit buttons should be disabled or hidden.
  • Delete buttons should be disabled or hidden.
  • Delete Selected button should be disabled or hidden.

24 – Invoiced Sales Charge Restriction

If a sales charge has already been used in:

  • Standard invoice

then the system should follow existing Ocean Clearing behaviour.

Recommended rule:

  • Do not allow direct deletion of the sales line.
  • Do not allow editing.
  • Any correction must follow invoice cancellation, credit note, or reversal rules where applicable.

Suggested message:

This sales charge has already been used in billing and cannot be deleted

25 – Activity Log

The system must record sales actions in the Activity Log section at the bottom of the Air Clearing page.

Add Sales Charge

<Username> added sales charge <CHARGE_NAME> for Air Clearing File <CLEARING_REF>

Update Sales Charge

<Username> updated sales charge <CHARGE_NAME> for Air Clearing File <CLEARING_REF>

Delete Sales Charge

<Username> deleted sales charge <CHARGE_NAME> 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
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
Discount Numeric, cannot be negative
Total Numeric, cannot be negative
Bill To Mandatory
Bill of Entry Ref Must belong to current Air Clearing File if selected
Invoiced sales line Cannot be deleted directly
Closed/Cancelled file Sales cannot be updated

Acceptance Criteria

1 – Display Sales Section

Given I open an Air Clearing File,
When the page loads,
Then the system should display the Sales section.

2 – Display Sales Grid Columns

Given the Sales section is displayed,
Then the grid should show columns for:

  • Checkbox
  • Charges
  • Type
  • Currency
  • Amount
  • VAT
  • VAT Amount
  • Total
  • Exchange Rate
  • Discount
  • Bill of Entry Ref
  • Disbursement
  • Bill To
  • Manifested Freight / Ex-Works
  • Action

3 – Empty Sales Grid

Given no sales charge exists,
When the Sales section loads,
Then the system should display:

No record(s) found.

4 – Open Add Charges Popup

Given I click the Add + button,
When the action is triggered,
Then the system should open the Add Charges popup.

5 – Display Correct Sales Popup Fields

Given the Add/Edit Sales Charges popup is opened,
Then the system should display only the Ocean Sales popup fields:

  • Charge
  • Type
  • Currency
  • Amount
  • VAT
  • VAT Amount
  • Exchange Rate
  • Discount
  • Total
  • Bill of Entry Ref
  • Bill To
  • Disbursement
  • Display Add. Info in PDF
  • Manifested Freight / Ex-Works

6 – Filter Charges by Air Shipment Channel

Given I am adding a sales charge in Air Clearing,
When I open the Charge dropdown,
Then the system should display only charges configured with: Shipment Channel = AIR

7 – Filter Charges by Cargo Type

Given the Air Clearing File Cargo Type is Import or Export,
When I open the Charge dropdown,
Then the system should display only active Air charges matching the selected Cargo Type.

8 – Exclude Sea Charges

Given a charge is configured with Shipment Channel = SEA,
When I open the Charge dropdown in Air Clearing Sales,
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 sales charge,
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 sales charge,
Then the charge should not be displayed in the Charge dropdown.

11 – Auto-populate Charge Defaults

Given I select a charge,
When the charge is selected,
Then the system should auto-populate relevant defaults such as:

  • Currency
  • VAT
  • Amount
  • Type
  • Disbursement
  • Manifested Freight / Ex-Works

based on Charge Maintenance.

12 – Bill To

Given shipper/consignee has been selected,
Then the Bill To field should be auto-selected based on the cargo type:

  • Import → Consignee
  • Export → Shipper

When I save the sales charge,
Then the system should prevent saving if the Bill To value is missing, invalid, or does not match the cargo type logic.

13 – BOE Ref Limited to Current File

Given BOEs exist in the current Air Clearing File,
When I open or enter Bill of Entry Ref,
Then the system should allow only BOEs linked to the current clearing file.

14 – Save Sales Charge

Given all mandatory fields are completed,
When I click Add or Update,
Then the system should save the sales charge and refresh the Sales grid.

15 – Delete Individual Sales Charge

Given a sales line exists,
When I click the delete icon and confirm,
Then the system should delete or soft-delete the selected sales line if allowed.

16 – Delete Selected Sales Charges

Given one or more sales lines are selected,
When I click Delete Selected and confirm,
Then the system should delete or soft-delete selected sales lines if allowed.

17 – Delete Selected without Selection

Given no sales line is selected,
When I click Delete Selected,
Then the system should display:

"Please select at least one sales line to delete."

18 – Prevent Invoiced Sales Deletion

Given a sales charge has already been used in billing,
When I try to delete it,
Then the system should prevent deletion and display:

This sales charge has already been used in billing and cannot be deleted.

19 – VAT, Discount and Total Calculation

Given Amount, VAT, and Discount are entered,
When values change,
Then VAT Amount and Total should recalculate using existing Ocean Clearing Sales logic.

20 – Read-only When Closed or Cancelled

Given the Air Clearing File is Closed or Cancelled,
When I open the Sales section,
Then Add, Edit, Delete, and Delete Selected actions should be disabled or hidden.

21 – Activity Log

Given a sales charge is added, updated, individually deleted, or deleted using Delete Selected,
When the action is completed,
Then the system should record the action in the Activity Log section.


GitLab Sync Log

[]

Actions #1

Updated by Redmine Admin 4 months ago

  • GitLab Sync Log updated (diff)
Actions

Also available in: Atom PDF