Bug 40334

Summary: When EDIFACT is enabled, one should be able view the corresponding EDIFACT QUOTE and ORDER messages on the Koha Basket page
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: AcquisitionsAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: hdunne-howrie, kyle, testopia
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 40333    
Bug Blocks: 40383    
Attachments: Bug 40334: Add EDIFACT message display to basket page
Example display
Bug 40334: Add EDIFACT message display to basket page
Bug 40334: Add EDIFACT message display to basket page
Bug 40334: Add EDIFACT message display to basket page
Bug 40334: (follow-up) Terminology

Description Martin Renvoize (ashimema) 2025-07-09 15:15:34 UTC
Right now, there's no link back to display the EDI QUOTE or ORDER messages that may be associated with the Koha Basket.. it would be helpful to have a quick display of the raw message as well as a clear highlight of parsing errors if there were any during EDI processing.
Comment 1 Martin Renvoize (ashimema) 2025-07-09 16:10:49 UTC Comment hidden (obsolete)
Comment 2 Martin Renvoize (ashimema) 2025-07-09 16:12:37 UTC Comment hidden (obsolete)
Comment 3 Hannah Dunne-Howrie 2025-07-09 16:22:00 UTC
Great idea for consistency and transparency.
Comment 4 Martin Renvoize (ashimema) 2025-07-10 13:37:16 UTC Comment hidden (obsolete)
Comment 5 Martin Renvoize (ashimema) 2025-07-14 16:28:54 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize (ashimema) 2025-07-18 14:32:56 UTC
Created attachment 184389 [details] [review]
Bug 40334: Add EDIFACT message display to basket page

This patch extends the EDIFACT message display functionality from the invoice page
to the basket page, providing comprehensive access to EDIFACT messages and error
reporting.

Features added:
- Toolbar buttons for viewing EDIFACT messages (quote/order)
- Smart button display: single button for one message type, dropdown for multiple
- EDIFACT parsing errors section with inline error display
- Errors grouped by message type with detailed information
- Conditional display: only shows when relevant data exists

Changes:
- acqui/basket.pl: Added EDIFACT message and error collection logic
- basket.tt: Added toolbar buttons and parsing errors section
- Uses existing modal system for raw message display

Sponsored-by: Open Fifth <https://openfith.co.uk>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Comment 7 Martin Renvoize (ashimema) 2025-07-18 14:32:58 UTC
Created attachment 184390 [details] [review]
Bug 40334: (follow-up) Terminology

The envelope level of EDIFACT is called an 'Interchange'. This patch
updates our UI terminology to match the official protocol terminology as
what we're actually displaying here is the Interchange file that
contains the related messages for the Basket.  The interchange file will
often contain other messages of the same type that came through at the
same time of the this basket generation.

Sponsored-by: Open Fifth <https://openfith.co.uk>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Comment 8 Hannah Dunne-Howrie 2025-07-18 14:36:19 UTC
This is a logical and useful feature that provides quick access to corresponding quote and order edi messages in relation to the basket. It saves us trawling through edi messages area and compliments the similar feature in invoices view to link to invoice edi messages.