}
}
( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $cgiparams->{'frameworkcode'} || '' );
+ SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
# 2nd add authorities if applicable
if (C4::Context->preference("BiblioAddsAuthorities")){
my $headings_linked =BiblioAutoLink($marcrecord, $cgiparams->{'frameworkcode'});
my ( $biblionumber, $bibitemnum, $itemnumber ) = AddItemFromMarc( $record, $biblionumber );
NewOrderItem( $itemnumber, $ordernumber );
}
+ } else {
+ SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
}
}
# go to basket page
foreach my $batch (@$batches) {
if ( $batch->{'import_status'} =~ /^staged$|^reverted$/ ) {
# check if there is at least 1 line still staged
- my $stagedList=GetImportRecordsRange($batch->{'import_batch_id'}, undef, undef, $batch->{import_status});
+ my $stagedList=GetImportRecordsRange($batch->{'import_batch_id'}, undef, undef, $batch->{import_status}, { order_by_direction => 'ASC' });
if (scalar @$stagedList) {
push @list, {
import_batch_id => $batch->{'import_batch_id'},
- num_biblios => $batch->{'num_biblios'},
+ num_records => $batch->{'num_records'},
num_items => $batch->{'num_items'},
staged_date => $batch->{'upload_timestamp'},
import_status => $batch->{'import_status'},
push @list, \%cellrecord;
}
- my $num_biblios = $batch->{'num_biblios'};
+ my $num_records = $batch->{'num_records'};
my $overlay_action = GetImportBatchOverlayAction($import_batch_id);
my $nomatch_action = GetImportBatchNoMatchAction($import_batch_id);
my $item_action = GetImportBatchItemAction($import_batch_id);
$template->param(biblio_list => \@list,
- num_results => $num_biblios,
+ num_results => $num_records,
import_batch_id => $import_batch_id,
"overlay_action_${overlay_action}" => 1,
overlay_action => $overlay_action,
comments => $batch->{'comments'},
import_status => $batch->{'import_status'},
upload_timestamp => $batch->{'upload_timestamp'},
- num_biblios => $batch->{'num_biblios'},
- num_items => $batch->{'num_biblios'});
- if ($batch->{'num_biblios'} > 0) {
+ num_records => $batch->{'num_records'},
+ num_items => $batch->{'num_items'});
+ if ($batch->{'num_records'} > 0) {
if ($batch->{'import_status'} eq 'staged' or $batch->{'import_status'} eq 'reverted') {
$template->param(can_commit => 1);
}