Bugzilla – Attachment 194506 Details for
Bug 41996
Further improvements to EDIFACT error recording
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41996: Filter EDI errors on invoice page by invoicenumber
162aac5.patch (text/plain), 1.70 KB, created by
Martin Renvoize (ashimema)
on 2026-03-05 13:02:49 UTC
(
hide
)
Description:
Bug 41996: Filter EDI errors on invoice page by invoicenumber
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-03-05 13:02:49 UTC
Size:
1.70 KB
patch
obsolete
>From 162aac506ed06e9e92fb1665cc0ef3ce383a0dff Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Thu, 5 Mar 2026 11:58:21 +0000 >Subject: [PATCH] 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. >--- > acqui/invoice.pl | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/acqui/invoice.pl b/acqui/invoice.pl >index e42542a1fad..4b9650a048c 100755 >--- a/acqui/invoice.pl >+++ b/acqui/invoice.pl >@@ -328,8 +328,17 @@ if ( $edifact_enabled && $details->{'message_id'} ) { > > if ($edifact_message) { > >- # Get any processing errors for this message using the relation accessor >- my $errors = $edifact_message->errors; >+ # Get processing errors for this specific invoice, plus any message-level >+ # errors (invoicenumber IS NULL) that affect the whole EDI file. >+ # This avoids showing errors from other invoices in the same EDI file. >+ my $errors = $edifact_message->errors->search( >+ { >+ -or => [ >+ { invoicenumber => $details->{'invoicenumber'} }, >+ { invoicenumber => undef }, >+ ] >+ } >+ ); > > while ( my $error = $errors->next ) { > push @$edifact_errors, { >-- >2.53.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41996
:
194502
|
194503
|
194504
|
194505
| 194506