Task #19357
openMCL/CPW Receipt PDF - to display HBL/MBL ref, Container Ref(s), and Cheque Number
0%
Description
MCL has requested that the receipt PDF generated from the Mfreight system must:
- Display the appropriate Bill of Lading reference depending on consignment type (LCL/FCL)
- For LCL consignments, display the HBL Reference
- For FCL consignments, display the MBL Reference
- Display container reference(s) linked to the consignment
- Display cheque number only when payment is made by cheque
All fields must be conditionally displayed and must not show empty or irrelevant labels.
Acceptance Criteria
- LCL Consignments
- Given the consignment type is LCL
- When the receipt PDF is generated
- Then the HBL Ref. is displayed on the receipt PDF
- And the value matches the HBL reference stored in the system
- FCL Consignments
- Given the consignment type is FCL
- When the receipt PDF is generated
- Then the MBL Ref. is displayed on the receipt PDF
- And the value matches the MBL reference stored in the system
- Conditional Display
- Only the applicable reference (HBL or MBL) is displayed
- No irrelevant or empty reference labels appear on the receipt PDF
Container Reference(s)
- Given the consignment has one or more container references stored in the system
- When the receipt PDF is generated
- Then a Container Ref. field is displayed on the receipt PDF
- And it shows all container references associated with the consignment
- And the values match those stored in the system
Multiple Containers Formatting
- Given multiple container references exist
- Then all container references are displayed in a readable format (e.g. comma-separated or one per line)
- And text wraps correctly without truncation or layout overlap
Conditional Display
- Given no container references exist for the consignment
- Then the Container Ref. field is not displayed
- And no empty label or placeholder appears on the receipt PDF
3. Cheque Number
Cheque Payment
- Given a receipt line item has Payment Method = CHEQUE
- When the receipt PDF is generated
- Then the Cheque No. is displayed for that line item
- The cheque number displayed matches the value stored in the system.
Non-Cheque Payment
- Given a receipt line item has Payment Method ≠ CHEQUE (e.g., CASH)
- Then Cheque No. is not displayed for that line item
- And no empty value or placeholder is shown
Multiple Cheques
- Given the receipt contains multiple cheque payments
- Then each cheque payment line displays its own corresponding cheque number
Sample Payment Receipt from MCL
GitLab Sync Log
[{"id": "38357", "author": "Vishesh Jodhoa", "hours": 7.0, "created": "2026-02-06T12:00:50.568Z", "log_date": "2026-02-06", "comment": "Imported from GitLab by @Vishesh Jodhoa on 2026-02-06T12:00:50.568Z: 7h-(7.0)h spend at: 2026-02-06", "status": "active", "deleted_by": "", "redmine_entry_id": 12198}, {"id": "38650", "author": "Vishesh Jodhoa", "hours": 7.0, "created": "2026-02-11T12:08:02.225Z", "log_date": "2026-02-09", "comment": "Imported from GitLab by @Vishesh Jodhoa on 2026-02-11T12:08:02.225Z: 7h-(7.0)h spend at: 2026-02-09", "status": "active", "deleted_by": "", "redmine_entry_id": 12254}]