Bugzilla – Attachment 105888 Details for
Bug 25759
Invoices hyperlink is broken on edifactmsgs.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25759: Invoices hyperlink is broken on edifactmsgs.pl
Bug-25759-Invoices-hyperlink-is-broken-on-edifactm.patch (text/plain), 2.05 KB, created by
Kyle M Hall (khall)
on 2020-06-15 15:59:17 UTC
(
hide
)
Description:
Bug 25759: Invoices hyperlink is broken on edifactmsgs.pl
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-06-15 15:59:17 UTC
Size:
2.05 KB
patch
obsolete
>From 2ab7d6602ad56061829dec30f3f66032083e3043 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 15 Jun 2020 11:56:13 -0400 >Subject: [PATCH] Bug 25759: Invoices hyperlink is broken on edifactmsgs.pl > >The "Invoices" hyperlink on edifactmsgs.pl has always been broken. >We can parse out the invoice number from the message and have the >link search for that invoice number in Koha. > >Test Plan: >1) Locate an imported invoice from edifactmsgs.pl >2) Click the "Invoices" link for that invoice >3) Note no invoice is found >4) Apply this patch >5) Restart all the things! >6) Reload the page >7) Note the link now reads "Invoice: $invoice_number" >8) Click the new link >9) Note it is now found by Koha! >--- > Koha/Schema/Result/EdifactMessage.pm | 10 ++++++++++ > .../intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt | 5 +++-- > 2 files changed, 13 insertions(+), 2 deletions(-) > >diff --git a/Koha/Schema/Result/EdifactMessage.pm b/Koha/Schema/Result/EdifactMessage.pm >index db24e7468c..5f991731dd 100644 >--- a/Koha/Schema/Result/EdifactMessage.pm >+++ b/Koha/Schema/Result/EdifactMessage.pm >@@ -202,4 +202,14 @@ __PACKAGE__->add_columns( > '+deleted' => { is_boolean => 1 }, > ); > >+sub invoice_id { >+ my ( $self ) = @_; >+ >+ if ( $self->raw_msg =~ /BGM\+\d{3}\+(\d+)\+/ ) { >+ return $1; >+ } else { >+ return; >+ } >+} >+ > 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt >index 5f0dc43ac6..ce888e1054 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/edifactmsgs.tt >@@ -61,8 +61,9 @@ > [% END %] > [% ELSE %] > <!-- Assuming invoices --> >- <a href="/cgi-bin/koha/acqui/invoices.pl?message_id=[% msg.id | uri %]&op=do_search"> >- Invoices >+ [% SET invoice_id = msg.invoice_id %] >+ <a href="/cgi-bin/koha/acqui/invoices.pl?invoicenumber=[% invoice_id | uri %]&op=do_search"> >+ Invoice: [% invoice_id %] > </a> > [% END %] > </td> >-- >2.24.1 (Apple Git-126)
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 25759
:
105888
|
112188
|
112451