View | Details | Raw Unified | Return to bug 3356
Collapse All | Expand All

(-)a/C4/Acquisition.pm (-3 / +3 lines)
Lines 677-683 C<@results> is an array of references-to-hash with the following keys: Link Here
677
=cut
677
=cut
678
678
679
sub SearchOrder {
679
sub SearchOrder {
680
    my ( $search, $id, $biblionumber, $catview ) = @_;
680
    my ( $search, $id, $biblionumber, $catview, $is_search ) = @_;
681
    my $dbh = C4::Context->dbh;
681
    my $dbh = C4::Context->dbh;
682
    my @data = split( ' ', $search );
682
    my @data = split( ' ', $search );
683
    my @searchterms;
683
    my @searchterms;
Lines 688-694 sub SearchOrder { Link Here
688
    push( @searchterms, $search, $search, $biblionumber );
688
    push( @searchterms, $search, $search, $biblionumber );
689
    my $query;
689
    my $query;
690
  ### FIXME  THIS CAN raise a problem if more THAN ONE biblioitem is linked to one biblio  
690
  ### FIXME  THIS CAN raise a problem if more THAN ONE biblioitem is linked to one biblio  
691
    if($id and $search){
691
    if($id and $search and not $is_search){
692
        @searchterms = ($id, $search);
692
        @searchterms = ($id, $search);
693
        $query =
693
        $query =
694
          "SELECT *,biblio.title
694
          "SELECT *,biblio.title
Lines 697-703 sub SearchOrder { Link Here
697
             LEFT JOIN biblioitems ON biblioitems.biblionumber=biblio.biblionumber
697
             LEFT JOIN biblioitems ON biblioitems.biblionumber=biblio.biblionumber
698
             LEFT JOIN aqbasket ON aqorders.basketno = aqbasket.basketno
698
             LEFT JOIN aqbasket ON aqorders.basketno = aqbasket.basketno
699
             WHERE aqbasket.booksellerid = ? AND aqorders.ordernumber = ?
699
             WHERE aqbasket.booksellerid = ? AND aqorders.ordernumber = ?
700
          "
700
          ";
701
    }elsif ($id) {  
701
    }elsif ($id) {  
702
        $query =
702
        $query =
703
          "SELECT *,biblio.title 
703
          "SELECT *,biblio.title 
(-)a/acqui/orderreceive.pl (-12 / +19 lines)
Lines 81-87 my $datereceived = C4::Dates->new($input->param('datereceived'),'iso') || C4::Da Link Here
81
my $catview      = $input->param('catview');
81
my $catview      = $input->param('catview');
82
my $gst          = $input->param('gst');
82
my $gst          = $input->param('gst');
83
83
84
my @results = SearchOrder( $search, $supplierid, $biblionumber, $catview );
84
my @results = SearchOrder( $search, $supplierid, $biblionumber, $catview, $input->param('is_search') );
85
my $count   = scalar @results;
85
my $count   = scalar @results;
86
my $order 	= GetOrder($search);
86
my $order 	= GetOrder($search);
87
87
Lines 188-202 else { Link Here
188
        supplierid   => $supplierid,
188
        supplierid   => $supplierid,
189
    );
189
    );
190
}
190
}
191
191
if($bookseller){
192
$template->param(
192
    $template->param(
193
    date             => format_date($date),
193
        date             => format_date($date),
194
    datereceived     => $datereceived->output(),
194
        datereceived     => $datereceived->output(),
195
    datereceived_iso => $datereceived->output('iso'),
195
        datereceived_iso => $datereceived->output('iso'),
196
    invoice          => $invoice,
196
        invoice          => $invoice,
197
    name             => $bookseller->{'name'},
197
        name             => $bookseller->{'name'},
198
    freight          => $freight,
198
        freight          => $freight,
199
    gst              => $gst,
199
        gst              => $gst,
200
);
200
    );
201
201
}else{
202
    print $input->redirect("parcel.pl?supplierid=$supplierid"
203
                           ."&datereceived=".$datereceived->output("iso")
204
                           ."&freight=$freight"
205
                           ."&gst=$gst"
206
                           ."&invoice=$invoice");
207
    exit;
208
}
202
output_html_with_http_headers $input, $cookie, $template->output;
209
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl (-1 / +3 lines)
Lines 123-132 Link Here
123
<div id="acqui_receive_search">
123
<div id="acqui_receive_search">
124
    <h2>Search orders to add to this shipment</h2>
124
    <h2>Search orders to add to this shipment</h2>
125
    <form action="/cgi-bin/koha/acqui/orderreceive.pl">
125
    <form action="/cgi-bin/koha/acqui/orderreceive.pl">
126
    	
126
        <input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid" -->" />
127
        <input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid" -->" />
127
        <input type="hidden" name="gst" value="<!-- TMPL_VAR NAME="gst" -->" />
128
        <input type="hidden" name="gst" value="<!-- TMPL_VAR NAME="gst" -->" />
128
        <input type="hidden" name="freight" value="<!-- TMPL_VAR NAME="freight" -->" />
129
        <input type="hidden" name="freight" value="<!-- TMPL_VAR NAME="freight" -->" />
129
        <input type="hidden" name="invoice" value="<!-- TMPL_VAR NAME="invoice" -->" />
130
        <input type="hidden" name="invoice" value="<!-- TMPL_VAR NAME="invoice" -->" />
131
        <input type="hidden" name="datereceived" value="<!-- TMPL_VAR ESCAPE="URL" NAME="invoicedatereceived" -->" />
132
        <input type="hidden" name="is_search" value="1" />
130
        <p><label for="receive">Search ISBN or Title:</label> <input type="text" size="25" id="receive" name="receive" /></p>
133
        <p><label for="receive">Search ISBN or Title:</label> <input type="text" size="25" id="receive" name="receive" /></p>
131
    </form>
134
    </form>
132
    <table> <caption>or select a pending orders</caption>
135
    <table> <caption>or select a pending orders</caption>
133
- 

Return to bug 3356