Task #19922
openClearing - Generate Air Clearing Invoice PDF Using Existing Ocean Clearing Invoice Format
0%
Description
Requirement¶
The system must reuse the existing Ocean Clearing invoice PDF format for Air Clearing invoices, but update the header shipment fields to show Air Clearing information.
Invoice-MACCS26INV05432-2026-05-04 (2).pdf
The charge table, totals, bank details, terms and conditions, QR code, and footer should remain unchanged.
Important Air Clearing Rule¶
Air Clearing may be performed at:
| Clearing Level | Meaning |
|---|---|
| HAWB level | Clearing file is linked to a House Air Waybill |
| MAWB level | Clearing file is linked to a Master Air Waybill |
| Quotation level | Clearing file is created from quotation and may not yet have HAWB/MAWB |
| Manual level | Clearing file is created manually and references may be optional |
Therefore:
- MAWB Reference may exist without HAWB Reference
- HAWB Reference may exist with or without MAWB Reference
- Invoice generation must still work if HAWB is blank
Field Mapping – Ocean Clearing PDF to Air Clearing PDF¶
| Current Ocean PDF Field | Air Clearing PDF Field | Mapping / Source |
|---|---|---|
| CLEARING FILE REF | CLEARING FILE REF | Air Clearing Reference |
| HBL Reference | HAWB Reference | HAWB info, if available |
| MBL Ref | MAWB Reference | MAWB info, if available |
| BILL TO | BILL TO | Bill To from Air Clearing Sales charge |
| ADDRESS | ADDRESS | Bill To address |
| TELEPHONE | TELEPHONE | Bill To phone |
| VAT | VAT | Bill To VAT number |
| BRN | BRN | Bill To BRN |
| Bill To email | ||
| CONSIGNEE | CONSIGNEE / IMPORTER | Consignee/Importer from Air Clearing |
| SHIPPER | SHIPPER / EXPORTER | Shipper/Exporter from Air Clearing |
| VESSEL | AIRLINE | Airline Name |
| VOY NO | FLIGHT NO | Flight Number |
| MBL Ref | MAWB Ref | MAWB linked to Air Clearing, if available |
| HBL Ref | HAWB Ref | HAWB linked to Air Clearing, if available |
| NO. OF PKGS | NO. OF PKGS | Number of packages / pieces |
| WEIGHT (KGS) | WEIGHT (KGS) | Weight from Air Clearing |
| VOLUME | VOLUME | Volume from Air Clearing, if available |
| LOADING | Airport of Loading | Airport of Loading |
| ORIGIN | ORIGIN | Airport of Origin |
| DESTINATION | DESTINATION | Airport of Destination / Final Destination |
| ETD | ETD | Flight ETD, if available |
| INCOTERMS | INCOTERMS | Incoterm from Air Clearing |
| CONTAINER | Not applicable | Do not display for Air Clearing |
| SEAL NUMBER | Not applicable | Do not display for Air Clearing |
| UNSTUFFING PLACE | Not applicable | Do not display for Air Clearing |
| GOODS DESCRIPTION | GOODS DESCRIPTION | Nature of goods / description |
| EXCHANGE RATE | EXCHANGE RATE | Same existing invoice logic |
| BOE Ref | BOE Ref | Concatenate Air Clearing BOEs if multiple exist |
Air Clearing PDF Header Fields¶
The Air Clearing invoice PDF should display the following fields where values are available:
| Field Label on Air Clearing PDF | Source |
|---|---|
| CLEARING FILE REF | Air Clearing Reference |
| MAWB Reference | MAWB Reference, if available |
| HAWB Reference | HAWB Reference, if available |
| BOE Ref | BOE references linked to Air Clearing |
| BILL TO | Bill To party from invoice group |
| ADDRESS | Bill To address |
| TELEPHONE | Bill To phone |
| VAT | Bill To VAT |
| BRN | Bill To BRN |
| Bill To email | |
| CONSIGNEE / IMPORTER | Consignee from Air Clearing |
| SHIPPER / EXPORTER | Shipper from Air Clearing |
| AIRLINE | Airline Name |
| FLIGHT NO | Flight Number |
| NO. OF PKGS | Number of packages / pieces |
| WEIGHT (KGS) | Weight |
| VOLUME | Volume |
| LOADING | Airport of Loading |
| ORIGIN | Airport of Origin |
| DESTINATION | Destination / final destination airport |
| ETD | Estimated departure date |
| INCOTERMS | Incoterm |
| GOODS DESCRIPTION | Nature of goods / description |
| INVOICE CURRENCY | Invoice currency |
| EXCHANGE RATE | Exchange rate |
HAWB / MAWB Display Logic¶
Scenario 1 – Clearing created for HAWB¶
If the Air Clearing File is created for a HAWB:
MAWB Reference: show if linked / available
HAWB Reference: show HAWB reference
Example:
MAWB Reference: 157-94862994
HAWB Reference: HAWB080526A
Scenario 2 – Clearing created for MAWB¶
If the Air Clearing File is created for a MAWB:
MAWB Reference: show MAWB reference
HAWB Reference: blank or "-"
Example:
MAWB Reference: 157-94862994
HAWB Reference: -
The invoice PDF must still generate successfully.
BOE Reference Rule¶
Air Clearing can have one or multiple BOEs.
The PDF should display one field:
BOE Ref:
If multiple BOEs exist, concatenate the BOE references separated by commas.
Example:
BOE Ref: 43150603693/0, 56555089104/0
Do not create separate fields like BOE1, BOE2, BOE3, because the number of BOEs can vary and may affect the PDF layout.
If no BOE exists, display blank or:
BOE Ref: -
Charge Table¶
The charge table format must remain the same as Ocean Clearing invoice PDF.
Current columns should remain:
- Charge Description
- Freight Type
- Currency
- VAT %
- Amt Excl VAT
- VAT Amt
- Amt in MUR
For Air Clearing, the charge lines must come from the Air Clearing Sales section only.
Cost charges must not appear on the invoice PDF.
Totals¶
The totals section must remain unchanged.
Existing fields should continue to display:
- AMT EXCL VAT
- TOTAL VAT
- AMT INCL VAT
The calculation logic should reuse the existing invoice calculation logic.
Bank Details¶
The Bank Details section must remain unchanged.
The system should continue displaying:
- Bank Name
- Account Number
- SWIFT Code
- Currency
Terms and Conditions¶
The Terms and Conditions section must remain unchanged.
QR Code / Fiscalisation¶
The QR code area and fiscalisation behaviour must remain unchanged.
If the invoice is fiscalised, the QR code should display as per existing invoice behaviour.
Footer¶
The footer must remain unchanged.
It should continue displaying:
- Computer-generated document note
- Issued By
- User email / phone where available
- Date/time
- Page number
Functional Requirements¶
1 – Reuse Existing PDF Format¶
The Air Clearing invoice PDF must reuse the same format/layout as the existing Ocean Clearing invoice PDF.
2 – Display Air Clearing Reference¶
The PDF must display the Air Clearing Reference under:
CLEARING FILE REF
3 – Replace MBL with MAWB¶
Where the Ocean PDF displays:
MBL Reference
the Air Clearing PDF must display:
MAWB Reference
If no MAWB is available, the field may remain blank or display -.
The absence of MAWB Reference must not block invoice PDF generation.
4 – Replace HBL with HAWB¶
Where the Ocean PDF displays:
HBL Reference
the Air Clearing PDF must display:
HAWB Reference
If no HAWB is available, the field may remain blank or display -.
The absence of HAWB Reference must not block invoice PDF generation.
5 – Replace Ocean Shipment Fields with Air Fields¶
The system must replace Ocean-specific fields with Air Clearing fields as follows:
VESSEL → AIRLIN
EVOY NO → FLIGHT NO
MBL Ref → MAWB Ref
HBL Ref → HAWB Ref
LOADING → ORIGIN
DESTINATION → DESTINATION
6 – Hide Non-Air Fields¶
The system must hide fields that are not applicable to Air Clearing:
CONTAINER
SEAL NUMBER
UNSTUFFING PLACE
7 – Display BOE References¶
The system must display BOE reference(s) linked to the Air Clearing file.
If multiple BOEs exist, they must be concatenated with commas in a single field.
8 – Use Air Clearing Sales Charges¶
The PDF must display only Air Clearing Sales charges.
9 – Keep Charge Table Format¶
The charge table format must remain the same as Ocean Clearing invoice PDF.
10 – Keep Totals, Bank Details, Terms, QR and Footer¶
The following sections must remain unchanged:
- Invoice totals
- Bank details
- Terms and conditions
- QR code / fiscalisation section
- Footer / Issued By section
Acceptance Criteria¶
1 – Air Clearing PDF Uses Existing Format¶
Given an invoice is generated from Air Clearing,
When the PDF is generated,
Then it should use the same layout and structure as the existing Ocean Clearing invoice PDF.
2 – Air Clearing Reference Displayed¶
Given an invoice is generated from Air Clearing,When the PDF is generated,Then the PDF should display the Air Clearing Reference under CLEARING FILE REF.
3 – MAWB Reference Handling¶
Given an Air Clearing File has a MAWB Reference,
When the invoice PDF is generated,
Then the PDF should display the MAWB Reference.
Given an Air Clearing File has no MAWB Reference,
When the invoice PDF is generated,
Then the MAWB Reference field should display blank or “-”, and PDF generation should continue successfully.
4 – HAWB Reference Handling¶
Given an Air Clearing File has a HAWB Reference,
When the invoice PDF is generated,
Then the PDF should display the HAWB Reference.
Given an Air Clearing File has no HAWB Reference,
When the invoice PDF is generated,
Then the HAWB Reference field should display blank or “-”, and PDF generation should continue successfully.
5 – Air Labels Displayed¶
Given an Air Clearing invoice PDF is generated,
When the shipment information is displayed,
Then the PDF should show air labels such as:
AIRLINE
FLIGHT NO
MAWB Ref
HAWB Ref
ORIGIN
DESTINATION AIRPORT
6 – Ocean Labels Not Displayed¶
Given an Air Clearing invoice PDF is generated,
When the shipment information is displayed,
Then the PDF should not show Ocean-only labels such as:
VESSEL
VOY NO
CONTAINER
SEAL NUMBER
UNSTUFFING PLACE
7 – BOE References Displayed¶
Given the Air Clearing File has one BOE,
When the invoice PDF is generated,
Then the BOE reference should be displayed.
Given the Air Clearing File has multiple BOEs,
When the invoice PDF is generated,
Then all BOE references should be displayed in one field, separated by commas.
8– Charge Table Format Preserved¶
Given an Air Clearing invoice PDF is generated,
When the charge table is displayed,
Then the charge table should keep the same columns and format as the Ocean Clearing invoice PDF.
9 – Sales Charges Displayed¶
Given the Air Clearing File has sales charges,
When the invoice PDF is generated,
Then only valid Air Clearing Sales charges should be displayed in the charge table.
10 – Totals Calculated Correctly¶
Given the invoice contains Air Clearing sales charges,
When the PDF is generated,
Then AMT EXCL VAT, TOTAL VAT, and AMT INCL VAT should be calculated using the existing invoice logic.
11 – Existing Static Sections Preserved¶
Given the Air Clearing invoice PDF is generated,
When the PDF is viewed,
Then the following sections should remain unchanged:
- Company header
- QR code
- Bank details
- Terms and conditions
- Issued By footer
- Page numbering
GitLab Sync Log
[]