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 my $sessionID = $query->cookie("CGISESSID") ;
53 my $session = get_session($sessionID);
55 # new op dev the branch and the printer are now defined by the userenv
56 # but first we have to check if someone has tried to change them
58 my $branch = $query->param('branch');
60 # update our session so the userenv is updated
61 $session->param('branch',$branch);
62 my $branchname = GetBranchName($branch);
63 $session->param('branchname',$branchname);
66 my $printer = $query->param('printer');
68 # update our session so the userenv is updated
69 $session->param('branchprinter',$printer);
72 if (!C4::Context->userenv && !$branch){
73 if ($session->param('branch') eq 'NO_LIBRARY_SET'){
74 # no branch set we can't issue
75 print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
80 my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
82 template_name => 'circ/circulation.tmpl',
86 flagsrequired => { circulate => 'circulate_remaining_permissions' },
90 my $branches = GetBranches();
91 my $printers = GetPrinters();
93 my @failedrenews = $query->param('failedrenew');
95 for (@failedrenews) { $renew_failed[$_] = 1; }
97 my $findborrower = $query->param('findborrower');
98 $findborrower =~ s|,| |g;
99 #$findborrower =~ s|'| |g;
100 my $borrowernumber = $query->param('borrowernumber');
102 $branch = C4::Context->userenv->{'branch'};
103 $printer = C4::Context->userenv->{'branchprinter'};
106 # If Autolocated 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
108 $template->param(ManualLocation => 1);
111 my $barcode = $query->param('barcode') || '';
112 $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
114 $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
115 my $stickyduedate = $query->param('stickyduedate') || $session->param( 'stickyduedate' );
116 my $duedatespec = $query->param('duedatespec') || $session->param( 'stickyduedate' );
117 my $issueconfirmed = $query->param('issueconfirmed');
118 my $cancelreserve = $query->param('cancelreserve');
119 my $organisation = $query->param('organisations');
120 my $print = $query->param('print');
121 my $newexpiry = $query->param('dateexpiry');
122 my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
124 # Check if stickyduedate is turned off
126 # was stickyduedate loaded from session?
127 if ( $stickyduedate && ! $query->param("stickyduedate") ) {
128 $session->clear( 'stickyduedate' );
129 $stickyduedate = $query->param('stickyduedate');
130 $duedatespec = $query->param('duedatespec');
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');
143 my ($datedue,$invalidduedate,$globalduedate);
145 if(C4::Context->preference('globalDueDate') && (C4::Context->preference('globalDueDate') =~ C4::Dates->regexp('syspref'))){
146 $globalduedate = C4::Dates->new(C4::Context->preference('globalDueDate'));
148 my $duedatespec_allow = C4::Context->preference('SpecifyDueDate');
149 if($duedatespec_allow){
151 if ($duedatespec =~ C4::Dates->regexp('syspref')) {
152 my $tempdate = C4::Dates->new($duedatespec);
153 if ($tempdate and $tempdate->output('iso') gt C4::Dates->new()->output('iso')) {
154 # i.e., it has to be later than today/now
155 $datedue = $tempdate;
158 $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
162 $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
165 # pass global due date to tmpl if specifyduedate is true
166 # and we have no barcode (loading circ page but not checking out)
167 if($globalduedate && ! $barcode ){
168 $duedatespec = $globalduedate->output();
173 $datedue = $globalduedate if($globalduedate);
176 my $todaysdate = C4::Dates->new->output('iso');
178 # check and see if we should print
179 if ( $barcode eq '' && $print eq 'maybe' ) {
183 my $inprocess = ($barcode eq '') ? '' : $query->param('inprocess');
184 if ( $barcode eq '' && $query->param('charges') eq 'yes' ) {
187 borrowernumber => $borrowernumber
191 if ( $print eq 'yes' && $borrowernumber ne '' ) {
192 printslip( $borrowernumber );
193 $query->param( 'borrowernumber', '' );
194 $borrowernumber = '';
198 # STEP 2 : FIND BORROWER
199 # if there is a list of find borrowers....
204 my ( $count, $borrowers ) =
205 SearchMember($findborrower, 'cardnumber', 'web' );
206 my @borrowers = @$borrowers;
208 "AddPatronLists_".C4::Context->preference("AddPatronLists")=> "1",
210 if (C4::Context->preference("AddPatronLists")=~/code/){
211 my $categories=GetBorrowercategoryList;
212 $categories->[0]->{'first'}=1;
213 $template->param(categories=>$categories);
215 if ( $#borrowers == -1 ) {
216 $query->param( 'findborrower', '' );
217 $message = "'$findborrower'";
219 elsif ( $#borrowers == 0 ) {
220 $query->param( 'borrowernumber', $borrowers[0]->{'borrowernumber'} );
221 $query->param( 'barcode', '' );
222 $borrowernumber = $borrowers[0]->{'borrowernumber'};
225 $borrowerslist = \@borrowers;
229 # get the borrower information.....
232 if ($borrowernumber) {
233 $borrower = GetMemberDetails( $borrowernumber, 0 );
234 my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
236 # Warningdate is the date that the warning starts appearing
237 my ( $today_year, $today_month, $today_day ) = Today();
238 my ( $warning_year, $warning_month, $warning_day ) = split /-/,
239 $borrower->{'dateexpiry'};
240 my ( $enrol_year, $enrol_month, $enrol_day ) = split /-/,
241 $borrower->{'dateenrolled'};
242 # Renew day is calculated by adding the enrolment period to today
243 my ( $renew_year, $renew_month, $renew_day ) =
244 Add_Delta_YM( $enrol_year, $enrol_month, $enrol_day,
245 0 , $borrower->{'enrolmentperiod'}) if ($enrol_year*$enrol_month*$enrol_day>0);
246 # if the expiry date is before today ie they have expired
247 if ( $warning_year*$warning_month*$warning_day==0
248 || Date_to_Days( $today_year, $today_month, $today_day )
249 > Date_to_Days( $warning_year, $warning_month, $warning_day ) )
251 #borrowercard expired, no issues
255 expired => format_date($borrower->{dateexpiry}),
256 renewaldate => format_date("$renew_year-$renew_month-$renew_day")
259 # check for NotifyBorrowerDeparture
260 elsif ( C4::Context->preference('NotifyBorrowerDeparture') &&
261 Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) <
262 Date_to_Days( $today_year, $today_month, $today_day ) )
264 # borrower card soon to expire warn librarian
265 $template->param("warndeparture" => format_date($borrower->{dateexpiry}),
267 if ( C4::Context->preference('ReturnBeforeExpiry')){
268 $template->param("returnbeforeexpiry" => 1);
273 issuecount => $issue,
283 # always check for blockers on issuing
284 my ( $error, $question ) =
285 CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess );
286 my $blocker = $invalidduedate ? 1 : 0;
288 delete $question->{'DEBT'} if ($debt_confirmed);
289 foreach my $impossible ( keys %$error ) {
291 $impossible => $$error{$impossible},
297 my $confirm_required = 0;
298 unless($issueconfirmed){
299 # Get the item title for more information
300 my $getmessageiteminfo = GetBiblioFromItemNumber(undef,$barcode);
301 $template->param( itemhomebranch => $getmessageiteminfo->{'homebranch'} );
303 # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
304 foreach my $needsconfirmation ( keys %$question ) {
306 $needsconfirmation => $$question{$needsconfirmation},
307 getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
308 NEEDSCONFIRMATION => 1
310 $confirm_required = 1;
313 unless($confirm_required) {
314 AddIssue( $borrower, $barcode, $datedue, $cancelreserve );
316 if($globalduedate && ! $stickyduedate && $duedatespec_allow ){
317 $duedatespec = $globalduedate->output();
323 # FIXME If the issue is confirmed, we launch another time GetMemberIssuesAndFines, now display the issue count after issue
324 my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
325 $template->param( issuecount => $issue );
328 # reload the borrower info for the sake of reseting the flags.....
329 if ($borrowernumber) {
330 $borrower = GetMemberDetails( $borrowernumber, 0 );
333 ##################################################################################
335 # show all reserves of this borrower, and the position of the reservation ....
336 my $borrowercategory;
338 if ($borrowernumber) {
341 # now we show the status of the borrower's reservations
342 my @borrowerreserv = GetReservesFromBorrowernumber($borrowernumber );
344 my @WaitingReserveLoop;
346 foreach my $num_res (@borrowerreserv) {
348 my %getWaitingReserveInfo;
349 my $getiteminfo = GetBiblioFromItemNumber( $num_res->{'itemnumber'} );
350 my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $getiteminfo->{'itype'} : $getiteminfo->{'itemtype'} );
351 my ( $transfertwhen, $transfertfrom, $transfertto ) =
352 GetTransfers( $num_res->{'itemnumber'} );
354 $getreserv{waiting} = 0;
355 $getreserv{transfered} = 0;
356 $getreserv{nottransfered} = 0;
358 $getreserv{reservedate} = format_date( $num_res->{'reservedate'} );
359 $getreserv{title} = $getiteminfo->{'title'};
360 $getreserv{itemtype} = $itemtypeinfo->{'description'};
361 $getreserv{author} = $getiteminfo->{'author'};
362 $getreserv{barcodereserv} = $getiteminfo->{'barcode'};
363 $getreserv{itemcallnumber} = $getiteminfo->{'itemcallnumber'};
364 $getreserv{biblionumber} = $getiteminfo->{'biblionumber'};
365 $getreserv{waitingat} = GetBranchName( $num_res->{'branchcode'} );
366 # check if we have a waiting status for reservations
367 if ( $num_res->{'found'} eq 'W' ) {
368 $getreserv{color} = 'reserved';
369 $getreserv{waiting} = 1;
370 # genarate information displaying only waiting reserves
371 $getWaitingReserveInfo{title} = $getiteminfo->{'title'};
372 $getWaitingReserveInfo{biblionumber} = $getiteminfo->{'biblionumber'};
373 $getWaitingReserveInfo{itemtype} = $itemtypeinfo->{'description'};
374 $getWaitingReserveInfo{author} = $getiteminfo->{'author'};
375 $getWaitingReserveInfo{reservedate} = format_date( $num_res->{'reservedate'} );
376 $getWaitingReserveInfo{waitingat} = GetBranchName( $num_res->{'branchcode'} );
377 if($num_res->{'branchcode'} eq $branch){ $getWaitingReserveInfo{waitinghere} = 1; }
379 # check transfers with the itemnumber foud in th reservation loop
380 if ($transfertwhen) {
381 $getreserv{color} = 'transfered';
382 $getreserv{transfered} = 1;
383 $getreserv{datesent} = format_date($transfertwhen);
384 $getreserv{frombranch} = GetBranchName($transfertfrom);
387 if ( ( $getiteminfo->{'holdingbranch'} ne $num_res->{'branchcode'} )
388 and not $transfertwhen )
390 $getreserv{nottransfered} = 1;
391 $getreserv{nottransferedby} =
392 GetBranchName( $getiteminfo->{'holdingbranch'} );
395 # if we don't have a reserv on item, we put the biblio infos and the waiting position
396 if ( $getiteminfo->{'title'} eq '' ) {
397 my $getbibinfo = GetBiblioData( $num_res->{'biblionumber'} );
398 my $getbibtype = getitemtypeinfo( $getbibinfo->{'itemtype'} ); # fixme - we should have item-level reserves here ?
399 $getreserv{color} = 'inwait';
400 $getreserv{title} = $getbibinfo->{'title'};
401 $getreserv{nottransfered} = 0;
402 $getreserv{itemtype} = $getbibtype->{'description'};
403 $getreserv{author} = $getbibinfo->{'author'};
404 $getreserv{biblionumber} = $num_res->{'biblionumber'};
406 $getreserv{waitingposition} = $num_res->{'priority'};
407 push( @reservloop, \%getreserv );
409 # if we have a reserve waiting, initiate waitingreserveloop
410 if ($getreserv{waiting} eq 1) {
411 push (@WaitingReserveLoop, \%getWaitingReserveInfo)
416 # return result to the template
418 countreserv => scalar @reservloop,
419 reservloop => \@reservloop ,
420 WaitingReserveLoop => \@WaitingReserveLoop,
422 $template->param( adultborrower => 1 ) if ( $borrower->{'category_type'} eq 'A' );
425 # make the issued books table.
426 my $todaysissues = '';
431 ## ADDED BY JF: new itemtype issuingrules counter stuff
432 my $issued_itemtypes_loop;
433 my $issued_itemtypes_count;
434 my $issued_itemtypes_allowed_count; # hashref with total allowed by itemtype
435 my $issued_itemtypes_remaining; # hashref with remaining
436 my $issued_itemtypes_flags; #hashref that stores flags
437 my @issued_itemtypes_count_loop;
440 # get each issue of the borrower & separate them in todayissues & previous issues
441 my ($issueslist) = GetPendingIssues($borrower->{'borrowernumber'});
443 # split in 2 arrays for today & previous
444 foreach my $it ( @$issueslist ) {
445 # set itemtype per item-level_itype syspref - FIXME this is an ugly hack
446 $it->{'itemtype'} = ( C4::Context->preference( 'item-level_itypes' ) ) ? $it->{'itype'} : $it->{'itemtype'};
448 ($it->{'charge'}, $it->{'itemtype_charge'}) = GetIssuingCharges(
449 $it->{'itemnumber'}, $borrower->{'borrowernumber'}
451 $it->{'charge'} = sprintf("%.2f", $it->{'charge'});
452 my ($can_renew, $can_renew_error) = CanBookBeRenewed(
453 $borrower->{'borrowernumber'},$it->{'itemnumber'}
455 $it->{"renew_error_${can_renew_error}"} = 1 if defined $can_renew_error;
456 my ( $restype, $reserves ) = CheckReserves( $it->{'itemnumber'} );
457 $it->{'can_renew'} = $can_renew;
458 $it->{'can_confirm'} = !$can_renew && !$restype;
459 $it->{'renew_error'} = $restype;
461 $it->{'dd'} = format_date($it->{'date_due'});
462 $it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ;
463 ($it->{'author'} eq '') and $it->{'author'} = ' ';
464 $it->{'renew_failed'} = $renew_failed[$it->{'itemnumber'}];
465 # ADDED BY JF: NEW ITEMTYPE COUNT DISPLAY
466 $issued_itemtypes_count->{ $it->{'itemtype'} }++;
468 if ( $todaysdate eq $it->{'issuedate'} or $todaysdate eq $it->{'lastreneweddate'} ) {
469 push @todaysissues, $it;
471 push @previousissues, $it;
474 if ( C4::Context->preference( "todaysIssuesDefaultSortOrder" ) eq 'asc' ) {
475 @todaysissues = sort { $a->{'timestamp'} cmp $b->{'timestamp'} } @todaysissues;
478 @todaysissues = sort { $b->{'timestamp'} cmp $a->{'timestamp'} } @todaysissues;
480 if ( C4::Context->preference( "previousIssuesDefaultSortOrder" ) eq 'asc' ){
481 @previousissues = sort { $a->{'date_due'} cmp $b->{'date_due'} } @previousissues;
484 @previousissues = sort { $b->{'date_due'} cmp $a->{'date_due'} } @previousissues;
488 #### ADDED BY JF FOR COUNTS BY ITEMTYPE RULES
489 # FIXME: This should utilize all the issuingrules options rather than just the defaults
490 # and it should be moved to a module
491 my $dbh = C4::Context->dbh;
493 # how many of each is allowed?
494 my $issueqty_sth = $dbh->prepare( "
495 SELECT itemtypes.description AS description,issuingrules.itemtype,maxissueqty
497 LEFT JOIN itemtypes ON (itemtypes.itemtype=issuingrules.itemtype)
500 #my @issued_itemtypes_count; # huh?
501 $issueqty_sth->execute("*"); # This is a literal asterisk, not a wildcard.
503 while ( my $data = $issueqty_sth->fetchrow_hashref() ) {
505 # subtract how many of each this borrower has
506 $data->{'count'} = $issued_itemtypes_count->{ $data->{'description'} };
508 ( $data->{'maxissueqty'} -
509 $issued_itemtypes_count->{ $data->{'description'} } );
511 # can't have a negative number of remaining
512 if ( $data->{'left'} < 0 ) { $data->{'left'} = "0" }
513 $data->{'flag'} = 1 unless ( $data->{'maxissueqty'} > $data->{'count'} );
514 unless ( ( $data->{'maxissueqty'} < 1 )
515 || ( $data->{'itemtype'} eq "*" )
516 || ( $data->{'itemtype'} eq "CIRC" ) )
518 push @issued_itemtypes_count_loop, $data;
521 $issued_itemtypes_loop = \@issued_itemtypes_count_loop;
527 my $CGIselectborrower;
528 if ($borrowerslist) {
530 sort {(lc $a->{'surname'} cmp lc $b->{'surname'} || lc $a->{'firstname'} cmp lc $b->{'firstname'})
534 push @values, $_->{'borrowernumber'};
535 $labels{ $_->{'borrowernumber'} } =
536 "$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ... $_->{'address'} ";
538 $CGIselectborrower = CGI::scrolling_list(
539 -name => 'borrowernumber',
541 -id => 'borrowernumber',
544 -onclick => "window.location = '/cgi-bin/koha/circ/circulation.pl?borrowernumber=' + this.value;",
552 my $flags = $borrower->{'flags'};
555 foreach $flag ( sort keys %$flags ) {
556 $template->param( flagged=> 1);
557 $flags->{$flag}->{'message'} =~ s#\n#<br />#g;
558 if ( $flags->{$flag}->{'noissues'} ) {
563 if ( $flag eq 'GNA' ) {
564 $template->param( gna => 'true' );
566 if ( $flag eq 'LOST' ) {
567 $template->param( lost => 'true' );
569 if ( $flag eq 'DBARRED' ) {
570 $template->param( dbarred => 'true' );
572 if ( $flag eq 'CHARGES' ) {
575 chargesmsg => $flags->{'CHARGES'}->{'message'},
576 chargesamount => $flags->{'CHARGES'}->{'amount'},
577 charges_is_blocker => 1
580 if ( $flag eq 'CREDITS' ) {
583 creditsmsg => $flags->{'CREDITS'}->{'message'}
588 if ( $flag eq 'CHARGES' ) {
592 chargesmsg => $flags->{'CHARGES'}->{'message'},
593 chargesamount => $flags->{'CHARGES'}->{'amount'},
596 if ( $flag eq 'CREDITS' ) {
599 creditsmsg => $flags->{'CREDITS'}->{'message'}
602 if ( $flag eq 'ODUES' ) {
606 oduesmsg => $flags->{'ODUES'}->{'message'}
609 my $items = $flags->{$flag}->{'itemlist'};
613 # foreach my $item (@$items) {
614 # my ($iteminformation) =
615 # getiteminformation( $item->{'itemnumber'}, 0 );
616 # push @itemswaiting, $iteminformation;
619 if ( $query->param('module') ne 'returns' ) {
620 $template->param( nonreturns => 'true' );
623 if ( $flag eq 'NOTES' ) {
627 notesmsg => $flags->{'NOTES'}->{'message'}
633 my $amountold = $borrower->{flags}->{'CHARGES'}->{'message'} || 0;
634 my @temp = split( /\$/, $amountold );
636 if ( $borrower->{'category_type'} eq 'C') {
637 my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
638 my $cnt = scalar(@$catcodes);
639 $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1;
640 $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1;
643 my $CGIorganisations;
644 my $member_of_institution;
645 if ( C4::Context->preference("memberofinstitution") ) {
646 my $organisations = get_institutions();
649 foreach my $organisation ( keys %$organisations ) {
650 push @orgs, $organisation;
651 $org_labels{$organisation} =
652 $organisations->{$organisation}->{'surname'};
654 $member_of_institution = 1;
655 $CGIorganisations = CGI::popup_menu(
656 -id => 'organisations',
657 -name => 'organisations',
658 -labels => \%org_labels,
663 $amountold = $temp[1];
666 issued_itemtypes_count_loop => $issued_itemtypes_loop,
667 findborrower => $findborrower,
668 borrower => $borrower,
669 borrowernumber => $borrowernumber,
671 branchname => GetBranchName($borrower->{'branchcode'}),
673 printername => $printer,
674 firstname => $borrower->{'firstname'},
675 surname => $borrower->{'surname'},
676 dateexpiry => format_date($newexpiry),
677 expiry => format_date($borrower->{'dateexpiry'}),
678 categorycode => $borrower->{'categorycode'},
679 categoryname => $borrower->{description},
680 address => $borrower->{'address'},
681 address2 => $borrower->{'address2'},
682 email => $borrower->{'email'},
683 emailpro => $borrower->{'emailpro'},
684 borrowernotes => $borrower->{'borrowernotes'},
685 city => $borrower->{'city'},
686 zipcode => $borrower->{'zipcode'},
687 phone => $borrower->{'phone'} || $borrower->{'mobile'},
688 cardnumber => $borrower->{'cardnumber'},
689 amountold => $amountold,
691 stickyduedate => $stickyduedate,
692 duedatespec => $duedatespec,
694 CGIselectborrower => $CGIselectborrower,
695 todayissues => \@todaysissues,
696 previssues => \@previousissues,
697 inprocess => $inprocess,
698 memberofinstution => $member_of_institution,
699 CGIorganisations => $CGIorganisations,
700 is_child => ($borrower->{'category_type'} eq 'C'),
704 # save stickyduedate to session
705 if ($stickyduedate) {
706 $session->param( 'stickyduedate', $duedatespec );
709 #if ($branchcookie) {
710 #$cookie=[$cookie, $branchcookie, $printercookie];
713 my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'});
714 $template->param( picture => 1 ) if $picture;
718 debt_confirmed => $debt_confirmed,
719 SpecifyDueDate => $duedatespec_allow,
720 CircAutocompl => C4::Context->preference("CircAutocompl"),
721 AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
722 dateformat => C4::Context->preference("dateformat"),
723 DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
725 output_html_with_http_headers $query, $cookie, $template->output;