Bugzilla – Attachment 1234 Details for
Bug 3356
cannot search in order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bugfix
0001--bug-3356-fix-search-in-order-receive.patch (text/plain), 4.70 KB, created by
Chris Cormack
on 2009-06-24 12:56:00 UTC
(
hide
)
Description:
bugfix
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2009-06-24 12:56:00 UTC
Size:
4.70 KB
patch
obsolete
>From 8fcabb25d29f238afb1f8ac92fd8fe80663af878 Mon Sep 17 00:00:00 2001 >From: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com> >Date: Wed, 24 Jun 2009 14:55:26 +0200 >Subject: [PATCH] (bug #3356) fix search in order receive >Content-Type: text/plain; charset="utf-8" > >This patch add an arg to C4::Acquisitions::SearchOrder, and check if this function returned something or not to don't trap in a perl error. >--- > C4/Acquisition.pm | 6 ++-- > acqui/orderreceive.pl | 31 ++++++++++++------- > .../prog/en/modules/acqui/parcel.tmpl | 3 ++ > 3 files changed, 25 insertions(+), 15 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 4d8af94..f334edc 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -677,7 +677,7 @@ C<@results> is an array of references-to-hash with the following keys: > =cut > > sub SearchOrder { >- my ( $search, $id, $biblionumber, $catview ) = @_; >+ my ( $search, $id, $biblionumber, $catview, $is_search ) = @_; > my $dbh = C4::Context->dbh; > my @data = split( ' ', $search ); > my @searchterms; >@@ -688,7 +688,7 @@ sub SearchOrder { > push( @searchterms, $search, $search, $biblionumber ); > my $query; > ### FIXME THIS CAN raise a problem if more THAN ONE biblioitem is linked to one biblio >- if($id and $search){ >+ if($id and $search and not $is_search){ > @searchterms = ($id, $search); > $query = > "SELECT *,biblio.title >@@ -697,7 +697,7 @@ sub SearchOrder { > LEFT JOIN biblioitems ON biblioitems.biblionumber=biblio.biblionumber > LEFT JOIN aqbasket ON aqorders.basketno = aqbasket.basketno > WHERE aqbasket.booksellerid = ? AND aqorders.ordernumber = ? >- " >+ "; > }elsif ($id) { > $query = > "SELECT *,biblio.title >diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl >index c13eda3..6213762 100755 >--- a/acqui/orderreceive.pl >+++ b/acqui/orderreceive.pl >@@ -81,7 +81,7 @@ my $datereceived = C4::Dates->new($input->param('datereceived'),'iso') || C4::Da > my $catview = $input->param('catview'); > my $gst = $input->param('gst'); > >-my @results = SearchOrder( $search, $supplierid, $biblionumber, $catview ); >+my @results = SearchOrder( $search, $supplierid, $biblionumber, $catview, $input->param('is_search') ); > my $count = scalar @results; > my $order = GetOrder($search); > >@@ -188,15 +188,22 @@ else { > supplierid => $supplierid, > ); > } >- >-$template->param( >- date => format_date($date), >- datereceived => $datereceived->output(), >- datereceived_iso => $datereceived->output('iso'), >- invoice => $invoice, >- name => $bookseller->{'name'}, >- freight => $freight, >- gst => $gst, >-); >- >+if($bookseller){ >+ $template->param( >+ date => format_date($date), >+ datereceived => $datereceived->output(), >+ datereceived_iso => $datereceived->output('iso'), >+ invoice => $invoice, >+ name => $bookseller->{'name'}, >+ freight => $freight, >+ gst => $gst, >+ ); >+}else{ >+ print $input->redirect("parcel.pl?supplierid=$supplierid" >+ ."&datereceived=".$datereceived->output("iso") >+ ."&freight=$freight" >+ ."&gst=$gst" >+ ."&invoice=$invoice"); >+ exit; >+} > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl >index 8c14214..18bea9a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl >@@ -123,10 +123,13 @@ > <div id="acqui_receive_search"> > <h2>Search orders to add to this shipment</h2> > <form action="/cgi-bin/koha/acqui/orderreceive.pl"> >+ > <input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid" -->" /> > <input type="hidden" name="gst" value="<!-- TMPL_VAR NAME="gst" -->" /> > <input type="hidden" name="freight" value="<!-- TMPL_VAR NAME="freight" -->" /> > <input type="hidden" name="invoice" value="<!-- TMPL_VAR NAME="invoice" -->" /> >+ <input type="hidden" name="datereceived" value="<!-- TMPL_VAR ESCAPE="URL" NAME="invoicedatereceived" -->" /> >+ <input type="hidden" name="is_search" value="1" /> > <p><label for="receive">Search ISBN or Title:</label> <input type="text" size="25" id="receive" name="receive" /></p> > </form> > <table> <caption>or select a pending orders</caption> >-- >1.6.0.4 >
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 3356
: 1234