Bugzilla – Attachment 14919 Details for
Bug 9503
Link from histsearch via invoicenumber results in error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9503 Correct name of parameter passed to parcel.pl
Bug-9503-Correct-name-of-parameter-passed-to-parce.patch (text/plain), 2.37 KB, created by
Galen Charlton
on 2013-01-29 16:41:28 UTC
(
hide
)
Description:
Bug 9503 Correct name of parameter passed to parcel.pl
Filename:
MIME Type:
Creator:
Galen Charlton
Created:
2013-01-29 16:41:28 UTC
Size:
2.37 KB
patch
obsolete
>From 814fda38608b429104f92e6d2a30012109ce7291 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Tue, 29 Jan 2013 11:56:15 +0000 >Subject: [PATCH] Bug 9503 Correct name of parameter passed to parcel.pl > >invoiceid was being passed as invoice causing GetInvoiceDetails >to silently fail and a system error downstream when >accessing the 'orders' element of the undefined invoice > >Added an error message if GetInvoiceDetails called on undef > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >--- > C4/Acquisition.pm | 8 +++++--- > .../prog/en/modules/acqui/histsearch.tt | 2 +- > 2 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 4a03e2c..249f10d 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2319,9 +2319,11 @@ Orders informations are in $invoice->{orders} (array ref) > > sub GetInvoiceDetails { > my ($invoiceid) = @_; >- my $invoice; > >- return unless $invoiceid; >+ if ( !defined $invoiceid ) { >+ carp 'GetInvoiceDetails called without an invoiceid'; >+ return; >+ } > > my $dbh = C4::Context->dbh; > my $query = qq{ >@@ -2333,7 +2335,7 @@ sub GetInvoiceDetails { > my $sth = $dbh->prepare($query); > $sth->execute($invoiceid); > >- $invoice = $sth->fetchrow_hashref; >+ my $invoice = $sth->fetchrow_hashref; > > $query = qq{ > SELECT aqorders.*, biblio.* >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >index e10ec8f..94d1bc7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >@@ -91,7 +91,7 @@ > [% END %] > </td> > <td>[% IF ( suggestions_loo.invoicenumber ) %] >- <a href="/cgi-bin/koha/acqui/parcel.pl?invoice=[% suggestions_loo.invoicenumber %]&booksellerid=[% suggestions_loo.id %]&datereceived=[% suggestions_loo.datereceived %]">[% suggestions_loo.invoicenumber %]</a> >+ <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% suggestions_loo.invoicenumber %]&booksellerid=[% suggestions_loo.id %]&datereceived=[% suggestions_loo.datereceived %]">[% suggestions_loo.invoicenumber %]</a> > [% ELSE %] > > [% END %] >-- >1.7.2.5
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 9503
:
14913
|
14919
|
14920
|
14973
|
14981
|
14992
|
14993