|
Lines 60-65
my ($template, $loggedinuser, $cookie, $userflags) = get_template_and_user({
Link Here
|
| 60 |
my $cgiparams = $input->Vars; |
60 |
my $cgiparams = $input->Vars; |
| 61 |
my $op = $cgiparams->{'op'} || ''; |
61 |
my $op = $cgiparams->{'op'} || ''; |
| 62 |
my $booksellerid = $input->param('booksellerid'); |
62 |
my $booksellerid = $input->param('booksellerid'); |
|
|
63 |
my $allmatch = $input->param('allmatch'); |
| 63 |
my $bookseller = Koha::Acquisition::Bookseller->fetch({ id => $booksellerid }); |
64 |
my $bookseller = Koha::Acquisition::Bookseller->fetch({ id => $booksellerid }); |
| 64 |
my $data; |
65 |
my $data; |
| 65 |
|
66 |
|
|
Lines 123-128
if ($op eq ""){
Link Here
|
| 123 |
$template->param("batch_details" => 1, |
124 |
$template->param("batch_details" => 1, |
| 124 |
"basketno" => $cgiparams->{'basketno'}, |
125 |
"basketno" => $cgiparams->{'basketno'}, |
| 125 |
loop_currencies => \@loop_currency, |
126 |
loop_currencies => \@loop_currency, |
|
|
127 |
"allmatch" => $allmatch, |
| 126 |
); |
128 |
); |
| 127 |
import_biblios_list($template, $cgiparams->{'import_batch_id'}); |
129 |
import_biblios_list($template, $cgiparams->{'import_batch_id'}); |
| 128 |
if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) { |
130 |
if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) { |
|
Lines 157-162
if ($op eq ""){
Link Here
|
| 157 |
# retrieve the file you want to import |
159 |
# retrieve the file you want to import |
| 158 |
my $import_batch_id = $cgiparams->{'import_batch_id'}; |
160 |
my $import_batch_id = $cgiparams->{'import_batch_id'}; |
| 159 |
my $biblios = GetImportRecordsRange($import_batch_id); |
161 |
my $biblios = GetImportRecordsRange($import_batch_id); |
|
|
162 |
my $duplinbatch; |
| 163 |
my $imported = 0; |
| 160 |
my @import_record_id_selected = $input->param("import_record_id"); |
164 |
my @import_record_id_selected = $input->param("import_record_id"); |
| 161 |
my @quantities = $input->param('quantity'); |
165 |
my @quantities = $input->param('quantity'); |
| 162 |
my @prices = $input->param('price'); |
166 |
my @prices = $input->param('price'); |
|
Lines 181-186
if ($op eq ""){
Link Here
|
| 181 |
|
185 |
|
| 182 |
# 1st insert the biblio, or find it through matcher |
186 |
# 1st insert the biblio, or find it through matcher |
| 183 |
unless ( $biblionumber ) { |
187 |
unless ( $biblionumber ) { |
|
|
188 |
$duplinbatch=$import_batch_id and next if FindDuplicate($marcrecord); |
| 184 |
# add the biblio |
189 |
# add the biblio |
| 185 |
my $bibitemnum; |
190 |
my $bibitemnum; |
| 186 |
|
191 |
|
|
Lines 284-292
if ($op eq ""){
Link Here
|
| 284 |
} else { |
289 |
} else { |
| 285 |
SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); |
290 |
SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); |
| 286 |
} |
291 |
} |
|
|
292 |
$imported++; |
| 287 |
} |
293 |
} |
| 288 |
# go to basket page |
294 |
# go to basket page |
| 289 |
print $input->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=".$cgiparams->{'basketno'}); |
295 |
if ( $imported ) { |
|
|
296 |
print $input->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=".$cgiparams->{'basketno'}."&duplinbatch=$duplinbatch"); |
| 297 |
} else { |
| 298 |
print $input->redirect("/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=$import_batch_id&basketno=".$cgiparams->{'basketno'}."&booksellerid=$booksellerid&allmatch=1"); |
| 299 |
} |
| 290 |
exit; |
300 |
exit; |
| 291 |
} |
301 |
} |
| 292 |
|
302 |
|