3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 2 of the License, or (at your option) any later
10 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along with
15 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
16 # Suite 330, Boston, MA 02111-1307 USA
25 this script allow to add an order from a existing suggestion.
26 The suggestion must have 'ACCEPTED' as status.
34 the number of this basket.
38 the bookseller who sells this record.
42 to filter on title when searching among ACCEPTED suggestion.
46 to filter on author when searching among ACCEPTED suggestion.
50 to filter on note when searching among ACCEPTED suggestion.
60 the publication year of this record.
66 the isbn of this suggestion.
70 is the biblionumber to put to the new suggestion.
74 the id of the suggestion to select.
80 then call to the function : ConnectSuggestionAndBiblio.
81 i.e set the biblionumber of this suggestion.
92 use C4
::Auth
; # get_template_and_user
100 # getting the CGI params
101 my $basketno = $input->param('basketno');
102 my $supplierid = $input->param('booksellerid');
103 my $author = $input->param('author');
104 my $title = $input->param('title');
105 my $publishercode = $input->param('publishercode');
106 my $op = $input->param('op');
107 my $suggestionid = $input->param('suggestionid');
108 my $duplicateNumber = $input->param('duplicateNumber');
109 my $uncertainprice = $input->param('uncertainprice');
111 $op = 'else' unless $op;
113 my $dbh = C4
::Context
->dbh;
114 my ( $template, $borrowernumber, $cookie ) = get_template_and_user
(
116 template_name
=> "acqui/newordersuggestion.tmpl",
119 authnotrequired
=> 1,
120 flagsrequired
=> { acquisition
=> 'order_manage' },
124 if ( $op eq 'connectDuplicate' ) {
125 ConnectSuggestionAndBiblio
( $suggestionid, $duplicateNumber );
128 # getting all suggestions.
129 my $suggestions_loop =
131 { managedby
=> $borrowernumber,
134 publishercode
=> $publishercode,
135 status
=> 'ACCEPTED'});
136 my $vendor = GetBookSellerFromId
($supplierid);
138 suggestions_loop
=> $suggestions_loop,
139 basketno
=> $basketno,
140 supplierid
=> $supplierid,
141 name
=> $vendor->{'name'},
145 output_html_with_http_headers
$input, $cookie, $template->output;