Lines 88-94
if (!C4::Context->userenv && !$branch){
Link Here
|
88 |
} |
88 |
} |
89 |
|
89 |
|
90 |
my $barcodes = []; |
90 |
my $barcodes = []; |
91 |
my $batch = $query->param('batch'); |
|
|
92 |
if ( my $barcode = $query->param('barcode') ) { |
91 |
if ( my $barcode = $query->param('barcode') ) { |
93 |
$barcodes = [ $barcode ]; |
92 |
$barcodes = [ $barcode ]; |
94 |
} else { |
93 |
} else { |
Lines 108-116
if ( my $barcode = $query->param('barcode') ) {
Link Here
|
108 |
|
107 |
|
109 |
$barcodes = [ uniq @$barcodes ]; |
108 |
$barcodes = [ uniq @$barcodes ]; |
110 |
|
109 |
|
111 |
my $template_name = $batch |
110 |
my $template_name = q|circ/circulation.tt|; |
112 |
? q|circ/circulation_batch_checkouts.tt| |
111 |
my $borrowernumber = $query->param('borrowernumber'); |
113 |
: q|circ/circulation.tt|; |
112 |
my $borrower = $borrowernumber ? GetMember( borrowernumber => $borrowernumber ) : undef; |
|
|
113 |
my $batch = $query->param('batch'); |
114 |
my $batch_allowed = 0; |
115 |
if ( $batch ) { |
116 |
$template_name = q|circ/circulation_batch_checkouts.tt|; |
117 |
my @batch_category_codes = split '\|', C4::Context->preference('batch_checkouts'); |
118 |
if ( grep {/^$borrower->{categorycode}$/} @batch_category_codes ) { |
119 |
$batch_allowed = 1; |
120 |
} else { |
121 |
$barcodes = []; |
122 |
} |
123 |
} |
114 |
|
124 |
|
115 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( |
125 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( |
116 |
{ |
126 |
{ |
Lines 141-147
for (@failedreturns) { $return_failed{$_} = 1; }
Link Here
|
141 |
|
151 |
|
142 |
my $findborrower = $query->param('findborrower') || q{}; |
152 |
my $findborrower = $query->param('findborrower') || q{}; |
143 |
$findborrower =~ s|,| |g; |
153 |
$findborrower =~ s|,| |g; |
144 |
my $borrowernumber = $query->param('borrowernumber'); |
|
|
145 |
|
154 |
|
146 |
$branch = C4::Context->userenv->{'branch'}; |
155 |
$branch = C4::Context->userenv->{'branch'}; |
147 |
$printer = C4::Context->userenv->{'branchprinter'}; |
156 |
$printer = C4::Context->userenv->{'branchprinter'}; |
Lines 255-261
if ($findborrower) {
Link Here
|
255 |
} |
264 |
} |
256 |
|
265 |
|
257 |
# get the borrower information..... |
266 |
# get the borrower information..... |
258 |
my $borrower; |
|
|
259 |
if ($borrowernumber) { |
267 |
if ($borrowernumber) { |
260 |
$borrower = GetMemberDetails( $borrowernumber, 0 ); |
268 |
$borrower = GetMemberDetails( $borrowernumber, 0 ); |
261 |
my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); |
269 |
my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); |
Lines 407-413
if (@$barcodes) {
Link Here
|
407 |
|
415 |
|
408 |
# FIXME If the issue is confirmed, we launch another time GetMemberIssuesAndFines, now display the issue count after issue |
416 |
# FIXME If the issue is confirmed, we launch another time GetMemberIssuesAndFines, now display the issue count after issue |
409 |
my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); |
417 |
my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); |
410 |
$iteminfo->{issuecount} = $issue; |
418 |
$template_params->{issuecount} = $issue; |
411 |
|
419 |
|
412 |
if ( $iteminfo ) { |
420 |
if ( $iteminfo ) { |
413 |
$iteminfo->{subtitle} = GetRecordValue('subtitle', GetMarcBiblio($iteminfo->{biblionumber}), GetFrameworkCode($iteminfo->{biblionumber})); |
421 |
$iteminfo->{subtitle} = GetRecordValue('subtitle', GetMarcBiblio($iteminfo->{biblionumber}), GetFrameworkCode($iteminfo->{biblionumber})); |
Lines 645-650
$template->param(
Link Here
|
645 |
inprocess => $inprocess, |
653 |
inprocess => $inprocess, |
646 |
is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), |
654 |
is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), |
647 |
$view => 1, |
655 |
$view => 1, |
|
|
656 |
batch_allowed => $batch_allowed, |
648 |
soundon => C4::Context->preference("SoundOn"), |
657 |
soundon => C4::Context->preference("SoundOn"), |
649 |
fast_cataloging => $fast_cataloging, |
658 |
fast_cataloging => $fast_cataloging, |
650 |
CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"), |
659 |
CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"), |