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

(-)a/circ/circulation.pl (-7 / +16 lines)
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"),
(-)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