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

(-)a/circ/circulation.pl (-149 / +145 lines)
Lines 52-80 my $query = new CGI; Link Here
52
my $sessionID = $query->cookie("CGISESSID") ;
52
my $sessionID = $query->cookie("CGISESSID") ;
53
my $session = get_session($sessionID);
53
my $session = get_session($sessionID);
54
54
55
# new op dev the branch and the printer are now defined by the userenv
55
# branch and printer are now defined by the userenv
56
# but first we have to check if someone has tried to change them
56
# but first we have to check if someone has tried to change them
57
57
58
my $branch = $query->param('branch');
58
my $branch = $query->param('branch');
59
if ($branch){
59
if ($branch){
60
    # update our session so the userenv is updated
60
    # update our session so the userenv is updated
61
    $session->param('branch',$branch);
61
    $session->param('branch', $branch);
62
    my $branchname = GetBranchName($branch);
62
    $session->param('branchname', GetBranchName($branch));
63
    $session->param('branchname',$branchname);
64
}
63
}
65
64
66
my $printer = $query->param('printer');
65
my $printer = $query->param('printer');
67
if ($printer){
66
if ($printer){
68
    # update our session so the userenv is updated
67
    # update our session so the userenv is updated
69
    $session->param('branchprinter',$printer);
68
    $session->param('branchprinter', $printer);
70
}
69
}
71
70
72
if (!C4::Context->userenv && !$branch){
71
if (!C4::Context->userenv && !$branch){
73
  if ($session->param('branch') eq 'NO_LIBRARY_SET'){
72
    if ($session->param('branch') eq 'NO_LIBRARY_SET'){
74
    # no branch set we can't issue
73
        # no branch set we can't issue
75
    print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
74
        print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
76
    exit;
75
        exit;
77
  }
76
    }
78
}
77
}
79
78
80
my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
79
my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
Lines 88-113 my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( Link Here
88
);
87
);
89
88
90
my $branches = GetBranches();
89
my $branches = GetBranches();
91
my $printers = GetPrinters();
92
90
93
my @failedrenews = $query->param('failedrenew');
91
my @failedrenews = $query->param('failedrenew');    # expected to be itemnumbers 
94
my %renew_failed;
92
my %renew_failed;
95
for (@failedrenews) { $renew_failed{$_} = 1; } 
93
for (@failedrenews) { $renew_failed{$_} = 1; }
96
94
97
my $findborrower = $query->param('findborrower');
95
my $findborrower = $query->param('findborrower');
98
$findborrower =~ s|,| |g;
96
$findborrower =~ s|,| |g;
99
#$findborrower =~ s|'| |g;
100
my $borrowernumber = $query->param('borrowernumber');
97
my $borrowernumber = $query->param('borrowernumber');
101
98
102
$branch  = C4::Context->userenv->{'branch'};  
99
$branch  = C4::Context->userenv->{'branch'};  
103
$printer = C4::Context->userenv->{'branchprinter'};
100
$printer = C4::Context->userenv->{'branchprinter'};
104
101
105
102
106
# If Autolocated is not activated, we show the Circulation Parameters to chage settings of librarian
103
# If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian
107
if (C4::Context->preference("AutoLocation") ne 1) { # FIXME: string comparison to number
104
if (C4::Context->preference("AutoLocation") != 1) {
108
    $template->param(ManualLocation => 1);
105
    $template->param(ManualLocation => 1);
109
}
106
}
110
107
108
if (C4::Context->preference("DisplayClearScreenButton")) {
109
    $template->param(DisplayClearScreenButton => 1);
110
}
111
111
my $barcode        = $query->param('barcode') || '';
112
my $barcode        = $query->param('barcode') || '';
112
$barcode =~  s/^\s*|\s*$//g; # remove leading/trailing whitespace
113
$barcode =~  s/^\s*|\s*$//g; # remove leading/trailing whitespace
113
114
Lines 131-145 if ( $barcode ) { Link Here
131
    }
132
    }
132
}
133
}
133
134
134
#set up cookie.....
135
# my $branchcookie;
136
# my $printercookie;
137
# if ($query->param('setcookies')) {
138
#     $branchcookie = $query->cookie(-name=>'branch', -value=>"$branch", -expires=>'+1y');
139
#     $printercookie = $query->cookie(-name=>'printer', -value=>"$printer", -expires=>'+1y');
140
# }
141
#
142
143
my ($datedue,$invalidduedate,$globalduedate);
135
my ($datedue,$invalidduedate,$globalduedate);
144
136
145
if(C4::Context->preference('globalDueDate') && (C4::Context->preference('globalDueDate') =~ C4::Dates->regexp('syspref'))){
137
if(C4::Context->preference('globalDueDate') && (C4::Context->preference('globalDueDate') =~ C4::Dates->regexp('syspref'))){
Lines 148-166 if(C4::Context->preference('globalDueDate') && (C4::Context->preference('globalD Link Here
148
my $duedatespec_allow = C4::Context->preference('SpecifyDueDate');
140
my $duedatespec_allow = C4::Context->preference('SpecifyDueDate');
149
if($duedatespec_allow){
141
if($duedatespec_allow){
150
    if ($duedatespec) {
142
    if ($duedatespec) {
151
    	if ($duedatespec =~ C4::Dates->regexp('syspref')) {
143
        if ($duedatespec =~ C4::Dates->regexp('syspref')) {
152
    		my $tempdate = C4::Dates->new($duedatespec);
144
            my $tempdate = C4::Dates->new($duedatespec);
153
    		if ($tempdate and $tempdate->output('iso') gt C4::Dates->new()->output('iso')) {
145
            if ($tempdate and $tempdate->output('iso') gt C4::Dates->new()->output('iso')) {
154
    			# i.e., it has to be later than today/now
146
                # i.e., it has to be later than today/now
155
    			$datedue = $tempdate;
147
                $datedue = $tempdate;
156
    		} else {
148
            } else {
157
    			$invalidduedate = 1;
149
                $invalidduedate = 1;
158
    			$template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
150
                $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
159
    		}
151
            }
160
    	} else {
152
        } else {
161
    		$invalidduedate = 1;
153
            $invalidduedate = 1;
162
    		$template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
154
            $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
163
    	}
155
        }
164
    } else {
156
    } else {
165
        # pass global due date to tmpl if specifyduedate is true 
157
        # pass global due date to tmpl if specifyduedate is true 
166
        # and we have no barcode (loading circ page but not checking out)
158
        # and we have no barcode (loading circ page but not checking out)
Lines 170-176 if($duedatespec_allow){ Link Here
170
        }
162
        }
171
    }
163
    }
172
} else {
164
} else {
173
    $datedue = $globalduedate if($globalduedate);
165
    $datedue = $globalduedate if ($globalduedate);
174
}
166
}
175
167
176
my $todaysdate = C4::Dates->new->output('iso');
168
my $todaysdate = C4::Dates->new->output('iso');
Lines 229-235 if ($findborrower) { Link Here
229
221
230
# get the borrower information.....
222
# get the borrower information.....
231
my $borrower;
223
my $borrower;
232
my @lines;
233
if ($borrowernumber) {
224
if ($borrowernumber) {
234
    $borrower = GetMemberDetails( $borrowernumber, 0 );
225
    $borrower = GetMemberDetails( $borrowernumber, 0 );
235
    my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
226
    my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
Lines 239-247 if ($borrowernumber) { Link Here
239
    my ($warning_year, $warning_month, $warning_day) = split /-/, $borrower->{'dateexpiry'};
230
    my ($warning_year, $warning_month, $warning_day) = split /-/, $borrower->{'dateexpiry'};
240
    my (  $enrol_year,   $enrol_month,   $enrol_day) = split /-/, $borrower->{'dateenrolled'};
231
    my (  $enrol_year,   $enrol_month,   $enrol_day) = split /-/, $borrower->{'dateenrolled'};
241
    # Renew day is calculated by adding the enrolment period to today
232
    # Renew day is calculated by adding the enrolment period to today
242
    my (  $renew_year,   $renew_month,   $renew_day) =
233
    my (  $renew_year,   $renew_month,   $renew_day);
243
      Add_Delta_YM( $enrol_year, $enrol_month, $enrol_day,
234
    if ($enrol_year*$enrol_month*$enrol_day>0) {
244
        0 , $borrower->{'enrolmentperiod'}) if ($enrol_year*$enrol_month*$enrol_day>0);
235
        (  $renew_year,   $renew_month,   $renew_day) =
236
        Add_Delta_YM( $enrol_year, $enrol_month, $enrol_day,
237
            0 , $borrower->{'enrolmentperiod'});
238
    }
245
    # if the expiry date is before today ie they have expired
239
    # if the expiry date is before today ie they have expired
246
    if ( $warning_year*$warning_month*$warning_day==0 
240
    if ( $warning_year*$warning_month*$warning_day==0 
247
        || Date_to_Days($today_year,     $today_month, $today_day  ) 
241
        || Date_to_Days($today_year,     $today_month, $today_day  ) 
Lines 266-272 if ($borrowernumber) { Link Here
266
        if (C4::Context->preference('ReturnBeforeExpiry')){
260
        if (C4::Context->preference('ReturnBeforeExpiry')){
267
            $template->param("returnbeforeexpiry" => 1);
261
            $template->param("returnbeforeexpiry" => 1);
268
        }
262
        }
269
  }
263
    }
270
    $template->param(
264
    $template->param(
271
        overduecount => $od,
265
        overduecount => $od,
272
        issuecount   => $issue,
266
        issuecount   => $issue,
Lines 279-322 if ($borrowernumber) { Link Here
279
#
273
#
280
#
274
#
281
if ($barcode) {
275
if ($barcode) {
282
  # always check for blockers on issuing
276
    # always check for blockers on issuing
283
  my ( $error, $question ) =
277
    my ( $error, $question ) =
284
    CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess );
278
    CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess );
285
  my $blocker = $invalidduedate ? 1 : 0;
279
    my $blocker = $invalidduedate ? 1 : 0;
286
280
287
  delete $question->{'DEBT'} if ($debt_confirmed);
281
    delete $question->{'DEBT'} if ($debt_confirmed);
288
  foreach my $impossible ( keys %$error ) {
282
    foreach my $impossible ( keys %$error ) {
289
            $template->param(
283
        $template->param(
290
                $impossible => $$error{$impossible},
284
            $impossible => $$error{$impossible},
291
                IMPOSSIBLE  => 1
285
            IMPOSSIBLE  => 1
292
            );
286
        );
293
            $blocker = 1;
287
        $blocker = 1;
294
        }
288
    }
295
    if( !$blocker ){
289
    if( !$blocker ){
296
        my $confirm_required = 0;
290
        my $confirm_required = 0;
297
    	unless($issueconfirmed){
291
        unless($issueconfirmed){
298
            #  Get the item title for more information
292
            #  Get the item title for more information
299
            my $getmessageiteminfo  = GetBiblioFromItemNumber(undef,$barcode);
293
            my $getmessageiteminfo  = GetBiblioFromItemNumber(undef,$barcode);
300
		    $template->param( itemhomebranch => $getmessageiteminfo->{'homebranch'} );
294
            $template->param( itemhomebranch => $getmessageiteminfo->{'homebranch'} );
301
295
302
		    # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
296
            # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
303
       	    foreach my $needsconfirmation ( keys %$question ) {
297
            foreach my $needsconfirmation ( keys %$question ) {
304
       	        $template->param(
298
                $template->param(
305
       	            $needsconfirmation => $$question{$needsconfirmation},
299
                    $needsconfirmation => $$question{$needsconfirmation},
306
       	            getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
300
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
307
       	            NEEDSCONFIRMATION  => 1
301
                    NEEDSCONFIRMATION  => 1
308
       	        );
302
                );
309
       	        $confirm_required = 1;
303
                $confirm_required = 1;
310
       	    }
304
            }
311
		}
305
        }
312
        unless($confirm_required) {
306
        unless($confirm_required) {
313
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve );
307
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve );
314
			$inprocess = 1;
308
            $inprocess = 1;
315
            if($globalduedate && ! $stickyduedate && $duedatespec_allow ){
309
            if($globalduedate && ! $stickyduedate && $duedatespec_allow ){
316
                $duedatespec = $globalduedate->output();
310
                $duedatespec = $globalduedate->output();
317
                $stickyduedate = 1;
311
                $stickyduedate = 1;
318
            }
312
            }
319
		}
313
        }
320
    }
314
    }
321
    
315
    
322
    # FIXME If the issue is confirmed, we launch another time GetMemberIssuesAndFines, now display the issue count after issue 
316
    # FIXME If the issue is confirmed, we launch another time GetMemberIssuesAndFines, now display the issue count after issue 
Lines 332-339 if ($borrowernumber) { Link Here
332
##################################################################################
326
##################################################################################
333
# BUILD HTML
327
# BUILD HTML
334
# show all reserves of this borrower, and the position of the reservation ....
328
# show all reserves of this borrower, and the position of the reservation ....
335
my $borrowercategory;
336
my $category_type;
337
if ($borrowernumber) {
329
if ($borrowernumber) {
338
330
339
    # new op dev
331
    # new op dev
Lines 361-367 if ($borrowernumber) { Link Here
361
        $getreserv{barcodereserv}  = $getiteminfo->{'barcode'};
353
        $getreserv{barcodereserv}  = $getiteminfo->{'barcode'};
362
        $getreserv{itemcallnumber} = $getiteminfo->{'itemcallnumber'};
354
        $getreserv{itemcallnumber} = $getiteminfo->{'itemcallnumber'};
363
        $getreserv{biblionumber}   = $getiteminfo->{'biblionumber'};
355
        $getreserv{biblionumber}   = $getiteminfo->{'biblionumber'};
364
        $getreserv{waitingat}    = GetBranchName( $num_res->{'branchcode'} );
356
        $getreserv{waitingat}      = GetBranchName( $num_res->{'branchcode'} );
365
        #         check if we have a waiting status for reservations
357
        #         check if we have a waiting status for reservations
366
        if ( $num_res->{'found'} eq 'W' ) {
358
        if ( $num_res->{'found'} eq 'W' ) {
367
            $getreserv{color}   = 'reserved';
359
            $getreserv{color}   = 'reserved';
Lines 373-379 if ($borrowernumber) { Link Here
373
        $getWaitingReserveInfo{author}       = $getiteminfo->{'author'};
365
        $getWaitingReserveInfo{author}       = $getiteminfo->{'author'};
374
        $getWaitingReserveInfo{reservedate}  = format_date( $num_res->{'reservedate'} );
366
        $getWaitingReserveInfo{reservedate}  = format_date( $num_res->{'reservedate'} );
375
        $getWaitingReserveInfo{waitingat}    = GetBranchName( $num_res->{'branchcode'} );
367
        $getWaitingReserveInfo{waitingat}    = GetBranchName( $num_res->{'branchcode'} );
376
      if($num_res->{'branchcode'} eq $branch){ $getWaitingReserveInfo{waitinghere} = 1; }
368
        $getWaitingReserveInfo{waitinghere}  = 1 if $num_res->{'branchcode'} eq $branch;
377
        }
369
        }
378
        #         check transfers with the itemnumber foud in th reservation loop
370
        #         check transfers with the itemnumber foud in th reservation loop
379
        if ($transfertwhen) {
371
        if ($transfertwhen) {
Lines 381-404 if ($borrowernumber) { Link Here
381
            $getreserv{transfered} = 1;
373
            $getreserv{transfered} = 1;
382
            $getreserv{datesent}   = format_date($transfertwhen);
374
            $getreserv{datesent}   = format_date($transfertwhen);
383
            $getreserv{frombranch} = GetBranchName($transfertfrom);
375
            $getreserv{frombranch} = GetBranchName($transfertfrom);
384
        }
376
        } elsif ($getiteminfo->{'holdingbranch'} ne $num_res->{'branchcode'}) {
385
386
        if ( ( $getiteminfo->{'holdingbranch'} ne $num_res->{'branchcode'} )
387
            and not $transfertwhen )
388
        {
389
            $getreserv{nottransfered}   = 1;
377
            $getreserv{nottransfered}   = 1;
390
            $getreserv{nottransferedby} =
378
            $getreserv{nottransferedby} = GetBranchName( $getiteminfo->{'holdingbranch'} );
391
            GetBranchName( $getiteminfo->{'holdingbranch'} );
392
        }
379
        }
393
380
394
#         if we don't have a reserv on item, we put the biblio infos and the waiting position
381
#         if we don't have a reserv on item, we put the biblio infos and the waiting position
395
        if ( $getiteminfo->{'title'} eq '' ) {
382
        if ( $getiteminfo->{'title'} eq '' ) {
396
            my $getbibinfo = GetBiblioData( $num_res->{'biblionumber'} );
383
            my $getbibinfo = GetBiblioData( $num_res->{'biblionumber'} );
397
            my $getbibtype = getitemtypeinfo( $getbibinfo->{'itemtype'} );  # fixme - we should have item-level reserves here ?
384
398
            $getreserv{color}           = 'inwait';
385
            $getreserv{color}           = 'inwait';
399
            $getreserv{title}           = $getbibinfo->{'title'};
386
            $getreserv{title}           = $getbibinfo->{'title'};
400
            $getreserv{nottransfered}   = 0;
387
            $getreserv{nottransfered}   = 0;
401
            $getreserv{itemtype}        = $getbibtype->{'description'};
388
            $getreserv{itemtype}        = $itemtypeinfo->{'description'};
402
            $getreserv{author}          = $getbibinfo->{'author'};
389
            $getreserv{author}          = $getbibinfo->{'author'};
403
            $getreserv{biblionumber}    = $num_res->{'biblionumber'};
390
            $getreserv{biblionumber}    = $num_res->{'biblionumber'};
404
        }
391
        }
Lines 406-412 if ($borrowernumber) { Link Here
406
        push( @reservloop, \%getreserv );
393
        push( @reservloop, \%getreserv );
407
394
408
#         if we have a reserve waiting, initiate waitingreserveloop
395
#         if we have a reserve waiting, initiate waitingreserveloop
409
        if ($getreserv{waiting} eq 1) {
396
        if ($getreserv{waiting} == 1) {
410
        push (@WaitingReserveLoop, \%getWaitingReserveInfo)
397
        push (@WaitingReserveLoop, \%getWaitingReserveInfo)
411
        }
398
        }
412
      
399
      
Lines 426-446 my $todaysissues = ''; Link Here
426
my $previssues   = '';
413
my $previssues   = '';
427
my @todaysissues;
414
my @todaysissues;
428
my @previousissues;
415
my @previousissues;
429
my $allowborrow;
430
## ADDED BY JF: new itemtype issuingrules counter stuff
416
## ADDED BY JF: new itemtype issuingrules counter stuff
431
my $issued_itemtypes_loop;
432
my $issued_itemtypes_count;
417
my $issued_itemtypes_count;
433
my $issued_itemtypes_allowed_count;    # hashref with total allowed by itemtype
434
my $issued_itemtypes_remaining;        # hashref with remaining
435
my $issued_itemtypes_flags;            #hashref that stores flags
436
my @issued_itemtypes_count_loop;
418
my @issued_itemtypes_count_loop;
419
my $totalprice = 0;
437
420
438
if ($borrower) {
421
if ($borrower) {
439
# get each issue of the borrower & separate them in todayissues & previous issues
422
# get each issue of the borrower & separate them in todayissues & previous issues
440
    my ($issueslist) = GetPendingIssues($borrower->{'borrowernumber'});
423
    my ($issueslist) = GetPendingIssues($borrower->{'borrowernumber'});
441
442
    # split in 2 arrays for today & previous
424
    # split in 2 arrays for today & previous
443
    foreach my $it ( @$issueslist ) {
425
    foreach my $it ( @$issueslist ) {
426
        my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $it->{'itype'} : $it->{'itemtype'} );
444
        # set itemtype per item-level_itype syspref - FIXME this is an ugly hack
427
        # set itemtype per item-level_itype syspref - FIXME this is an ugly hack
445
        $it->{'itemtype'} = ( C4::Context->preference( 'item-level_itypes' ) ) ? $it->{'itype'} : $it->{'itemtype'};
428
        $it->{'itemtype'} = ( C4::Context->preference( 'item-level_itypes' ) ) ? $it->{'itype'} : $it->{'itemtype'};
446
429
Lines 453-463 if ($borrower) { Link Here
453
        );
436
        );
454
        $it->{"renew_error_${can_renew_error}"} = 1 if defined $can_renew_error;
437
        $it->{"renew_error_${can_renew_error}"} = 1 if defined $can_renew_error;
455
        my ( $restype, $reserves ) = CheckReserves( $it->{'itemnumber'} );
438
        my ( $restype, $reserves ) = CheckReserves( $it->{'itemnumber'} );
456
		$it->{'can_renew'} = $can_renew;
439
        $it->{'can_renew'} = $can_renew;
457
		$it->{'can_confirm'} = !$can_renew && !$restype;
440
        $it->{'can_confirm'} = !$can_renew && !$restype;
458
		$it->{'renew_error'} = $restype;
441
        $it->{'renew_error'} = $restype;
459
442
        $it->{'checkoutdate'} = C4::Dates->new($it->{'issuedate'},'iso')->output('syspref');
443
444
        $totalprice += $it->{'replacementprice'};
445
        $it->{'itemtype'} = $itemtypeinfo->{'description'};
446
        $it->{'itemtype_image'} = $itemtypeinfo->{'imageurl'};
460
        $it->{'dd'} = format_date($it->{'date_due'});
447
        $it->{'dd'} = format_date($it->{'date_due'});
448
        $it->{'displaydate'} = format_date($it->{'issuedate'});
461
        $it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ;
449
        $it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ;
462
        ($it->{'author'} eq '') and $it->{'author'} = ' ';
450
        ($it->{'author'} eq '') and $it->{'author'} = ' ';
463
        $it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}};
451
        $it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}};
Lines 490-502 if ($borrower) { Link Here
490
my $dbh = C4::Context->dbh;
478
my $dbh = C4::Context->dbh;
491
479
492
# how many of each is allowed?
480
# how many of each is allowed?
493
my $issueqty_sth = $dbh->prepare( "
481
my $issueqty_sth = $dbh->prepare(
494
SELECT itemtypes.description AS description,issuingrules.itemtype,maxissueqty
482
    'SELECT itemtypes.description AS description,issuingrules.itemtype,maxissueqty ' .
495
FROM issuingrules
483
    'FROM issuingrules LEFT JOIN itemtypes ON (itemtypes.itemtype=issuingrules.itemtype) ' .
496
  LEFT JOIN itemtypes ON (itemtypes.itemtype=issuingrules.itemtype)
484
    'WHERE categorycode=?'
497
  WHERE categorycode=?
485
);
498
" );
486
$issueqty_sth->execute(q{*}); # This is a literal asterisk, not a wildcard.
499
$issueqty_sth->execute("*");	# This is a literal asterisk, not a wildcard.
500
487
501
while ( my $data = $issueqty_sth->fetchrow_hashref() ) {
488
while ( my $data = $issueqty_sth->fetchrow_hashref() ) {
502
489
Lines 507-522 while ( my $data = $issueqty_sth->fetchrow_hashref() ) { Link Here
507
          $issued_itemtypes_count->{ $data->{'description'} } );
494
          $issued_itemtypes_count->{ $data->{'description'} } );
508
495
509
    # can't have a negative number of remaining
496
    # can't have a negative number of remaining
510
    if ( $data->{'left'} < 0 ) { $data->{'left'} = "0" }
497
    if ( $data->{'left'} < 0 ) { $data->{'left'} = '0' }
511
    $data->{'flag'} = 1 unless ( $data->{'maxissueqty'} > $data->{'count'} );
498
    if ( $data->{maxissueqty} <= $data->{count} ) {
512
    unless ( ( $data->{'maxissueqty'} < 1 )
499
        $data->{flag} = 1;
513
        || ( $data->{'itemtype'} eq "*" )
500
    }
514
        || ( $data->{'itemtype'} eq "CIRC" ) )
501
    if ( $data->{maxissueqty} > 0 && $data->{itemtype} !~m/^(\*|CIRC)$/ ) {
515
    {
516
        push @issued_itemtypes_count_loop, $data;
502
        push @issued_itemtypes_count_loop, $data;
517
    }
503
    }
518
}
504
}
519
$issued_itemtypes_loop = \@issued_itemtypes_count_loop;
520
505
521
#### / JF
506
#### / JF
522
507
Lines 548-556 if ($borrowerslist) { Link Here
548
533
549
#title
534
#title
550
my $flags = $borrower->{'flags'};
535
my $flags = $borrower->{'flags'};
551
my $flag;
536
foreach my $flag ( sort keys %$flags ) {
552
553
foreach $flag ( sort keys %$flags ) {
554
    $template->param( flagged=> 1);
537
    $template->param( flagged=> 1);
555
    $flags->{$flag}->{'message'} =~ s#\n#<br />#g;
538
    $flags->{$flag}->{'message'} =~ s#\n#<br />#g;
556
    if ( $flags->{$flag}->{'noissues'} ) {
539
    if ( $flags->{$flag}->{'noissues'} ) {
Lines 561-573 foreach $flag ( sort keys %$flags ) { Link Here
561
        if ( $flag eq 'GNA' ) {
544
        if ( $flag eq 'GNA' ) {
562
            $template->param( gna => 'true' );
545
            $template->param( gna => 'true' );
563
        }
546
        }
564
        if ( $flag eq 'LOST' ) {
547
        elsif ( $flag eq 'LOST' ) {
565
            $template->param( lost => 'true' );
548
            $template->param( lost => 'true' );
566
        }
549
        }
567
        if ( $flag eq 'DBARRED' ) {
550
        elsif ( $flag eq 'DBARRED' ) {
568
            $template->param( dbarred => 'true' );
551
            $template->param( dbarred => 'true' );
569
        }
552
        }
570
        if ( $flag eq 'CHARGES' ) {
553
        elsif ( $flag eq 'CHARGES' ) {
571
            $template->param(
554
            $template->param(
572
                charges    => 'true',
555
                charges    => 'true',
573
                chargesmsg => $flags->{'CHARGES'}->{'message'},
556
                chargesmsg => $flags->{'CHARGES'}->{'message'},
Lines 575-581 foreach $flag ( sort keys %$flags ) { Link Here
575
                charges_is_blocker => 1
558
                charges_is_blocker => 1
576
            );
559
            );
577
        }
560
        }
578
        if ( $flag eq 'CREDITS' ) {
561
        elsif ( $flag eq 'CREDITS' ) {
579
            $template->param(
562
            $template->param(
580
                credits    => 'true',
563
                credits    => 'true',
581
                creditsmsg => $flags->{'CREDITS'}->{'message'}
564
                creditsmsg => $flags->{'CREDITS'}->{'message'}
Lines 591-603 foreach $flag ( sort keys %$flags ) { Link Here
591
                chargesamount => $flags->{'CHARGES'}->{'amount'},
574
                chargesamount => $flags->{'CHARGES'}->{'amount'},
592
            );
575
            );
593
        }
576
        }
594
        if ( $flag eq 'CREDITS' ) {
577
        elsif ( $flag eq 'CREDITS' ) {
595
            $template->param(
578
            $template->param(
596
                credits    => 'true',
579
                credits    => 'true',
597
                creditsmsg => $flags->{'CREDITS'}->{'message'}
580
                creditsmsg => $flags->{'CREDITS'}->{'message'}
598
            );
581
            );
599
        }
582
        }
600
        if ( $flag eq 'ODUES' ) {
583
        elsif ( $flag eq 'ODUES' ) {
601
            $template->param(
584
            $template->param(
602
                odues    => 'true',
585
                odues    => 'true',
603
                flagged  => 1,
586
                flagged  => 1,
Lines 605-624 foreach $flag ( sort keys %$flags ) { Link Here
605
            );
588
            );
606
589
607
            my $items = $flags->{$flag}->{'itemlist'};
590
            my $items = $flags->{$flag}->{'itemlist'};
608
# useless ???
591
            if ( ! $query->param('module') || $query->param('module') ne 'returns' ) {
609
#             {
610
#                 my @itemswaiting;
611
#                 foreach my $item (@$items) {
612
#                     my ($iteminformation) =
613
#                         getiteminformation( $item->{'itemnumber'}, 0 );
614
#                     push @itemswaiting, $iteminformation;
615
#                 }
616
#             }
617
            if ( $query->param('module') ne 'returns' ) {
618
                $template->param( nonreturns => 'true' );
592
                $template->param( nonreturns => 'true' );
619
            }
593
            }
620
        }
594
        }
621
        if ( $flag eq 'NOTES' ) {
595
        elsif ( $flag eq 'NOTES' ) {
622
            $template->param(
596
            $template->param(
623
                notes    => 'true',
597
                notes    => 'true',
624
                flagged  => 1,
598
                flagged  => 1,
Lines 629-635 foreach $flag ( sort keys %$flags ) { Link Here
629
}
603
}
630
604
631
my $amountold = $borrower->{flags}->{'CHARGES'}->{'message'} || 0;
605
my $amountold = $borrower->{flags}->{'CHARGES'}->{'message'} || 0;
632
my @temp = split( /\$/, $amountold );
606
$amountold =~ s/^.*\$//;    # remove upto the $, if any
607
608
my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
633
609
634
if ( $borrower->{'category_type'} eq 'C') {
610
if ( $borrower->{'category_type'} eq 'C') {
635
    my  ( $catcodes, $labels ) =  GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
611
    my  ( $catcodes, $labels ) =  GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
Lines 646-653 if ( C4::Context->preference("memberofinstitution") ) { Link Here
646
    my %org_labels;
622
    my %org_labels;
647
    foreach my $organisation ( keys %$organisations ) {
623
    foreach my $organisation ( keys %$organisations ) {
648
        push @orgs, $organisation;
624
        push @orgs, $organisation;
649
        $org_labels{$organisation} =
625
        $org_labels{$organisation} = $organisations->{$organisation}->{'surname'};
650
          $organisations->{$organisation}->{'surname'};
651
    }
626
    }
652
    $member_of_institution = 1;
627
    $member_of_institution = 1;
653
    $CGIorganisations      = CGI::popup_menu(
628
    $CGIorganisations      = CGI::popup_menu(
Lines 658-687 if ( C4::Context->preference("memberofinstitution") ) { Link Here
658
    );
633
    );
659
}
634
}
660
635
661
$amountold = $temp[1];
636
my $lib_messages_loop = GetMessages( $borrowernumber, 'L', $branch );
637
if($lib_messages_loop){ $template->param(flagged => 1 ); }
638
639
my $bor_messages_loop = GetMessages( $borrowernumber, 'B', $branch );
640
if($bor_messages_loop){ $template->param(flagged => 1 ); }
641
642
# Computes full borrower address
643
my (undef, $roadttype_hashref) = &GetRoadTypes();
644
my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'};
662
645
663
$template->param(
646
$template->param(
664
    issued_itemtypes_count_loop => $issued_itemtypes_loop,
647
    issued_itemtypes_count_loop => \@issued_itemtypes_count_loop,
665
    findborrower                => $findborrower,
648
    lib_messages_loop => $lib_messages_loop,
666
    borrower                    => $borrower,
649
    bor_messages_loop => $bor_messages_loop,
667
    borrowernumber              => $borrowernumber,
650
    all_messages_del  => C4::Context->preference('AllowAllMessageDeletion'),
668
    branch                      => $branch,
651
    findborrower      => $findborrower,
669
    branchname                  => GetBranchName($borrower->{'branchcode'}),
652
    borrower          => $borrower,
670
    printer                     => $printer,
653
    borrowernumber    => $borrowernumber,
671
    printername                 => $printer,
654
    branch            => $branch,
672
    firstname                   => $borrower->{'firstname'},
655
    branchname        => GetBranchName($borrower->{'branchcode'}),
673
    surname                     => $borrower->{'surname'},
656
    printer           => $printer,
657
    printername       => $printer,
658
    firstname         => $borrower->{'firstname'},
659
    surname           => $borrower->{'surname'},
660
    othernames        => $borrower->{'othernames'},    
674
    dateexpiry        => format_date($newexpiry),
661
    dateexpiry        => format_date($newexpiry),
675
    expiry            => format_date($borrower->{'dateexpiry'}),
662
    expiry            => format_date($borrower->{'dateexpiry'}),
676
    categorycode      => $borrower->{'categorycode'},
663
    categorycode      => $borrower->{'categorycode'},
677
    categoryname      => $borrower->{description},
664
    categoryname      => $borrower->{description},
678
    address           => $borrower->{'address'},
665
    address           => $address,
679
    address2          => $borrower->{'address2'},
666
    address2          => $borrower->{'address2'},
680
    email             => $borrower->{'email'},
667
    email             => $borrower->{'email'},
681
    emailpro          => $borrower->{'emailpro'},
668
    emailpro          => $borrower->{'emailpro'},
682
    borrowernotes     => $borrower->{'borrowernotes'},
669
    borrowernotes     => $borrower->{'borrowernotes'},
683
    city              => $borrower->{'city'},
670
    city              => $borrower->{'city'},
684
    zipcode	          => $borrower->{'zipcode'},
671
    zipcode           => $borrower->{'zipcode'},
672
    country           => $borrower->{'country'},
685
    phone             => $borrower->{'phone'} || $borrower->{'mobile'},
673
    phone             => $borrower->{'phone'} || $borrower->{'mobile'},
686
    cardnumber        => $borrower->{'cardnumber'},
674
    cardnumber        => $borrower->{'cardnumber'},
687
    amountold         => $amountold,
675
    amountold         => $amountold,
Lines 690-701 $template->param( Link Here
690
    duedatespec       => $duedatespec,
678
    duedatespec       => $duedatespec,
691
    message           => $message,
679
    message           => $message,
692
    CGIselectborrower => $CGIselectborrower,
680
    CGIselectborrower => $CGIselectborrower,
681
    totalprice        => sprintf('%.2f', $totalprice),
682
    totaldue          => sprintf('%.2f', $total),
693
    todayissues       => \@todaysissues,
683
    todayissues       => \@todaysissues,
694
    previssues        => \@previousissues,
684
    previssues        => \@previousissues,
695
    inprocess         => $inprocess,
685
    inprocess         => $inprocess,
696
    memberofinstution => $member_of_institution,
686
    memberofinstution => $member_of_institution,
697
    CGIorganisations  => $CGIorganisations,
687
    CGIorganisations  => $CGIorganisations,
698
	is_child          => ($borrower->{'category_type'} eq 'C'),
688
    is_child          => ($borrower->{'category_type'} eq 'C'),
699
    circview => 1,
689
    circview => 1,
700
);
690
);
701
691
Lines 704-716 if ($stickyduedate) { Link Here
704
    $session->param( 'stickyduedate', $duedatespec );
694
    $session->param( 'stickyduedate', $duedatespec );
705
}
695
}
706
696
707
#if ($branchcookie) {
708
#$cookie=[$cookie, $branchcookie, $printercookie];
709
#}
710
711
my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'});
697
my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'});
712
$template->param( picture => 1 ) if $picture;
698
$template->param( picture => 1 ) if $picture;
713
699
700
# get authorised values with type of BOR_NOTES
701
my @canned_notes;
702
my $sth = $dbh->prepare('SELECT * FROM authorised_values WHERE category = "BOR_NOTES"');
703
$sth->execute();
704
while ( my $row = $sth->fetchrow_hashref() ) {
705
  push @canned_notes, $row;
706
}
707
if ( scalar( @canned_notes ) ) {
708
  $template->param( canned_bor_notes_loop => \@canned_notes );
709
}
714
710
715
$template->param(
711
$template->param(
716
    debt_confirmed            => $debt_confirmed,
712
    debt_confirmed            => $debt_confirmed,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl (-76 / +285 lines)
Lines 1-13 Link Here
1
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
1
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2
<title>Koha &rsaquo; Circulation
2
<title>Koha &rsaquo; Circulation
3
<!-- TMPL_IF NAME="borrowernumber" -->
3
<!-- TMPL_IF NAME="borrowernumber" -->
4
&rsaquo; Checking out to <!-- TMPL_VAR name="surname" -->, <!-- TMPL_VAR name="firstname" -->
4
&rsaquo; Checking out to <!-- TMPL_VAR name="surname" -->, <!-- TMPL_IF NAME="othernames" -->"<!--TMPL_VAR NAME="othernames" -->"<!-- /TMPL_IF --><!-- TMPL_VAR name="firstname" -->
5
(<!-- TMPL_VAR NAME="cardnumber" -->)
5
(<!-- TMPL_VAR NAME="cardnumber" -->)
6
<!-- /TMPL_IF --></title>
6
<!-- /TMPL_IF --></title>
7
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
7
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
8
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
8
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
9
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.pack.js"></script>
9
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
10
<script type="text/JavaScript" language="JavaScript">
10
<script type="text/javascript">
11
//<![CDATA[
11
//<![CDATA[
12
$.tablesorter.addParser({
12
$.tablesorter.addParser({
13
    id: 'articles',
13
    id: 'articles',
Lines 19-32 $.tablesorter.addParser({ Link Here
19
	 $(document).ready(function() {
19
	 $(document).ready(function() {
20
 		$('#patronlists > ul').tabs();
20
 		$('#patronlists > ul').tabs();
21
		$.tablesorter.defaults.widgets = ['zebra'];
21
		$.tablesorter.defaults.widgets = ['zebra'];
22
		$("#issuest").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
22
		$("#issuest").tablesorter({<!-- TMPL_IF NAME="dateformat_metric" -->
23
		dateFormat: 'uk',<!-- /TMPL_IF -->
23
		dateFormat: 'uk',<!-- /TMPL_IF -->
24
		headers: { 1: { sorter: 'articles' },5: { sorter: false },6:{sorter:false}}
24
		headers: { 1: { sorter: 'articles' },5: { sorter: false },6:{sorter:false},7:{sorter:false},8:{sorter:false}}
25
		});
25
		});
26
		$("#issuest").bind("sortEnd",function() {
26
		$("#issuest").bind("sortEnd",function() {
27
        	$("#previous").parents("tr").remove();  // 'previous checkouts' header chokes table sorter
27
        	$("#previous").parents("tr").remove();  // 'previous checkouts' header chokes table sorter
28
	    });
28
	    });
29
		$("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
29
		$("#holdst").tablesorter({<!-- TMPL_IF NAME="dateformat_metric" -->
30
		dateFormat: 'uk',<!-- /TMPL_IF -->
30
		dateFormat: 'uk',<!-- /TMPL_IF -->
31
			sortList: [[0,0]],
31
			sortList: [[0,0]],
32
			headers: { 1: { sorter: 'articles' }}
32
			headers: { 1: { sorter: 'articles' }}
Lines 41-56 $.tablesorter.addParser({ Link Here
41
            }
41
            }
42
        } ).attr( 'checked', false );
42
        } ).attr( 'checked', false );
43
        <!-- /TMPL_IF -->
43
        <!-- /TMPL_IF -->
44
		$("td").click(function(e){
44
45
			if(e.target.tagName.toLowerCase() == 'td'){
45
var allcheckboxes = $(".checkboxed");
46
            $(this).find("input:checkbox").each( function() {
46
	$("#renew_all").click(function(){
47
                $(this).attr('checked', !$(this).attr('checked'));
47
		$(allcheckboxes).checkCheckboxes(":input[name*=items]"); 
48
            });
48
		$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]");
49
			}
49
	});
50
		});
50
	$("#return_all").click(function(){
51
		$(allcheckboxes).checkCheckboxes(":input[name*=barcodes]");
52
		$(allcheckboxes).unCheckCheckboxes(":input[name*=items]");
53
	});
54
	$("#CheckAllitems").click(function(){
55
		$(allcheckboxes).checkCheckboxes(":input[name*=items]");
56
		$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false;
57
	});
58
    $("#CheckNoitems").click(function(){
59
		$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false;
60
	});
61
	$("#CheckAllreturns").click(function(){
62
		$(allcheckboxes).checkCheckboxes(":input[name*=barcodes]");
63
		$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false;
64
	});
65
    $("#CheckNoreturns" ).click(function(){
66
		$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false;
67
	});
68
69
    <!-- TMPL_IF NAME="CAN_user_circulate_override_renewals" -->
70
    <!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
71
    $( '#override_limit' ).click( function () {
72
        if ( this.checked ) {
73
           $( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
74
        } else {
75
           $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
76
        }
77
    } ).attr( 'checked', false );
78
    <!-- /TMPL_IF -->
79
    <!-- /TMPL_IF -->
80
	$("td").click(function(e){
81
		if(e.target.tagName.toLowerCase() == 'td'){
82
           $(this).find("input:checkbox").each( function() {
83
               $(this).attr('checked', !$(this).attr('checked'));
84
			   if($(this).attr('checked')){
85
                    $(this).parent().siblings().find("input:checkbox").each(function(){
86
                       if($(this).attr('checked')){ $(this).attr('checked',''); }
87
                   });
88
			   }
89
           });
90
		}
91
	});
92
	$("#messages ul").after("<a href=\"#\" id=\"addmessage\">"+_("Add a new message")+"</a>");
93
	$("#borrower_messages .cancel").click(function(){
94
		$("#add_message_form").hide();
95
        $("#addmessage").show();
96
	});
97
	$("#addmessage").click(function (){
98
        $(this).hide();
99
		$("#add_message_form").show();
51
	 });
100
	 });
101
 });
102
function uncheck_sibling(me){
103
nodename=me.getAttribute("name");
104
if (nodename =="barcodes[]"){
105
    var Node=me.parentNode.previousSibling;
106
    while (Node.nodeName!="TD"){Node=Node.previousSibling}
107
    var Nodes=Node.childNodes;
108
    for (var i=0;i<Nodes.length;i++){
109
      if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
110
        Nodes[i].checked=false;
111
      }     
112
   }   
113
114
}else {
115
    var Node=me.parentNode.nextSibling;
116
    while (Node.nodeName!="TD"){Node=Node.nextSibling}
117
    var Nodes=Node.childNodes;
118
    for (var i=0;i<Nodes.length;i++){
119
      if (Nodes[i].nodeName=="INPUT" && Nodes[i].getAttribute("type")=="checkbox"){
120
        Nodes[i].checked=false;
121
      }     
122
   }   
123
}
124
}
125
function validate1(date) {
126
    var today = new Date();
127
    if ( date < today ) {
128
        return true;
129
     } else {
130
        return false;
131
     }
132
};
133
function refocus(calendar) {
134
   document.getElementById('barcode').focus();
135
   calendar.hide();
136
};
52
//]]>
137
//]]>
53
</script>
138
</script>
139
54
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
140
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
55
</head>
141
</head>
56
<body>
142
<body>
Lines 58-64 $.tablesorter.addParser({ Link Here
58
<!-- TMPL_INCLUDE NAME="header.inc" -->
144
<!-- TMPL_INCLUDE NAME="header.inc" -->
59
<!-- TMPL_INCLUDE NAME="circ-search.inc" -->
145
<!-- TMPL_INCLUDE NAME="circ-search.inc" -->
60
146
61
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo;<!-- TMPL_IF NAME="borrowernumber" --> <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --><!-- TMPL_ELSE --> <strong>Checkouts</strong><!-- /TMPL_IF --></div>
147
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo;<!-- TMPL_IF NAME="borrowernumber" --> <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; <!-- TMPL_VAR name="firstname" --> <!--TMPL_IF NAME="othernames" -->"<!--TMPL_VAR NAME="othernames" -->" <!-- /TMPL_IF --><!-- TMPL_VAR name="surname" --><!-- TMPL_ELSE --> <strong>Checkouts</strong><!-- /TMPL_IF --></div>
148
62
149
63
<!-- TMPL_IF NAME="CGIselectborrower" -->
150
<!-- TMPL_IF NAME="CGIselectborrower" -->
64
<div id="doc" class="yui-t7">
151
<div id="doc" class="yui-t7">
Lines 79-84 $.tablesorter.addParser({ Link Here
79
<!-- /TMPL_IF -->
166
<!-- /TMPL_IF -->
80
167
81
<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
168
<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
169
<div style="display: none;" id="add_message_form">
170
<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
171
<fieldset id="borrower_messages" class="brief">
172
<legend>Leave a message</legend>
173
	<ol>
174
    <li>
175
            <label for="message_type">Add a message for:</label>
176
          <select name="message_type" id="message_type">
177
            <option value="L">Other Librarians</option>
178
            <option value="B"><!-- TMPL_VAR name="firstname" --></option>
179
        </select>
180
    </li>
181
    <!-- TMPL_IF NAME="canned_bor_notes_loop" -->
182
        <li>
183
                <label for="canned_notes">Predefined notes: </label>
184
                <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
185
                    <option value="">Select Note</option>
186
                    <!-- TMPL_LOOP NAME="canned_bor_notes_loop" -->
187
                    <option value="<!-- TMPL_VAR NAME="lib" -->"><!--TMPL_VAR NAME="authorised_value" --></option>
188
                    <!-- /TMPL_LOOP -->
189
                </select>
190
        </li>
191
    <!-- /TMPL_IF -->
192
    <li>
193
        <textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
194
    </li>
195
	</ol>
196
    <fieldset class="action">
197
        <input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
198
    </fieldset>
199
200
        <input type="hidden" name="borrowernumber" id="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
201
        <input type="hidden" name="branchcode" value="<!-- TMPL_VAR NAME="branch" -->" />
202
</fieldset>
203
</form>
204
</div>
205
82
<!-- TMPL_IF NAME="dateexpiry" --><div class="dialog message">Patron's account has been renewed until <!-- TMPL_VAR NAME="dateexpiry" --></div><!-- /TMPL_IF -->
206
<!-- TMPL_IF NAME="dateexpiry" --><div class="dialog message">Patron's account has been renewed until <!-- TMPL_VAR NAME="dateexpiry" --></div><!-- /TMPL_IF -->
83
<!-- TMPL_IF NAME="NEEDSCONFIRMATION" -->
207
<!-- TMPL_IF NAME="NEEDSCONFIRMATION" -->
84
<div class="yui-g">
208
<div class="yui-g">
Lines 88-94 $.tablesorter.addParser({ Link Here
88
212
89
<ul>
213
<ul>
90
<!-- TMPL_IF NAME="DEBT" -->
214
<!-- TMPL_IF NAME="DEBT" -->
91
    <li>The patron has a debt of $<!-- TMPL_VAR name="DEBT" --></li>
215
    <li>The patron has a debt of <!-- TMPL_VAR name="DEBT" --></li>
92
<!-- /TMPL_IF -->
216
<!-- /TMPL_IF -->
93
217
94
<!-- TMPL_IF NAME="RENEW_ISSUE" -->
218
<!-- TMPL_IF NAME="RENEW_ISSUE" -->
Lines 259-273 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
259
<!-- TMPL_IF NAME="flagged" -->
383
<!-- TMPL_IF NAME="flagged" -->
260
<div class="yui-u first">
384
<div class="yui-u first">
261
<!-- TMPL_ELSE -->
385
<!-- TMPL_ELSE -->
262
<div><!-- /TMPL_IF --><form method="post" action="/cgi-bin/koha/circ/circulation.pl" name="mainform">
386
<div>
387
388
<!-- /TMPL_IF -->
389
390
391
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" name="mainform">
263
<fieldset id="circ_circulation_issue">
392
<fieldset id="circ_circulation_issue">
264
    <label for="barcode">Checking out to <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->) </label>
393
    <!-- TMPL_IF NAME="DisplayClearScreenButton" -->
394
	    <input type=button value="Clear Screen" onClick="window.location = '/cgi-bin/koha/circ/circulation.pl'">
395
    <!-- /TMPL_IF -->
396
397
    <label for="barcode">Checking out to <!-- TMPL_VAR name="firstname" --> <!--TMPL_IF NAME="othernames" -->"<!--TMPL_VAR NAME="othernames" -->"<!-- /TMPL_IF --><!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->) </label>
265
	<div class="hint">Enter item barcode:</div>
398
	<div class="hint">Enter item barcode:</div>
266
399
267
	<input type="text" name="barcode" id="barcode" class="barcode focus" size="14" /> <input type="submit" value="Check Out" />
400
	<input type="text" name="barcode" id="barcode" class="barcode focus" size="14" /> <input type="submit" value="Check Out" />
268
401
269
    <!-- TMPL_IF NAME="SpecifyDueDate" --><div class="date-select">
402
    <!-- TMPL_IF NAME="SpecifyDueDate" --><div class="date-select">
270
        <div class="hint">Specify Due Date:</div>
403
        <div class="hint">Specify Due Date <!-- TMPL_INCLUDE NAME="date-format.inc" -->: </div>
271
		<!-- TMPL_IF NAME="duedatespec" --><input type="text" size="10" id="duedatespec" name="duedatespec" value="<!-- TMPL_VAR NAME="duedatespec" -->" /><!-- TMPL_ELSE --><input type="text" size="10" id="duedatespec" name="duedatespec" value="" />
404
		<!-- TMPL_IF NAME="duedatespec" --><input type="text" size="10" id="duedatespec" name="duedatespec" value="<!-- TMPL_VAR NAME="duedatespec" -->" /><!-- TMPL_ELSE --><input type="text" size="10" id="duedatespec" name="duedatespec" value="" />
272
<!-- /TMPL_IF -->
405
<!-- /TMPL_IF -->
273
		<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar"  border="0" id="CalendarDueDate" style="cursor: pointer;" />
406
		<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar"  border="0" id="CalendarDueDate" style="cursor: pointer;" />
Lines 282-288 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
282
                          }
415
                          }
283
                     };
416
                     };
284
                     function refocus(calendar) {
417
                     function refocus(calendar) {
285
                        document.getElementById('barcode').focus();
418
                        $('#barcode').focus();
286
                        calendar.hide();
419
                        calendar.hide();
287
                     };
420
                     };
288
				//#TODO - ADD syspref (AllowPostDatedCheckouts).
421
				//#TODO - ADD syspref (AllowPostDatedCheckouts).
Lines 323-329 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
323
456
324
    <!-- TMPL_IF NAME="flagged" -->
457
    <!-- TMPL_IF NAME="flagged" -->
325
		<!-- TMPL_IF NAME="noissues" -->
458
		<!-- TMPL_IF NAME="noissues" -->
326
		 <h4>Checking out to <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h4>
459
		 <h4>Checking out to <!-- TMPL_VAR name="firstname" --> <!-- TMPL_IF NAME="othernames" -->"<!--TMPL_VAR NAME="othernames" -->"<!--/TMPL_IF--><!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h4>
327
        <div id="circmessages" class="circmessage warning">
460
        <div id="circmessages" class="circmessage warning">
328
		<!-- TMPL_ELSE -->
461
		<!-- TMPL_ELSE -->
329
        <div id="circmessages" class="circmessage attention">
462
        <div id="circmessages" class="circmessage attention">
Lines 373-379 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
373
                <!-- TMPL_ELSE -->
506
                <!-- TMPL_ELSE -->
374
			        <li>
507
			        <li>
375
                <!-- /TMPL_IF -->
508
                <!-- /TMPL_IF -->
376
            <span class="circ-hlt">Fines:</span> Patron has  <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->">Outstanding fines<!-- TMPL_IF NAME="chargesamount" --> of $<!-- TMPL_VAR NAME="chargesamount" --><!-- /TMPL_IF --></a>.
509
            <span class="circ-hlt">Fines:</span> Patron has  <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->">Outstanding fines<!-- TMPL_IF NAME="chargesamount" --> of <!-- TMPL_VAR NAME="chargesamount" --><!-- /TMPL_IF --></a>.
377
                <!-- TMPL_IF NAME="charges_is_blocker" -->
510
                <!-- TMPL_IF NAME="charges_is_blocker" -->
378
                    Checkouts are blocked because fine balance is over the limit.
511
                    Checkouts are blocked because fine balance is over the limit.
379
                <!-- /TMPL_IF -->
512
                <!-- /TMPL_IF -->
Lines 393-399 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
393
			<div id="holdswaiting" class="circmessage">
526
			<div id="holdswaiting" class="circmessage">
394
		    <h4>Holds waiting:</h4>
527
		    <h4>Holds waiting:</h4>
395
			        <!-- TMPL_LOOP NAME="WaitingReserveLoop" -->
528
			        <!-- TMPL_LOOP NAME="WaitingReserveLoop" -->
396
			            <ul> 
529
			            <ul>
397
			                <li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a> (<!-- TMPL_VAR NAME="itemtype"-->), <!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author"--><!-- /TMPL_IF --> Hold placed on <!-- TMPL_VAR NAME="reservedate"-->.
530
			                <li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a> (<!-- TMPL_VAR NAME="itemtype"-->), <!-- TMPL_IF NAME="author" -->by <!-- TMPL_VAR NAME="author"--><!-- /TMPL_IF --> Hold placed on <!-- TMPL_VAR NAME="reservedate"-->.
398
			            <!-- TMPL_IF NAME="waitingat" -->
531
			            <!-- TMPL_IF NAME="waitingat" -->
399
			                <br /><!-- TMPL_IF NAME="waitinghere" --><strong class="waitinghere"><!-- TMPL_ELSE --><strong><!-- /TMPL_IF -->Waiting at <!-- TMPL_VAR NAME="waitingat" --></strong>
532
			                <br /><!-- TMPL_IF NAME="waitinghere" --><strong class="waitinghere"><!-- TMPL_ELSE --><strong><!-- /TMPL_IF -->Waiting at <!-- TMPL_VAR NAME="waitingat" --></strong>
Lines 408-416 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
408
			<h4>Notes:</h4>
541
			<h4>Notes:</h4>
409
            <p><span class="circ-hlt"><!-- TMPL_VAR name="notesmsg" --></span></p>
542
            <p><span class="circ-hlt"><!-- TMPL_VAR name="notesmsg" --></span></p>
410
			</div>
543
			</div>
544
545
411
    <!-- /If notes --><!-- /TMPL_IF -->
546
    <!-- /If notes --><!-- /TMPL_IF -->
547
548
	<div id="messages" class="circmessage">
549
		<h4>Messages:</h4>
550
		<ul>
551
			<!--TMPL_LOOP NAME="lib_messages_loop" -->
552
				<li>
553
					<span class="circ-hlt">
554
						<!--TMPL_VAR NAME="message_date_formatted"-->
555
						<!--TMPL_VAR NAME="branchcode"-->
556
						<i>"<!--TMPL_VAR NAME="message"-->"</i>
557
					</span>
558
					<!-- TMPL_IF NAME="can_delete" -->
559
						<a href="/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&amp;borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->">[Delete]</a>
560
					<!-- TMPL_ELSE -->
561
						<!-- TMPL_IF NAME="all_messages_del" -->
562
							<a href="/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&amp;borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->">[Delete]</a>
563
						<!-- /TMPL_IF -->
564
					<!-- /TMPL_IF -->
565
				</li>
566
			<!-- /TMPL_LOOP -->
567
			<!--TMPL_LOOP NAME="bor_messages_loop" -->
568
				<li><span class=""><!--TMPL_VAR NAME="message_date_formatted"--> <!--TMPL_VAR NAME="branchcode"--> <i>"<!--TMPL_VAR NAME="message"-->"</i></span> <!-- TMPL_IF NAME="can_delete" --><a href="/cgi-bin/koha/circ/del_message.pl?message_id=<!--TMPL_VAR NAME="message_id" -->&amp;borrowernumber=<!--TMPL_VAR NAME="borrowernumber" -->">[Delete]</a><!-- /TMPL_IF --></li>
569
			<!-- /TMPL_LOOP -->
570
571
		</ul>
572
	</div>	
573
	
412
     <!-- /If flagged --><!-- /TMPL_IF -->
574
     <!-- /If flagged --><!-- /TMPL_IF -->
413
575
576
	
414
577
415
</div>
578
</div>
416
</div>
579
</div>
Lines 424-430 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
424
            <a href="/cgi-bin/koha/circ/circulation.pl#checkouts">0 Checkouts</a>
587
            <a href="/cgi-bin/koha/circ/circulation.pl#checkouts">0 Checkouts</a>
425
    <!-- /TMPL_IF --></li>
588
    <!-- /TMPL_IF --></li>
426
<li><!-- TMPL_IF NAME="countreserv"-->
589
<li><!-- TMPL_IF NAME="countreserv"-->
427
            <a href="/cgi-bin/koha/circ/circulation.pl#reserves"><!--TMPL_VAR NAME="countreserv"--> Holds(s)</a>
590
            <a href="/cgi-bin/koha/circ/circulation.pl#reserves"><!--TMPL_VAR NAME="countreserv"--> Hold(s)</a>
428
    <!-- TMPL_ELSE -->
591
    <!-- TMPL_ELSE -->
429
            <a href="/cgi-bin/koha/circ/circulation.pl#reserves">0 Holds</a>
592
            <a href="/cgi-bin/koha/circ/circulation.pl#reserves">0 Holds</a>
430
    <!-- /TMPL_IF --></li>
593
    <!-- /TMPL_IF --></li>
Lines 434-456 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
434
<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
597
<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
435
<div id="checkouts">
598
<div id="checkouts">
436
<!--TMPL_IF NAME="issuecount"-->
599
<!--TMPL_IF NAME="issuecount"-->
437
    <form action="/cgi-bin/koha/reserve/renewscript.pl" method="post">
600
    <form action="/cgi-bin/koha/reserve/renewscript.pl" method="post" class="checkboxed">
438
    <input type="hidden" value="circ" name="destination" />
601
    <input type="hidden" value="circ" name="destination" />
439
    <input type="hidden" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" />
602
    <input type="hidden" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" />
440
    <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
603
    <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
441
    <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
604
    <input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
442
        <table id="issuest">
605
        <table id="issuest">
443
    <thead><tr>
606
    <thead><tr>
444
        <th>Due date</th>
607
        <th scope="col">Due date</th>
445
        <th>Title</th>
608
        <th scope="col">Title</th>
446
        <th>Item Type</th>
609
        <th scope="col">Item Type</th>
447
        <th>Call no</th>
610
        <th scope="col">Checked out on</th> 
448
        <th>Barcode</th>
611
        <th scope="col">Call no</th>
449
        <th>Renewals</th>
612
        <th scope="col">Charge</th>
450
        <th>Renew?</th>
613
        <th scope="col">Price</th>
451
        <th>Check In?</th>
614
        <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th>
615
        <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th>
452
    </tr>
616
    </tr>
453
<!-- TMPL_IF NAME="todayissues" --></thead>
617
<!-- TMPL_IF NAME="todayissues" --></thead>
618
<tfoot>
619
		<tr>
620
            <td colspan="5" style="text-align: right; font-weight:bold;">Totals:</td>
621
			<td><!-- TMPL_VAR NAME="totaldue" --></td>
622
            <td><!-- TMPL_VAR NAME="totalprice" --></td>
623
            <td colspan="2">      
624
                <p>
625
                    Renewal due date: <input type="text" size="8" id="newduedate" name="newduedate" value="<!-- TMPL_VAR Name="newduedate" -->" />
626
                    <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="newduedate_button" alt="Show Calendar" />
627
 <script type="text/javascript"> //<![CDATA[
628
				//#TODO - ADD syspref (AllowPostDatedCheckouts).
629
                     Calendar.setup(
630
                          {
631
                             inputField : "newduedate",
632
                             ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
633
                             button : "newduedate_button",
634
                             disableFunc : validate1,
635
                             dateStatusFunc : validate1,
636
                             onClose : refocus
637
                           }
638
                        );
639
				//]]>
640
				 </script>
641
                </p>
642
                <p>
643
                    <label>Forgive fines on return: <input type="checkbox" name="exemptfine" value="1" /></label>
644
                </p>
645
            </td>
646
        </tr>
647
		</tfoot>
454
	<tbody>
648
	<tbody>
455
649
456
    <!-- TMPL_LOOP NAME="todayissues" -->
650
    <!-- TMPL_LOOP NAME="todayissues" -->
Lines 460-476 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
460
    <tr class="highlight">
654
    <tr class="highlight">
461
    <!-- /TMPL_IF -->
655
    <!-- /TMPL_IF -->
462
        <td><!-- TMPL_VAR NAME="dd" --></td>
656
        <td><!-- TMPL_VAR NAME="dd" --></td>
463
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR NAME="title" escape="html" --></a><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="itemnotes" -->- <span class="circ-hlt"><!-- TMPL_VAR name="itemnotes" --></span><!-- /TMPL_IF --></td>
657
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;type=intra"><strong><!-- TMPL_VAR NAME="title" escape="html" --></strong></a><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="itemnotes" -->- <span class="circ-hlt"><!-- TMPL_VAR name="itemnotes" --></span><!-- /TMPL_IF --> <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#item<!-- TMPL_VAR NAME="itemnumber" -->"><!-- TMPL_VAR NAME="barcode" --></a></td>
464
        <td>
658
        <td><!-- TMPL_UNLESS NAME="noItemTypeImages" --> <!-- TMPL_IF NAME="itemtype_image" --><img src="<!-- TMPL_VAR NAME="itemtype_image" -->" alt="" /><!-- /TMPL_IF --><!-- /TMPL_UNLESS --><!-- TMPL_VAR NAME="itemtype" --></td>
465
            <!-- TMPL_VAR NAME="itemtype" -->
659
        <td><!-- TMPL_VAR NAME="checkoutdate" --></td>
466
           <!-- TMPL_UNLESS NAME="noItemTypeImages" --> <!-- TMPL_IF NAME="itemtype_image" -->
467
            <img src="<!-- TMPL_VAR NAME="itemtype_image" -->" />
468
            <!-- /TMPL_IF --><!-- /TMPL_UNLESS -->
469
        </td>
470
        <td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
660
        <td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
471
        <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#item<!-- TMPL_VAR NAME="itemnumber" -->"><!-- TMPL_VAR NAME="barcode" --></a></td>
661
            <td><!-- TMPL_VAR NAME="charge" --></td>
472
        <td><!-- TMPL_VAR NAME="renewals" --></td>
662
            <td><!-- TMPL_VAR NAME="replacementprice" --></td>
473
        <td>
663
      <!-- TMPL_IF NAME="renew_failed" -->
664
            <td class="problem">Renewal Failed</td>
665
      <!-- TMPL_ELSE -->
666
        <td><span style="padding: 0 1em;"><!-- TMPL_VAR NAME="renewals" --></span>
474
        <!-- TMPL_IF NAME="can_renew" -->
667
        <!-- TMPL_IF NAME="can_renew" -->
475
        <input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
668
        <input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
476
        <!-- TMPL_IF NAME="od" -->
669
        <!-- TMPL_IF NAME="od" -->
Lines 493-515 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
493
			On Hold
686
			On Hold
494
		<!-- /TMPL_IF -->
687
		<!-- /TMPL_IF -->
495
                <!-- TMPL_IF NAME="renew_error_too_many" -->
688
                <!-- TMPL_IF NAME="renew_error_too_many" -->
496
			Too Many Renewals
689
			Not Renewable
497
                <!-- /TMPL_IF -->
690
                <!-- /TMPL_IF -->
498
            <!-- TMPL_IF NAME="can_confirm" -->
691
            <!-- TMPL_IF NAME="can_confirm" -->
499
                </span>
692
                </span>
500
            <!-- /TMPL_IF -->
693
            <!-- /TMPL_IF -->
501
        <!-- /TMPL_IF -->
694
        <!-- /TMPL_IF -->
502
        </td>
695
        </td>
503
		<td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- TMPL_VAR NAME="barcode" -->">Check In</a></td>
696
        <!-- /TMPL_IF -->
504
		<!-- TMPL_IF NAME="renew_failed" -->
697
  <!-- TMPL_IF NAME="return_failed" -->
505
		<td>Renewal Failed</td>
698
            <td class="problem">Checkin Failed</td>
506
		<!-- /TMPL_IF -->
699
      <!--TMPL_ELSE-->
700
            <td><input type="checkbox" name="barcodes[]"  value="<!-- TMPL_VAR NAME="barcode" -->" onclick="uncheck_sibling(this);" />
701
                <input type="checkbox" name="all_barcodes[]" value="<!-- TMPL_VAR NAME="barcode" -->" checked="checked" style="display: none;" />
702
            </td>
703
      <!-- /TMPL_IF -->
507
    </tr>
704
    </tr>
508
    <!-- /TMPL_LOOP --> <!-- /loop todayissues -->
705
    <!-- /TMPL_LOOP --> <!-- /loop todayissues -->
509
    <!-- /if todayissues --><!-- /TMPL_IF --> 
706
    <!-- /if todayissues --><!-- /TMPL_IF -->
510
<!-- TMPL_IF NAME="previssues" -->
707
<!-- TMPL_IF NAME="previssues" -->
511
<!-- TMPL_IF NAME="todayissues" --><tr><th colspan="8"><a name="previous" id="previous"></a>Previous checkouts</th></tr><!-- TMPL_ELSE -->
708
<!-- TMPL_IF NAME="todayissues" --><tr><th colspan="10"><a name="previous" id="previous"></a>Previous checkouts</th></tr><!-- TMPL_ELSE -->
512
<tr><th class="{sorter: false}" colspan="8"><a name="previous" id="previous"></a>Previous checkouts</th></tr></thead>
709
<tr><th class="{sorter: false}" colspan="10"><a name="previous" id="previous"></a>Previous checkouts</th></tr></thead>
513
	<tbody>
710
	<tbody>
514
<!-- /TMPL_IF -->
711
<!-- /TMPL_IF -->
515
    <!-- TMPL_LOOP NAME="previssues" -->
712
    <!-- TMPL_LOOP NAME="previssues" -->
Lines 521-537 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
521
        <!-- TMPL_IF NAME="od" --><td class="od"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
718
        <!-- TMPL_IF NAME="od" --><td class="od"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
522
        <!-- TMPL_VAR NAME="dd" -->
719
        <!-- TMPL_VAR NAME="dd" -->
523
        </td>
720
        </td>
524
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR NAME="title" escape="html" --></a><br /><!-- TMPL_IF NAME="author" --><!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="itemnotes" -->- <!-- TMPL_VAR name="itemnotes" --><!-- /TMPL_IF --></td>
721
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;type=intra"><strong><!-- TMPL_VAR NAME="title" escape="html" --></strong></a><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --> <!-- TMPL_IF NAME="itemnotes" -->- <!-- TMPL_VAR name="itemnotes" --><!-- /TMPL_IF --> <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#item<!-- TMPL_VAR NAME="itemnumber" -->"><!-- TMPL_VAR NAME="barcode" --></a></td>
525
        <td>
722
        <td>
526
            <!-- TMPL_VAR NAME="itemtype" -->
723
            <!-- TMPL_VAR NAME="itemtype" -->
527
            <!-- TMPL_IF NAME="itemtype_image" -->
528
            <img src="<!-- TMPL_VAR NAME="itemtype_image" -->" />
529
            <!-- /TMPL_IF -->
530
        </td>
724
        </td>
725
        <td><!-- TMPL_VAR NAME="displaydate" --></td>
531
        <td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
726
        <td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
532
        <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->#item<!-- TMPL_VAR NAME="itemnumber" -->"><!-- TMPL_VAR NAME="barcode" --></a></td>
727
        <td><!-- TMPL_VAR NAME="charge" --></td>
533
        <td><!-- TMPL_VAR NAME="renewals" --></td>
728
        <td><!-- TMPL_VAR NAME="replacementprice" --></td>
534
        <td>
729
      <!-- TMPL_IF NAME="renew_failed" -->
730
            <td class="problem">Renewal Failed</td>
731
      <!-- TMPL_ELSE -->
732
        <td><span style="padding: 0 1em;"><!-- TMPL_IF NAME="renewals" --><!-- TMPL_VAR NAME="renewals" --><!-- TMPL_ELSE -->0<!-- /TMPL_IF --></span>
535
        <!-- TMPL_IF NAME="can_renew" -->
733
        <!-- TMPL_IF NAME="can_renew" -->
536
        <input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
734
        <input type="checkbox" name="all_items[]" value="<!-- TMPL_VAR NAME="itemnumber" -->" checked="checked" style="display: none;" />
537
        <!-- TMPL_IF NAME="od" -->
735
        <!-- TMPL_IF NAME="od" -->
Lines 554-571 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
554
			On Hold
752
			On Hold
555
		<!-- /TMPL_IF -->
753
		<!-- /TMPL_IF -->
556
                <!-- TMPL_IF NAME="renew_error_too_many" -->
754
                <!-- TMPL_IF NAME="renew_error_too_many" -->
557
			Too Many Renewals
755
			Not Renewable
558
                <!-- /TMPL_IF -->
756
                <!-- /TMPL_IF -->
559
            <!-- TMPL_IF NAME="can_confirm" -->
757
            <!-- TMPL_IF NAME="can_confirm" -->
560
                </span>
758
                </span>
561
            <!-- /TMPL_IF -->
759
            <!-- /TMPL_IF -->
562
        <!-- /TMPL_IF -->
760
        <!-- /TMPL_IF -->
563
        </td>
761
        </td>
564
		<td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- TMPL_VAR NAME="barcode" -->">Check In</a></td>
762
        <!-- /TMPL_IF -->
565
		<!-- TMPL_IF NAME="renew_failed" -->
763
		  <!-- TMPL_IF NAME="return_failed" -->
566
		<td>Renewal Failed</td>
764
            <td class="problem">Checkin Failed</td>
567
		<!-- /TMPL_IF -->
765
        <!--TMPL_ELSE-->
568
766
            <td><input type="checkbox" name="barcodes[]"  value="<!-- TMPL_VAR NAME="barcode" -->" onclick="uncheck_sibling(this);" />
767
                <input type="checkbox" name="all_barcodes[]" value="<!-- TMPL_VAR NAME="barcode" -->" checked="checked" style="display: none;" />
768
            </td>
769
      <!-- /TMPL_IF -->
569
    </tr>
770
    </tr>
570
    <!-- /loop previssues --><!-- /TMPL_LOOP -->
771
    <!-- /loop previssues --><!-- /TMPL_LOOP -->
571
<!--/if previssues --><!-- /TMPL_IF -->
772
<!--/if previssues --><!-- /TMPL_IF -->
Lines 573-587 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
573
    </table>
774
    </table>
574
    <!--TMPL_IF NAME="issuecount"-->
775
    <!--TMPL_IF NAME="issuecount"-->
575
    <fieldset class="action">
776
    <fieldset class="action">
576
    <!-- TMPL_IF NAME="CAN_user_circulate_override_renewals" -->
777
        <!-- TMPL_IF NAME="CAN_user_circulate_override_renewals" -->
577
        <!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
778
        <!-- TMPL_IF NAME="AllowRenewalLimitOverride" -->
578
        <label for="override_limit">Override Renewal Limit:</label>
779
        <label for="override_limit">Override Renewal Limit:</label>
579
        <input type="checkbox" name="override_limit" id="override_limit" value="1" />
780
        <input type="checkbox" name="override_limit" id="override_limit" value="1" />
580
        <!-- /TMPL_IF -->
781
        <!-- /TMPL_IF -->
581
    <!-- /TMPL_IF -->
782
        <!-- /TMPL_IF -->
582
    <input type="submit" name="renew_checked" value="Renew Checked Items" />
783
        <input type="submit" name="renew_checked" value="Renew or Return checked items" />
583
    <input type="submit" name="renew_all" value="Renew All" />
784
        <input type="submit" id="renew_all" name="renew_all" value="Renew all" />
584
    </fieldset>
785
        <input type="submit" id="return_all" name="return_all" value="Return all" />
786
        </fieldset>
585
    <!-- /TMPL_IF -->
787
    <!-- /TMPL_IF -->
586
</form>
788
</form>
587
<!-- TMPL_ELSE -->
789
<!-- TMPL_ELSE -->
Lines 592-612 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
592
794
593
<div id="reserves">
795
<div id="reserves">
594
<!-- TMPL_IF NAME="reservloop" -->
796
<!-- TMPL_IF NAME="reservloop" -->
797
<form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
798
	<input type="hidden" name="from" value="circ" />
595
    <table id="holdst">
799
    <table id="holdst">
596
        <thead><tr>
800
        <thead><tr>
597
            <th>Hold date</th>
801
            <th>Hold date</th>
598
            <th>Title</th>
802
            <th>Title</th>
599
            <th>Item Type</th>
600
            <th>Call Number</th>
803
            <th>Call Number</th>
601
			<th>Barcode</th>
804
			<th>Barcode</th>
602
            <th>Priority</th>
805
            <th>Priority</th>
806
			<th>Delete?</th>
603
        </tr></thead>
807
        </tr></thead>
604
		<tbody>
808
		<tbody>
605
        <!-- TMPL_LOOP NAME="reservloop" -->
809
        <!-- TMPL_LOOP NAME="reservloop" -->
606
        <tr class="<!-- TMPL_VAR NAME="color" -->">
810
        <tr class="<!-- TMPL_VAR NAME="color" -->">
607
                    <td><!-- TMPL_VAR NAME="reservedate" --></td>
811
                    <td><!-- TMPL_VAR NAME="reservedate" --></td>
608
                    <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></td>
812
                    <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><strong><!-- TMPL_VAR NAME="title" escape="html" --></strong></a><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></td>
609
					<td><!-- TMPL_VAR NAME="itemtype" --></td>
610
                    <td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
813
                    <td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
611
					<td><em><!-- TMPL_IF name="barcodereserv" -->Item <!-- TMPL_VAR NAME="barcodereserv" -->
814
					<td><em><!-- TMPL_IF name="barcodereserv" -->Item <!-- TMPL_VAR NAME="barcodereserv" -->
612
                        <!-- /TMPL_IF --><!-- TMPL_IF name="waiting" --> <strong>waiting at <!-- TMPL_VAR NAME="waitingat" --></strong>
815
                        <!-- /TMPL_IF --><!-- TMPL_IF name="waiting" --> <strong>waiting at <!-- TMPL_VAR NAME="waitingat" --></strong>
Lines 617-631 No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> Link Here
617
                        <!-- TMPL_IF name="nottransfered" --> hasn't been transfered yet from <!-- TMPL_VAR NAME="nottransferedby" --></i>
820
                        <!-- TMPL_IF name="nottransfered" --> hasn't been transfered yet from <!-- TMPL_VAR NAME="nottransferedby" --></i>
618
                        <!-- /TMPL_IF --></em></td>
821
                        <!-- /TMPL_IF --></em></td>
619
                    <td>
822
                    <td>
620
                        <!-- TMPL_IF NAME="waitingposition" -->
823
                        <!-- TMPL_IF NAME="waitingposition" --><b> <!-- TMPL_VAR NAME="waitingposition" --> </b><!-- /TMPL_IF -->
621
                        Hold priority
622
                        <b> <!-- TMPL_VAR NAME="waitingposition" --> </b><!-- /TMPL_IF -->
623
                    </td>
824
                    </td>
825
				<td><select name="rank-request">
826
                    <option value="n">No</option>
827
                    <option value="del">Yes</option>
828
                </select>
829
                <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
830
                <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR name="borrowernumber" -->" />
831
            </td>
624
            </tr>
832
            </tr>
625
        <!-- /TMPL_LOOP --></tbody>
833
        <!-- /TMPL_LOOP --></tbody>
626
    </table>
834
    </table>
835
	        <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel Marked Requests" /></fieldset>
836
    </form>
627
	<!-- TMPL_ELSE -->
837
	<!-- TMPL_ELSE -->
628
	<p>Patron has no pending holds.</p>
838
	<p>Patron has nothing on hold.</p>
629
<!-- /TMPL_IF -->
839
<!-- /TMPL_IF -->
630
</div> <!-- reservesloop -->
840
</div> <!-- reservesloop -->
631
841
632
- 

Return to bug 2930