@@ -, +, @@ ReferenceError: MSG_ADD_MESSAGE is not defined - Search for a patron without checkout. - Check an item out using the "normal" checkout. - Verify the checkout list contain the checkout. --- circ/circulation.pl | 23 ++++++++++++++------ .../intranet-tmpl/prog/en/includes/circ-menu.inc | 2 +- .../en/modules/circ/circulation_batch_checkouts.tt | 7 +++--- 3 files changed, 21 insertions(+), 11 deletions(-) --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -88,7 +88,6 @@ if (!C4::Context->userenv && !$branch){ } my $barcodes = []; -my $batch = $query->param('batch'); if ( my $barcode = $query->param('barcode') ) { $barcodes = [ $barcode ]; } else { @@ -108,9 +107,20 @@ if ( my $barcode = $query->param('barcode') ) { $barcodes = [ uniq @$barcodes ]; -my $template_name = $batch - ? q|circ/circulation_batch_checkouts.tt| - : q|circ/circulation.tt|; +my $template_name = q|circ/circulation.tt|; +my $borrowernumber = $query->param('borrowernumber'); +my $borrower = $borrowernumber ? GetMember( borrowernumber => $borrowernumber ) : undef; +my $batch = $query->param('batch'); +my $batch_allowed = 0; +if ( $batch ) { + $template_name = q|circ/circulation_batch_checkouts.tt|; + my @batch_category_codes = split '\|', C4::Context->preference('batch_checkouts'); + if ( grep {/^$borrower->{categorycode}$/} @batch_category_codes ) { + $batch_allowed = 1; + } else { + $barcodes = []; + } +} my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( { @@ -141,7 +151,6 @@ for (@failedreturns) { $return_failed{$_} = 1; } my $findborrower = $query->param('findborrower') || q{}; $findborrower =~ s|,| |g; -my $borrowernumber = $query->param('borrowernumber'); $branch = C4::Context->userenv->{'branch'}; $printer = C4::Context->userenv->{'branchprinter'}; @@ -255,7 +264,6 @@ if ($findborrower) { } # get the borrower information..... -my $borrower; if ($borrowernumber) { $borrower = GetMemberDetails( $borrowernumber, 0 ); my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); @@ -407,7 +415,7 @@ if (@$barcodes) { # FIXME If the issue is confirmed, we launch another time GetMemberIssuesAndFines, now display the issue count after issue my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); - $iteminfo->{issuecount} = $issue; + $template_params->{issuecount} = $issue; if ( $iteminfo ) { $iteminfo->{subtitle} = GetRecordValue('subtitle', GetMarcBiblio($iteminfo->{biblionumber}), GetFrameworkCode($iteminfo->{biblionumber})); @@ -645,6 +653,7 @@ $template->param( inprocess => $inprocess, is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), $view => 1, + batch_allowed => $batch_allowed, soundon => C4::Context->preference("SoundOn"), fast_cataloging => $fast_cataloging, CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -65,7 +65,7 @@