Bug 32938

Summary: Acquisitions EDI - ORDRSP messages are loaded as invoices
Product: Koha Reporter: Lucy Vaux-Harvey <lucy.vaux-harvey>
Component: AcquisitionsAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: Needs Signoff --- QA Contact: Kyle M Hall (khall) <kyle>
Severity: minor    
Priority: P5 - low CC: aude.charillon, hdunne-howrie, jeremy.evans, martin.renvoize
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: 40383    
Bug Blocks:    
Attachments: View of ORDRSP message at edifactmsgs.pl
Bug 32938: Fix ORDRSP message linking to point to baskets instead of invoices
Bug 32938: Add ORDRSP message display to basket page

Description Lucy Vaux-Harvey 2023-02-10 12:10:20 UTC
Created attachment 146468 [details]
View of ORDRSP message at edifactmsgs.pl

Currently ORDRSP messages (messages from a vendor providing details such as Out of Print, Unable to supply) are loaded into Koha and diaplay as for an INVOICE message.
On /cgi-bin/koha/acqui/edifactmsgs.pl in the Details column the message will have the label 'Invoices' and this is hyperlinked to the invoices page (/cgi-bin/koha/acqui/invoices.pl) - see screenshot.  This link always results in a failure as there isn't an invoice to match against. 
Is it possible in the case of ORDRSP to either leave the Details column empty or remove the hyperlink?
Comment 1 Katrin Fischer 2023-10-28 15:18:30 UTC
Hi Lucy, can you tell if this is still valid for current versions?
Comment 2 Lucy Vaux-Harvey 2023-11-02 17:08:31 UTC
Hi Katrin, yes this is still valid.  I have tested on 22.11.10 and the link to the invoices page is present as in the original screenshot.
Comment 3 Katrin Fischer 2023-11-02 18:47:01 UTC
Thx Lucy, I have updated the version accordingly.
Comment 4 Lucy Vaux-Harvey 2023-11-03 10:27:40 UTC
Many thanks
Comment 5 Aude Charillon 2025-04-14 10:20:43 UTC
Still an issue in 24.11.
Comment 6 Martin Renvoize (ashimema) 2025-07-21 13:24:00 UTC
I presume this should just be linked to a Basket rather than an Invoice?

And with bug 40334 we should perhaps just give the option to display the ordersp message raw and maybe display what it did.
Comment 7 Aude Charillon 2025-07-21 13:55:24 UTC
(In reply to Martin Renvoize (ashimema) from comment #6)
> I presume this should just be linked to a Basket rather than an Invoice?

If there is one handy basket, yes? I don't know whether there is ever a case the ORDRSP covers orders across more than one basket? If so then just having nothing would be better than the current incorrect mention of an Invoice.
Comment 8 Martin Renvoize (ashimema) 2025-08-04 14:20:42 UTC
Created attachment 185101 [details] [review]
Bug 32938: Fix ORDRSP message linking to point to baskets instead of invoices

ORDRSP (Order Response) messages are responses to ORDERS messages and should
link to the related basket, not to invoices. This follows the standard EDI
workflow:
1. ORDERS message sent to vendor
2. ORDRSP message received from vendor (order response/confirmation)
3. INVOICE message received later when items shipped
Comment 9 Martin Renvoize (ashimema) 2025-08-04 14:20:44 UTC
Created attachment 185102 [details] [review]
Bug 32938: Add ORDRSP message display to basket page

This patch extends the EDIFACT message display functionality on the basket page
to include ORDRSP (Order Response) messages alongside existing QUOTE and ORDERS
messages.

Features added:
- ORDRSP message collection and filtering
- Smart button display logic:
  * Single button for one message type
  * Dropdown for multiple message types (now includes ORDRSP)
- ORDRSP-specific UI elements:
  * Reply icon (fa-reply) indicating response nature
  * "View order response" labeling
  * Integration with existing modal and highlighting system

The ORDRSP messages correctly link to baskets since they are vendor responses
to the original order, following the standard EDI workflow:
ORDERS → ORDRSP → INVOICE