Bugzilla – Attachment 175790 Details for
Bug 38689
EDIFACT errors should log to a staff accessible location
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38689: Record errors on invoice processing
Bug-38689-Record-errors-on-invoice-processing.patch (text/plain), 2.79 KB, created by
Martin Renvoize (ashimema)
on 2024-12-19 16:57:20 UTC
(
hide
)
Description:
Bug 38689: Record errors on invoice processing
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-12-19 16:57:20 UTC
Size:
2.79 KB
patch
obsolete
>From 482dc947dcce4041cfb9ab7d232b006cbc884e6f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 19 Dec 2024 16:56:29 +0000 >Subject: [PATCH] Bug 38689: Record errors on invoice processing > >--- > Koha/EDI.pm | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index 499acedad0a..11e562ca5d7 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -290,7 +290,8 @@ sub process_invoice { > )->single; > } > if ( !$vendor_acct ) { >- carp "Cannot find vendor with ean $vendor_ean for invoice $invoicenumber in ".$invoice_message->filename; >+ $invoice_message->add_to_edifact_errors({ details => "Cannot find vendor with ean $vendor_ean" }); >+ $logger->error("Cannot find vendor with ean $vendor_ean for invoice $invoicenumber in ".$invoice_message->filename); > next; > } > $invoice_message->edi_acct( $vendor_acct->id ); >@@ -313,6 +314,12 @@ sub process_invoice { > foreach my $line ( @{$lines} ) { > my $ordernumber = $line->ordernumber; > if ( !$ordernumber ) { >+ $invoice_message->add_to_edifact_errors( >+ { >+ section => $line->line_item_number, >+ details => "Message missing ordernumber" >+ } >+ ); > $logger->error("Skipping invoice line, no associated ordernumber"); > next; > } >@@ -320,12 +327,24 @@ sub process_invoice { > # ModReceiveOrder does not validate that $ordernumber exists validate here > my $order = $schema->resultset('Aqorder')->find($ordernumber); > if ( !$order ) { >+ $invoice_message->add_to_edifact_errors( >+ { >+ section => $line->line_item_number, >+ details => "Koha order $ordernumber missing" >+ } >+ ); > $logger->error("Skipping invoice line, no order found for $ordernumber, invoice:$invoicenumber"); > next; > } > > my $bib = $order->biblionumber; > if ( !$bib ) { >+ $invoice_message->add_to_edifact_errors( >+ { >+ section => $line->line_item_number, >+ details => "Koha biblio missing" >+ } >+ ); > $logger->error( > "Skipping invoice line, no bibliographic record found for $ordernumber, invoice:$invoicenumber" > ); >-- >2.47.1
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 38689
:
175788
|
175789
|
175790
|
175793
|
175794
|
175795
|
175796
|
175797
|
175809
|
175810
|
175811
|
175812
|
175813
|
175814
|
175815
|
175816
|
175817
|
176127
|
176128
|
176129
|
176130
|
176131
|
176132
|
176133
|
176134
|
176173
|
176174
|
176175
|
176176
|
176177
|
176178
|
176179
|
176180
|
176181
|
176182
|
176183
|
176373
|
176374
|
176375
|
176376
|
176377
|
176378
|
176379
|
176380
|
176381
|
176382
|
176524
|
176525
|
176526
|
176527
|
176528
|
176529
|
176530
|
176531
|
176532
|
176533
|
176605
|
176606
|
176607
|
176608
|
176609
|
176610
|
176611
|
176612
|
176613
|
176614