Bug 40452 - Vendor in EDIFACT messages is sometimes incorrect before importing invoice
Summary: Vendor in EDIFACT messages is sometimes incorrect before importing invoice
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 24.11
Hardware: All All
: P5 - low trivial
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-18 16:29 UTC by Sara Brown
Modified: 2025-08-19 12:15 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sara Brown 2025-07-18 16:29:12 UTC
For libraries who have EdifactInvoiceImport set to "[Don't] automatically import invoice...", the Vendor shown in EDIFACT messages for invoices is sometimes incorrect while the message is pending import. Once it imports, all order/invoice info is correct, and the Vendor in the EDIFACT messages table updates to the correct vendor.
Comment 1 Andrew Fuerste-Henry 2025-08-19 12:15:39 UTC
This occurs when several EDI accounts share an FTP directory for their EDI files (usually because a library has multiple accounts with the same vendor). As the EDI cron picks the invoice up from the FTP, it doesn't look at the contents of that file; it's initially brought into Koha associated with the vendor on the first/oldest EDI account associated with the FTP directory from which the file was taken. Later, when the EDI file is processed to create a Koha invoice, the EDI plugin can use the contents of the file to determine the correct vendor.

In theory the EDI cron could be extended to do some preliminary processing of the file to determine the vendor. It might be simpler to ask one's vendors to adjust their FTP structure to not use the same directory for multiple accounts.