| Summary: | Further improvements to EDIFACT error recording | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
| Component: | Acquisitions | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
| Status: | Needs Signoff --- | QA Contact: | Kyle M Hall (khall) <kyle> |
| Severity: | enhancement | ||
| Priority: | P5 - low | ||
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Small patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | 38689 | ||
| Bug Blocks: | |||
| Attachments: |
Bug 41996: Improve EDI invoice error messages for branch mismatches
Bug 41996: Add invoicenumber column to edifact_errors table Bug 41996: Schema Updates Bug 41996: Thread invoicenumber through EDI invoice error recording Bug 41996: Filter EDI errors on invoice page by invoicenumber |
||
|
Description
Martin Renvoize (ashimema)
2026-03-05 11:14:05 UTC
Created attachment 194502 [details] [review] Bug 41996: Improve EDI invoice error messages for branch mismatches When EDI invoice processing fails to match an item to a branch, the error message now includes: - The ordernumber referenced in the invoice (RFF+LI segment) - The branches that order actually has items at - A hint that the ordernumber in the invoice may be incorrect Also adds a warning when an invoice line references an order that is already marked as complete, which can indicate the supplier sent the wrong ordernumber. These improvements help acquisitions staff and vendors quickly diagnose whether the problem is a supplier error (wrong RFF+LI value) rather than a Koha data issue. Created attachment 194503 [details] [review] Bug 41996: Add invoicenumber column to edifact_errors table Adds an optional invoicenumber column to edifact_errors so that errors generated during invoice processing can be associated with the specific invoice they relate to, rather than only the EDI message as a whole. Message-level errors (e.g. unmatched vendor EAN) leave invoicenumber NULL, indicating they apply to the whole file. Created attachment 194504 [details] [review] Bug 41996: Schema Updates Patch from commit 1e48998 Created attachment 194505 [details] [review] Bug 41996: Thread invoicenumber through EDI invoice error recording All errors generated during process_invoice and receipt_items now store the invoicenumber of the specific invoice being processed. This allows errors to be displayed only on the relevant invoice page rather than appearing on every invoice generated from the same EDI file. Also fixes two pre-existing spacing bugs in error message strings ("itemnumberis missing" and "barcode"for invoice line"). Created attachment 194506 [details] [review] Bug 41996: Filter EDI errors on invoice page by invoicenumber The invoice page previously fetched all edifact_errors for the EDI message, causing errors from unrelated invoice lines to appear on every invoice generated from the same EDI file. For example, one unmatched ordernumber in a file with 20 invoices would flag all 20 as having errors. Now only errors where invoicenumber matches the current invoice (or where invoicenumber is NULL, indicating a message-level error) are displayed. |