3 # written 8/5/2002 by Finlay
4 # script to execute issuing of books
6 # Copyright 2000-2002 Katipo Communications
8 # This file is part of Koha.
10 # Koha is free software; you can redistribute it and/or modify it under the
11 # terms of the GNU General Public License as published by the Free Software
12 # Foundation; either version 2 of the License, or (at your option) any later
15 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License along with
20 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
21 # Suite 330, Boston, MA 02111-1307 USA
24 # use warnings; # FIXME
28 use C4::Auth qw/:DEFAULT get_session/;
29 use C4::Dates qw/format_date/;
30 use C4::Branch; # GetBranches
31 use C4::Koha; # GetPrinter
52 # new op dev the branch and the printer are now defined by the userenv
53 # but first we have to check if someone has tried to change them
55 my $branch = $query->param('branch');
57 # update our session so the userenv is updated
58 my $sessionID = $query->cookie("CGISESSID") ;
59 my $session = get_session($sessionID);
60 $session->param('branch',$branch);
61 my $branchname = GetBranchName($branch);
62 $session->param('branchname',$branchname);
65 my $printer = $query->param('printer');
67 # update our session so the userenv is updated
68 my $sessionID = $query->cookie("CGISESSID") ;
69 my $session = get_session($sessionID);
70 $session->param('branchprinter',$printer);
73 if (!C4::Context->userenv && !$branch){
74 my $sessionID = $query->cookie("CGISESSID") ;
75 my $session = get_session($sessionID);
76 if ($session->param('branch') eq 'NO_LIBRARY_SET'){
77 # no branch set we can't issue
78 print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
83 my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
85 template_name => 'circ/circulation.tmpl',
89 flagsrequired => { circulate => 1 },
93 my $branches = GetBranches();
94 my $printers = GetPrinters();
96 my @failedrenews = $query->param('failedrenew');
98 for (@failedrenews) { $renew_failed[$_] = 1; }
100 my $findborrower = $query->param('findborrower');
101 $findborrower =~ s|,| |g;
102 #$findborrower =~ s|'| |g;
103 my $borrowernumber = $query->param('borrowernumber');
105 $branch = C4::Context->userenv->{'branch'};
106 $printer = C4::Context->userenv->{'branchprinter'};
109 # If Autolocated is not activated, we show the Circulation Parameters to chage settings of librarian
110 if (C4::Context->preference("AutoLocation") ne 1) { # FIXME: string comparison to number
111 $template->param(ManualLocation => 1);
114 my $barcode = $query->param('barcode') || '';
115 $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
117 $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
118 my $stickyduedate = $query->param('stickyduedate') || $session->param( 'stickyduedate' );
119 my $duedatespec = $query->param('duedatespec') || $session->param( 'stickyduedate' );
120 my $issueconfirmed = $query->param('issueconfirmed');
121 my $cancelreserve = $query->param('cancelreserve');
122 my $organisation = $query->param('organisations');
123 my $print = $query->param('print');
124 my $newexpiry = $query->param('dateexpiry');
125 my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
127 # Check if stickyduedate is turned off
129 # was stickyduedate loaded from session?
130 if ( $stickyduedate && ! $query->param("stickyduedate") ) {
131 $session->clear( 'stickyduedate' );
132 $stickyduedate = $query->param('stickyduedate');
133 $duedatespec = $query->param('duedatespec');
140 # if ($query->param('setcookies')) {
141 # $branchcookie = $query->cookie(-name=>'branch', -value=>"$branch", -expires=>'+1y');
142 # $printercookie = $query->cookie(-name=>'printer', -value=>"$printer", -expires=>'+1y');
146 my ($datedue,$invalidduedate);
148 if ($duedatespec =~ C4::Dates->regexp('syspref')) {
149 my $tempdate = C4::Dates->new($duedatespec);
150 if ($tempdate and $tempdate->output('iso') gt C4::Dates->new()->output('iso')) {
151 # i.e., it has to be later than today/now
152 $datedue = $tempdate;
155 $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
159 $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
163 my $todaysdate = C4::Dates->new->output('iso');
165 # check and see if we should print
166 if ( $barcode eq '' && $print eq 'maybe' ) {
170 my $inprocess = ($barcode eq '') ? '' : $query->param('inprocess');
172 if ( $barcode eq '' && $query->param('charges') eq 'yes' ) {
175 borrowernumber => $borrowernumber
179 if ( $print eq 'yes' && $borrowernumber ne '' ) {
180 printslip( $borrowernumber );
181 $query->param( 'borrowernumber', '' );
182 $borrowernumber = '';
186 # STEP 2 : FIND BORROWER
187 # if there is a list of find borrowers....
192 my ( $count, $borrowers ) =
193 SearchMember($findborrower, 'cardnumber', 'web' );
194 my @borrowers = @$borrowers;
196 "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1",
198 if (C4::Context->preference("AddPatronLists")=~/code/){
199 my $categories=GetBorrowercategoryList;
200 $categories->[0]->{'first'}=1;
201 $template->param(categories=>$categories);
203 if ( $#borrowers == -1 ) {
204 $query->param( 'findborrower', '' );
205 $message = "'$findborrower'";
207 elsif ( $#borrowers == 0 ) {
208 $query->param( 'borrowernumber', $borrowers[0]->{'borrowernumber'} );
209 $query->param( 'barcode', '' );
210 $borrowernumber = $borrowers[0]->{'borrowernumber'};
213 $borrowerslist = \@borrowers;
217 # get the borrower information.....
220 if ($borrowernumber) {
221 $borrower = GetMemberDetails( $borrowernumber, 0 );
222 my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
224 # Warningdate is the date that the warning starts appearing
225 my ( $today_year, $today_month, $today_day ) = Today();
226 my ( $warning_year, $warning_month, $warning_day ) = split /-/,
227 $borrower->{'dateexpiry'};
228 my ( $enrol_year, $enrol_month, $enrol_day ) = split /-/,
229 $borrower->{'dateenrolled'};
230 # Renew day is calculated by adding the enrolment period to today
231 my ( $renew_year, $renew_month, $renew_day ) =
232 Add_Delta_YM( $enrol_year, $enrol_month, $enrol_day,
233 0 , $borrower->{'enrolmentperiod'}) if ($enrol_year*$enrol_month*$enrol_day>0);
234 # if the expiry date is before today ie they have expired
235 if ( $warning_year*$warning_month*$warning_day==0
236 || Date_to_Days( $today_year, $today_month, $today_day )
237 > Date_to_Days( $warning_year, $warning_month, $warning_day ) )
239 #borrowercard expired, no issues
243 expired => format_date($borrower->{dateexpiry}),
244 renewaldate => format_date("$renew_year-$renew_month-$renew_day")
247 # check for NotifyBorrowerDeparture
248 elsif ( C4::Context->preference('NotifyBorrowerDeparture') &&
249 Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) <
250 Date_to_Days( $today_year, $today_month, $today_day ) )
252 # borrower card soon to expire warn librarian
253 $template->param("warndeparture" => format_date($borrower->{dateexpiry}),
255 if ( C4::Context->preference('ReturnBeforeExpiry')){
256 $template->param("returnbeforeexpiry" => 1);
261 issuecount => $issue,
271 # always check for blockers on issuing
272 my ( $error, $question ) =
273 CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess );
274 my $noerror = $invalidduedate ? 0 : 1;
276 delete $question->{'DEBT'} if ($debt_confirmed);
277 foreach my $impossible ( keys %$error ) {
278 if ($impossible eq "NOT_FOR_LOAN_CAN_FORCE"){
279 $$question{$impossible}=$$error{$impossible},
282 $impossible => $$error{$impossible},
289 if ($issueconfirmed && $noerror) {
290 # we have no blockers for issuing and any issues needing confirmation have been resolved
291 AddIssue( $borrower, $barcode, $datedue, $cancelreserve );
294 elsif ($issueconfirmed){ # FIXME: Do something? Or is this to *intentionally* do nothing?
295 if (C4::Context->preference("AllowNotForLoanOverride")){
296 AddIssue( $borrower, $barcode, $datedue, $cancelreserve );
297 $template->param(IMPOSSIBLE => 0);
303 # Get the item title for more information
304 my $getmessageiteminfo = GetBiblioFromItemNumber(undef,$barcode);
306 # only pass needsconfirmation to template if issuing is possible
307 foreach my $needsconfirmation ( keys %$question ) {
309 $needsconfirmation => $$question{$needsconfirmation},
310 getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
311 NEEDSCONFIRMATION => 1
315 # Because of the weird conditional structure (empty elsif block),
316 # if we reached here, $issueconfirmed must be false.
317 # Also, since we moved inside the if ($noerror) conditional,
318 # this old chunky conditional can be simplified:
319 # if ( $noerror && ( $noquestion || $issueconfirmed ) ) {
321 AddIssue( $borrower, $barcode, $datedue );
326 itemhomebranch => $getmessageiteminfo->{'homebranch'} ,
327 duedatespec => $duedatespec,
331 # FIXME If the issue is confirmed, we launch another time borrdata2, now display the issue count after issue
332 my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
334 issuecount => $issue,
338 # reload the borrower info for the sake of reseting the flags.....
339 if ($borrowernumber) {
340 $borrower = GetMemberDetails( $borrowernumber, 0 );
343 ##################################################################################
345 # show all reserves of this borrower, and the position of the reservation ....
346 my $borrowercategory;
348 if ($borrowernumber) {
351 # now we show the status of the borrower's reservations
352 my @borrowerreserv = GetReservesFromBorrowernumber($borrowernumber );
354 my @WaitingReserveLoop;
356 foreach my $num_res (@borrowerreserv) {
358 my %getWaitingReserveInfo;
359 my $getiteminfo = GetBiblioFromItemNumber( $num_res->{'itemnumber'} );
360 my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $getiteminfo->{'itype'} : $getiteminfo->{'itemtype'} );
361 my ( $transfertwhen, $transfertfrom, $transfertto ) =
362 GetTransfers( $num_res->{'itemnumber'} );
364 $getreserv{waiting} = 0;
365 $getreserv{transfered} = 0;
366 $getreserv{nottransfered} = 0;
368 $getreserv{reservedate} = format_date( $num_res->{'reservedate'} );
369 $getreserv{title} = $getiteminfo->{'title'};
370 $getreserv{itemtype} = $itemtypeinfo->{'description'};
371 $getreserv{author} = $getiteminfo->{'author'};
372 $getreserv{barcodereserv} = $getiteminfo->{'barcode'};
373 $getreserv{itemcallnumber} = $getiteminfo->{'itemcallnumber'};
374 $getreserv{biblionumber} = $getiteminfo->{'biblionumber'};
375 $getreserv{waitingat} = GetBranchName( $num_res->{'branchcode'} );
376 # check if we have a waiting status for reservations
377 if ( $num_res->{'found'} eq 'W' ) {
378 $getreserv{color} = 'reserved';
379 $getreserv{waiting} = 1;
380 # genarate information displaying only waiting reserves
381 $getWaitingReserveInfo{title} = $getiteminfo->{'title'};
382 $getWaitingReserveInfo{biblionumber} = $getiteminfo->{'biblionumber'};
383 $getWaitingReserveInfo{itemtype} = $itemtypeinfo->{'description'};
384 $getWaitingReserveInfo{author} = $getiteminfo->{'author'};
385 $getWaitingReserveInfo{reservedate} = format_date( $num_res->{'reservedate'} );
386 $getWaitingReserveInfo{waitingat} = GetBranchName( $num_res->{'branchcode'} );
387 if($num_res->{'branchcode'} eq $branch){ $getWaitingReserveInfo{waitinghere} = 1; }
389 # check transfers with the itemnumber foud in th reservation loop
390 if ($transfertwhen) {
391 $getreserv{color} = 'transfered';
392 $getreserv{transfered} = 1;
393 $getreserv{datesent} = format_date($transfertwhen);
394 $getreserv{frombranch} = GetBranchName($transfertfrom);
397 if ( ( $getiteminfo->{'holdingbranch'} ne $num_res->{'branchcode'} )
398 and not $transfertwhen )
400 $getreserv{nottransfered} = 1;
401 $getreserv{nottransferedby} =
402 GetBranchName( $getiteminfo->{'holdingbranch'} );
405 # if we don't have a reserv on item, we put the biblio infos and the waiting position
406 if ( $getiteminfo->{'title'} eq '' ) {
407 my $getbibinfo = GetBiblioData( $num_res->{'biblionumber'} );
408 my $getbibtype = getitemtypeinfo( $getbibinfo->{'itemtype'} ); # fixme - we should have item-level reserves here ?
409 $getreserv{color} = 'inwait';
410 $getreserv{title} = $getbibinfo->{'title'};
411 $getreserv{nottransfered} = 0;
412 $getreserv{itemtype} = $getbibtype->{'description'};
413 $getreserv{author} = $getbibinfo->{'author'};
414 $getreserv{biblionumber} = $num_res->{'biblionumber'};
416 $getreserv{waitingposition} = $num_res->{'priority'};
417 push( @reservloop, \%getreserv );
419 # if we have a reserve waiting, initiate waitingreserveloop
420 if ($getreserv{waiting} eq 1) {
421 push (@WaitingReserveLoop, \%getWaitingReserveInfo)
426 # return result to the template
428 countreserv => scalar @reservloop,
429 reservloop => \@reservloop ,
430 WaitingReserveLoop => \@WaitingReserveLoop,
432 $template->param( adultborrower => 1 ) if ( $borrower->{'category_type'} eq 'A' );
435 # make the issued books table.
436 my $todaysissues = '';
441 ## ADDED BY JF: new itemtype issuingrules counter stuff
442 my $issued_itemtypes_loop;
443 my $issued_itemtypes_count;
444 my $issued_itemtypes_allowed_count; # hashref with total allowed by itemtype
445 my $issued_itemtypes_remaining; # hashref with remaining
446 my $issued_itemtypes_flags; #hashref that stores flags
447 my @issued_itemtypes_count_loop;
450 # get each issue of the borrower & separate them in todayissues & previous issues
451 my ($issueslist) = GetPendingIssues($borrower->{'borrowernumber'});
453 # split in 2 arrays for today & previous
454 foreach my $it ( @$issueslist ) {
455 # set itemtype per item-level_itype syspref - FIXME this is an ugly hack
456 $it->{'itemtype'} = ( C4::Context->preference( 'item-level_itypes' ) ) ? $it->{'itype'} : $it->{'itemtype'};
458 ($it->{'charge'}, $it->{'itemtype_charge'}) = GetIssuingCharges(
459 $it->{'itemnumber'}, $borrower->{'borrowernumber'}
461 $it->{'charge'} = sprintf("%.2f", $it->{'charge'});
462 my ($can_renew, $can_renew_error) = CanBookBeRenewed(
463 $borrower->{'borrowernumber'},$it->{'itemnumber'}
465 $it->{"renew_error_${can_renew_error}"} = 1 if defined $can_renew_error;
466 my ( $restype, $reserves ) = CheckReserves( $it->{'itemnumber'} );
467 $it->{'can_renew'} = $can_renew;
468 $it->{'can_confirm'} = !$can_renew && !$restype;
469 $it->{'renew_error'} = $restype;
471 $it->{'dd'} = format_date($it->{'date_due'});
472 $it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ;
473 ($it->{'author'} eq '') and $it->{'author'} = ' ';
474 $it->{'renew_failed'} = $renew_failed[$it->{'itemnumber'}];
475 # ADDED BY JF: NEW ITEMTYPE COUNT DISPLAY
476 $issued_itemtypes_count->{ $it->{'itemtype'} }++;
478 if ( $todaysdate eq $it->{'issuedate'} or $todaysdate eq $it->{'lastreneweddate'} ) {
479 push @todaysissues, $it;
481 push @previousissues, $it;
484 if ( C4::Context->preference( "todaysIssuesDefaultSortOrder" ) eq 'asc' ) {
485 @todaysissues = sort { $a->{'timestamp'} cmp $b->{'timestamp'} } @todaysissues;
488 @todaysissues = sort { $b->{'timestamp'} cmp $a->{'timestamp'} } @todaysissues;
490 if ( C4::Context->preference( "previousIssuesDefaultSortOrder" ) eq 'asc' ){
491 @previousissues = sort { $a->{'date_due'} cmp $b->{'date_due'} } @previousissues;
494 @previousissues = sort { $b->{'date_due'} cmp $a->{'date_due'} } @previousissues;
498 #### ADDED BY JF FOR COUNTS BY ITEMTYPE RULES
499 # FIXME: This should utilize all the issuingrules options rather than just the defaults
500 # and it should be moved to a module
501 my $dbh = C4::Context->dbh;
503 # how many of each is allowed?
504 my $issueqty_sth = $dbh->prepare( "
505 SELECT itemtypes.description AS description,issuingrules.itemtype,maxissueqty
507 LEFT JOIN itemtypes ON (itemtypes.itemtype=issuingrules.itemtype)
510 #my @issued_itemtypes_count; # huh?
511 $issueqty_sth->execute("*"); # This is a literal asterisk, not a wildcard.
513 while ( my $data = $issueqty_sth->fetchrow_hashref() ) {
515 # subtract how many of each this borrower has
516 $data->{'count'} = $issued_itemtypes_count->{ $data->{'description'} };
518 ( $data->{'maxissueqty'} -
519 $issued_itemtypes_count->{ $data->{'description'} } );
521 # can't have a negative number of remaining
522 if ( $data->{'left'} < 0 ) { $data->{'left'} = "0" }
523 $data->{'flag'} = 1 unless ( $data->{'maxissueqty'} > $data->{'count'} );
524 unless ( ( $data->{'maxissueqty'} < 1 )
525 || ( $data->{'itemtype'} eq "*" )
526 || ( $data->{'itemtype'} eq "CIRC" ) )
528 push @issued_itemtypes_count_loop, $data;
531 $issued_itemtypes_loop = \@issued_itemtypes_count_loop;
537 my $CGIselectborrower;
538 if ($borrowerslist) {
540 sort {(lc $a->{'surname'} cmp lc $b->{'surname'} || lc $a->{'firstname'} cmp lc $b->{'firstname'})
544 push @values, $_->{'borrowernumber'};
545 $labels{ $_->{'borrowernumber'} } =
546 "$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ... $_->{'address'} ";
548 $CGIselectborrower = CGI::scrolling_list(
549 -name => 'borrowernumber',
551 -id => 'borrowernumber',
554 -onclick => "window.location = '/cgi-bin/koha/circ/circulation.pl?borrowernumber=' + this.value;",
562 my $flags = $borrower->{'flags'};
565 foreach $flag ( sort keys %$flags ) {
566 $template->param( flagged=> 1);
567 $flags->{$flag}->{'message'} =~ s#\n#<br />#g;
568 if ( $flags->{$flag}->{'noissues'} ) {
573 if ( $flag eq 'GNA' ) {
574 $template->param( gna => 'true' );
576 if ( $flag eq 'LOST' ) {
577 $template->param( lost => 'true' );
579 if ( $flag eq 'DBARRED' ) {
580 $template->param( dbarred => 'true' );
582 if ( $flag eq 'CHARGES' ) {
585 chargesmsg => $flags->{'CHARGES'}->{'message'},
586 chargesamount => $flags->{'CHARGES'}->{'amount'},
587 charges_is_blocker => 1
590 if ( $flag eq 'CREDITS' ) {
593 creditsmsg => $flags->{'CREDITS'}->{'message'}
598 if ( $flag eq 'CHARGES' ) {
602 chargesmsg => $flags->{'CHARGES'}->{'message'},
603 chargesamount => $flags->{'CHARGES'}->{'amount'},
606 if ( $flag eq 'CREDITS' ) {
609 creditsmsg => $flags->{'CREDITS'}->{'message'}
612 if ( $flag eq 'ODUES' ) {
616 oduesmsg => $flags->{'ODUES'}->{'message'}
619 my $items = $flags->{$flag}->{'itemlist'};
623 # foreach my $item (@$items) {
624 # my ($iteminformation) =
625 # getiteminformation( $item->{'itemnumber'}, 0 );
626 # push @itemswaiting, $iteminformation;
629 if ( $query->param('module') ne 'returns' ) {
630 $template->param( nonreturns => 'true' );
633 if ( $flag eq 'NOTES' ) {
637 notesmsg => $flags->{'NOTES'}->{'message'}
643 my $amountold = $borrower->{flags}->{'CHARGES'}->{'message'} || 0;
644 my @temp = split( /\$/, $amountold );
646 if ( $borrower->{'category_type'} eq 'C') {
647 my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
648 my $cnt = scalar(@$catcodes);
649 $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1;
650 $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1;
653 my $CGIorganisations;
654 my $member_of_institution;
655 if ( C4::Context->preference("memberofinstitution") ) {
656 my $organisations = get_institutions();
659 foreach my $organisation ( keys %$organisations ) {
660 push @orgs, $organisation;
661 $org_labels{$organisation} =
662 $organisations->{$organisation}->{'surname'};
664 $member_of_institution = 1;
665 $CGIorganisations = CGI::popup_menu(
666 -id => 'organisations',
667 -name => 'organisations',
668 -labels => \%org_labels,
673 $amountold = $temp[1];
676 issued_itemtypes_count_loop => $issued_itemtypes_loop,
677 findborrower => $findborrower,
678 borrower => $borrower,
679 borrowernumber => $borrowernumber,
681 branchname => GetBranchName($borrower->{'branchcode'}),
683 printername => $printer,
684 firstname => $borrower->{'firstname'},
685 surname => $borrower->{'surname'},
686 dateexpiry => format_date($newexpiry),
687 expiry => format_date($borrower->{'dateexpiry'}),
688 categorycode => $borrower->{'categorycode'},
689 categoryname => $borrower->{description},
690 address => $borrower->{'address'},
691 address2 => $borrower->{'address2'},
692 email => $borrower->{'email'},
693 emailpro => $borrower->{'emailpro'},
694 borrowernotes => $borrower->{'borrowernotes'},
695 city => $borrower->{'city'},
696 zipcode => $borrower->{'zipcode'},
697 phone => $borrower->{'phone'} || $borrower->{'mobile'},
698 cardnumber => $borrower->{'cardnumber'},
699 amountold => $amountold,
701 stickyduedate => $stickyduedate,
703 CGIselectborrower => $CGIselectborrower,
704 todayissues => \@todaysissues,
705 previssues => \@previousissues,
706 inprocess => $inprocess,
707 memberofinstution => $member_of_institution,
708 CGIorganisations => $CGIorganisations,
709 is_child => ($borrower->{'category_type'} eq 'C'),
713 # save stickyduedate to session
714 if ($stickyduedate) {
715 $session->param( 'stickyduedate', $duedatespec );
718 #if ($branchcookie) {
719 #$cookie=[$cookie, $branchcookie, $printercookie];
722 my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'});
723 $template->param( picture => 1 ) if $picture;
727 debt_confirmed => $debt_confirmed,
728 SpecifyDueDate => C4::Context->preference("SpecifyDueDate"),
729 CircAutocompl => C4::Context->preference("CircAutocompl"),
730 AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
731 dateformat => C4::Context->preference("dateformat"),
732 DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
734 output_html_with_http_headers $query, $cookie, $template->output;