View | Details | Raw Unified | Return to bug 11759
Collapse All | Expand All

(-)a/circ/circulation.pl (-6 / +15 lines)
Lines 90-96 if (!C4::Context->userenv && !$branch){ Link Here
90
}
90
}
91
91
92
my $barcodes = [];
92
my $barcodes = [];
93
my $batch = $query->param('batch');
94
if ( my $barcode = $query->param('barcode') ) {
93
if ( my $barcode = $query->param('barcode') ) {
95
    $barcodes = [ $barcode ];
94
    $barcodes = [ $barcode ];
96
} else {
95
} else {
Lines 110-118 if ( my $barcode = $query->param('barcode') ) { Link Here
110
109
111
$barcodes = [ uniq @$barcodes ];
110
$barcodes = [ uniq @$barcodes ];
112
111
113
my $template_name = $batch
112
my $template_name = q|circ/circulation.tt|;
114
    ? q|circ/circulation_batch_checkouts.tt|
113
my $borrowernumber = $query->param('borrowernumber');
115
    : q|circ/circulation.tt|;
114
my $borrower = $borrowernumber ? GetMember( borrowernumber => $borrowernumber ) : undef;
115
my $batch = $query->param('batch');
116
my $batch_allowed = 0;
117
if ( $batch ) {
118
    $template_name = q|circ/circulation_batch_checkouts.tt|;
119
    my @batch_category_codes = split '\|', C4::Context->preference('batch_checkouts');
120
    if ( grep {/^$borrower->{categorycode}$/} @batch_category_codes ) {
121
        $batch_allowed = 1;
122
    } else {
123
        $barcodes = [];
124
    }
125
}
116
126
117
my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
127
my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
118
    {
128
    {
Lines 143-149 for (@failedreturns) { $return_failed{$_} = 1; } Link Here
143
153
144
my $findborrower = $query->param('findborrower') || q{};
154
my $findborrower = $query->param('findborrower') || q{};
145
$findborrower =~ s|,| |g;
155
$findborrower =~ s|,| |g;
146
my $borrowernumber = $query->param('borrowernumber');
147
156
148
$branch  = C4::Context->userenv->{'branch'};  
157
$branch  = C4::Context->userenv->{'branch'};  
149
$printer = C4::Context->userenv->{'branchprinter'};
158
$printer = C4::Context->userenv->{'branchprinter'};
Lines 259-265 if ($findborrower) { Link Here
259
}
268
}
260
269
261
# get the borrower information.....
270
# get the borrower information.....
262
my $borrower;
263
if ($borrowernumber) {
271
if ($borrowernumber) {
264
    $borrower = GetMemberDetails( $borrowernumber, 0 );
272
    $borrower = GetMemberDetails( $borrowernumber, 0 );
265
    my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
273
    my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
Lines 591-596 $template->param( Link Here
591
    inprocess         => $inprocess,
599
    inprocess         => $inprocess,
592
    is_child          => ($borrowernumber && $borrower->{'category_type'} eq 'C'),
600
    is_child          => ($borrowernumber && $borrower->{'category_type'} eq 'C'),
593
    $view             => 1,
601
    $view             => 1,
602
    batch_allowed     => $batch_allowed,
594
    soundon           => C4::Context->preference("SoundOn"),
603
    soundon           => C4::Context->preference("SoundOn"),
595
    fast_cataloging   => $fast_cataloging,
604
    fast_cataloging   => $fast_cataloging,
596
    CircAutoPrintQuickSlip   => C4::Context->preference("CircAutoPrintQuickSlip"),
605
    CircAutoPrintQuickSlip   => C4::Context->preference("CircAutoPrintQuickSlip"),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (-1 / +1 lines)
Lines 65-71 Link Here
65
<ul>
65
<ul>
66
    [% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]">Check out</a></li>
66
    [% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]">Check out</a></li>
67
    [% IF Koha.Preference('batch_checkouts').split('\|').grep(categorycode).size > 0 %]
67
    [% IF Koha.Preference('batch_checkouts').split('\|').grep(categorycode).size > 0 %]
68
      [% IF ( batch_checkout_view ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]&amp;batch=1">Batch check out</a></li>
68
      [% IF ( batch_checkout_view ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]&amp;batch=1">Batch check out</a></li>
69
    [% END %]
69
    [% END %]
70
    [% IF ( CAN_user_borrowers ) %]
70
    [% IF ( CAN_user_borrowers ) %]
71
        [% IF ( detailview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Details</a></li>
71
        [% IF ( detailview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Details</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt (-4 / +4 lines)
Lines 19-25 Link Here
19
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>[% END %]
19
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>[% END %]
20
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
20
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
21
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script>
21
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script>
22
<script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script>
23
<script type="text/javascript">
22
<script type="text/javascript">
24
//<![CDATA[
23
//<![CDATA[
25
$(document).ready(function() {
24
$(document).ready(function() {
Lines 54-60 $(document).ready(function() { Link Here
54
53
55
<div class="yui-g">
54
<div class="yui-g">
56
55
57
[% UNLESS checkout_infos %]
56
[% IF NOT batch_allowed %]
57
  <div class="dialog message">You are not allowed to use batch checkout for this patron</div>
58
[% ELSIF NOT checkout_infos %]
58
  <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl">
59
  <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl">
59
    <fieldset id="circ_circulation_issue">
60
    <fieldset id="circ_circulation_issue">
60
      <label for="barcode">Checking out a batch to [% INCLUDE 'patron-title.inc' %]</label>
61
      <label for="barcode">Checking out a batch to [% INCLUDE 'patron-title.inc' %]</label>
Lines 172-178 $(document).ready(function() { Link Here
172
173
173
                  [% IF NOT checkout_info.IMPOSSIBLE && ( CAN_user_circulate_force_checkout or checkout_info.HIGHHOLDS ) %]
174
                  [% IF NOT checkout_info.IMPOSSIBLE && ( CAN_user_circulate_force_checkout or checkout_info.HIGHHOLDS ) %]
174
                      [% IF checkout_info.RESERVED || checkout_info.RESERVE_WAITING %] <!-- arbitrary choice, revert the reserve is not possible-->
175
                      [% IF checkout_info.RESERVED || checkout_info.RESERVE_WAITING %] <!-- arbitrary choice, revert the reserve is not possible-->
175
                      <p>The hold will be canceled.</p>
176
                        <p>This item is on hold for another patron. The hold will be overridden, but not cancelled.</p>
176
                      [% END %]
177
                      [% END %]
177
                  [% END %]
178
                  [% END %]
178
                </p>
179
                </p>
179
- 

Return to bug 11759