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
20 # with Koha; if not, write to the Free Software Foundation, Inc.,
21 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #use warnings; FIXME - Bug 2505
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 # branch and 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 $session->param('branchname', GetBranchName
($branch));
65 my $printer = $query->param('printer');
67 # update our session so the userenv is updated
68 $session->param('branchprinter', $printer);
71 if (!C4
::Context
->userenv && !$branch){
72 if ($session->param('branch') eq 'NO_LIBRARY_SET'){
73 # no branch set we can't issue
74 print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
79 my ( $template, $loggedinuser, $cookie ) = get_template_and_user
(
81 template_name
=> 'circ/circulation.tmpl',
85 flagsrequired
=> { circulate
=> 'circulate_remaining_permissions' },
89 my $branches = GetBranches
();
91 my @failedrenews = $query->param('failedrenew'); # expected to be itemnumbers
93 for (@failedrenews) { $renew_failed{$_} = 1; }
95 my $findborrower = $query->param('findborrower');
96 $findborrower =~ s
|,| |g
;
97 my $borrowernumber = $query->param('borrowernumber');
99 $branch = C4
::Context
->userenv->{'branch'};
100 $printer = C4
::Context
->userenv->{'branchprinter'};
103 # If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian
104 if (C4
::Context
->preference("AutoLocation") != 1) {
105 $template->param(ManualLocation
=> 1);
108 if (C4
::Context
->preference("DisplayClearScreenButton")) {
109 $template->param(DisplayClearScreenButton
=> 1);
112 my $barcode = $query->param('barcode') || '';
113 $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
115 $barcode = barcodedecode
($barcode) if( $barcode && C4
::Context
->preference('itemBarcodeInputFilter'));
116 my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate');
117 my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate');
118 my $issueconfirmed = $query->param('issueconfirmed');
119 my $cancelreserve = $query->param('cancelreserve');
120 my $organisation = $query->param('organisations');
121 my $print = $query->param('print');
122 my $newexpiry = $query->param('dateexpiry');
123 my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
125 # Check if stickyduedate is turned off
127 # was stickyduedate loaded from session?
128 if ( $stickyduedate && ! $query->param("stickyduedate") ) {
129 $session->clear( 'stickyduedate' );
130 $stickyduedate = $query->param('stickyduedate');
131 $duedatespec = $query->param('duedatespec');
135 my ($datedue,$invalidduedate,$globalduedate);
137 if(C4
::Context
->preference('globalDueDate') && (C4
::Context
->preference('globalDueDate') =~ C4
::Dates
->regexp('syspref'))){
138 $globalduedate = C4
::Dates
->new(C4
::Context
->preference('globalDueDate'));
140 my $duedatespec_allow = C4
::Context
->preference('SpecifyDueDate');
141 if($duedatespec_allow){
143 if ($duedatespec =~ C4
::Dates
->regexp('syspref')) {
144 my $tempdate = C4
::Dates
->new($duedatespec);
145 if ($tempdate and $tempdate->output('iso') gt C4
::Dates
->new()->output('iso')) {
146 # i.e., it has to be later than today/now
147 $datedue = $tempdate;
150 $template->param(IMPOSSIBLE
=>1, INVALID_DATE
=>$duedatespec);
154 $template->param(IMPOSSIBLE
=>1, INVALID_DATE
=>$duedatespec);
157 # pass global due date to tmpl if specifyduedate is true
158 # and we have no barcode (loading circ page but not checking out)
159 if($globalduedate && ! $barcode ){
160 $duedatespec = $globalduedate->output();
165 $datedue = $globalduedate if ($globalduedate);
168 my $todaysdate = C4
::Dates
->new->output('iso');
170 # check and see if we should print
171 if ( $barcode eq '' && $print eq 'maybe' ) {
175 my $inprocess = ($barcode eq '') ?
'' : $query->param('inprocess');
176 if ( $barcode eq '' && $query->param('charges') eq 'yes' ) {
179 borrowernumber
=> $borrowernumber
183 if ( $print eq 'yes' && $borrowernumber ne '' ) {
184 printslip
( $borrowernumber );
185 $query->param( 'borrowernumber', '' );
186 $borrowernumber = '';
190 # STEP 2 : FIND BORROWER
191 # if there is a list of find borrowers....
196 my ($count, $borrowers) = SearchMember
($findborrower, 'cardnumber', 'web');
197 my @borrowers = @
$borrowers;
198 if (C4
::Context
->preference("AddPatronLists")) {
200 "AddPatronLists_".C4
::Context
->preference("AddPatronLists")=> "1",
202 if (C4
::Context
->preference("AddPatronLists")=~/code/){
203 my $categories = GetBorrowercategoryList
;
204 $categories->[0]->{'first'} = 1;
205 $template->param(categories
=>$categories);
208 if ( $#borrowers == -1 ) {
209 $query->param( 'findborrower', '' );
210 $message = "'$findborrower'";
212 elsif ( $#borrowers == 0 ) {
213 $query->param( 'borrowernumber', $borrowers[0]->{'borrowernumber'} );
214 $query->param( 'barcode', '' );
215 $borrowernumber = $borrowers[0]->{'borrowernumber'};
218 $borrowerslist = \
@borrowers;
222 # get the borrower information.....
224 if ($borrowernumber) {
225 $borrower = GetMemberDetails
( $borrowernumber, 0 );
226 my ( $od, $issue, $fines ) = GetMemberIssuesAndFines
( $borrowernumber );
228 # Warningdate is the date that the warning starts appearing
229 my ( $today_year, $today_month, $today_day) = Today
();
230 my ($warning_year, $warning_month, $warning_day) = split /-/, $borrower->{'dateexpiry'};
231 my ( $enrol_year, $enrol_month, $enrol_day) = split /-/, $borrower->{'dateenrolled'};
232 # Renew day is calculated by adding the enrolment period to today
233 my ( $renew_year, $renew_month, $renew_day);
234 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'});
239 # if the expiry date is before today ie they have expired
240 if ( $warning_year*$warning_month*$warning_day==0
241 || Date_to_Days
($today_year, $today_month, $today_day )
242 > Date_to_Days
($warning_year, $warning_month, $warning_day) )
244 #borrowercard expired, no issues
248 expired
=> format_date
($borrower->{dateexpiry
}),
249 renewaldate
=> format_date
("$renew_year-$renew_month-$renew_day")
252 # check for NotifyBorrowerDeparture
253 elsif ( C4
::Context
->preference('NotifyBorrowerDeparture') &&
254 Date_to_Days
(Add_Delta_Days
($warning_year,$warning_month,$warning_day,- C4
::Context
->preference('NotifyBorrowerDeparture'))) <
255 Date_to_Days
( $today_year, $today_month, $today_day ) )
257 # borrower card soon to expire warn librarian
258 $template->param("warndeparture" => format_date
($borrower->{dateexpiry
}),
260 if (C4
::Context
->preference('ReturnBeforeExpiry')){
261 $template->param("returnbeforeexpiry" => 1);
266 issuecount
=> $issue,
276 # always check for blockers on issuing
277 my ( $error, $question ) =
278 CanBookBeIssued
( $borrower, $barcode, $datedue , $inprocess );
279 my $blocker = $invalidduedate ?
1 : 0;
281 delete $question->{'DEBT'} if ($debt_confirmed);
282 foreach my $impossible ( keys %$error ) {
284 $impossible => $$error{$impossible},
290 my $confirm_required = 0;
291 unless($issueconfirmed){
292 # Get the item title for more information
293 my $getmessageiteminfo = GetBiblioFromItemNumber
(undef,$barcode);
294 $template->param( itemhomebranch
=> $getmessageiteminfo->{'homebranch'} );
296 # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
297 foreach my $needsconfirmation ( keys %$question ) {
299 $needsconfirmation => $$question{$needsconfirmation},
300 getTitleMessageIteminfo
=> $getmessageiteminfo->{'title'},
301 NEEDSCONFIRMATION
=> 1
303 $confirm_required = 1;
306 unless($confirm_required) {
307 AddIssue
( $borrower, $barcode, $datedue, $cancelreserve );
309 if($globalduedate && ! $stickyduedate && $duedatespec_allow ){
310 $duedatespec = $globalduedate->output();
316 # FIXME If the issue is confirmed, we launch another time GetMemberIssuesAndFines, now display the issue count after issue
317 my ( $od, $issue, $fines ) = GetMemberIssuesAndFines
( $borrowernumber );
318 $template->param( issuecount
=> $issue );
321 # reload the borrower info for the sake of reseting the flags.....
322 if ($borrowernumber) {
323 $borrower = GetMemberDetails
( $borrowernumber, 0 );
326 ##################################################################################
328 # show all reserves of this borrower, and the position of the reservation ....
329 if ($borrowernumber) {
332 # now we show the status of the borrower's reservations
333 my @borrowerreserv = GetReservesFromBorrowernumber
($borrowernumber );
335 my @WaitingReserveLoop;
337 foreach my $num_res (@borrowerreserv) {
339 my %getWaitingReserveInfo;
340 my $getiteminfo = GetBiblioFromItemNumber
( $num_res->{'itemnumber'} );
341 my $itemtypeinfo = getitemtypeinfo
( (C4
::Context
->preference('item-level_itypes')) ?
$getiteminfo->{'itype'} : $getiteminfo->{'itemtype'} );
342 my ( $transfertwhen, $transfertfrom, $transfertto ) =
343 GetTransfers
( $num_res->{'itemnumber'} );
345 $getreserv{waiting
} = 0;
346 $getreserv{transfered
} = 0;
347 $getreserv{nottransfered
} = 0;
349 $getreserv{reservedate
} = format_date
( $num_res->{'reservedate'} );
350 $getreserv{title
} = $getiteminfo->{'title'};
351 $getreserv{itemtype
} = $itemtypeinfo->{'description'};
352 $getreserv{author
} = $getiteminfo->{'author'};
353 $getreserv{barcodereserv
} = $getiteminfo->{'barcode'};
354 $getreserv{itemcallnumber
} = $getiteminfo->{'itemcallnumber'};
355 $getreserv{biblionumber
} = $getiteminfo->{'biblionumber'};
356 $getreserv{waitingat
} = GetBranchName
( $num_res->{'branchcode'} );
357 # check if we have a waiting status for reservations
358 if ( $num_res->{'found'} eq 'W' ) {
359 $getreserv{color
} = 'reserved';
360 $getreserv{waiting
} = 1;
361 # genarate information displaying only waiting reserves
362 $getWaitingReserveInfo{title
} = $getiteminfo->{'title'};
363 $getWaitingReserveInfo{biblionumber
} = $getiteminfo->{'biblionumber'};
364 $getWaitingReserveInfo{itemtype
} = $itemtypeinfo->{'description'};
365 $getWaitingReserveInfo{author
} = $getiteminfo->{'author'};
366 $getWaitingReserveInfo{reservedate
} = format_date
( $num_res->{'reservedate'} );
367 $getWaitingReserveInfo{waitingat
} = GetBranchName
( $num_res->{'branchcode'} );
368 $getWaitingReserveInfo{waitinghere
} = 1 if $num_res->{'branchcode'} eq $branch;
370 # check transfers with the itemnumber foud in th reservation loop
371 if ($transfertwhen) {
372 $getreserv{color
} = 'transfered';
373 $getreserv{transfered
} = 1;
374 $getreserv{datesent
} = format_date
($transfertwhen);
375 $getreserv{frombranch
} = GetBranchName
($transfertfrom);
376 } elsif ($getiteminfo->{'holdingbranch'} ne $num_res->{'branchcode'}) {
377 $getreserv{nottransfered
} = 1;
378 $getreserv{nottransferedby
} = GetBranchName
( $getiteminfo->{'holdingbranch'} );
381 # if we don't have a reserv on item, we put the biblio infos and the waiting position
382 if ( $getiteminfo->{'title'} eq '' ) {
383 my $getbibinfo = GetBiblioData
( $num_res->{'biblionumber'} );
385 $getreserv{color
} = 'inwait';
386 $getreserv{title
} = $getbibinfo->{'title'};
387 $getreserv{nottransfered
} = 0;
388 $getreserv{itemtype
} = $itemtypeinfo->{'description'};
389 $getreserv{author
} = $getbibinfo->{'author'};
390 $getreserv{biblionumber
} = $num_res->{'biblionumber'};
392 $getreserv{waitingposition
} = $num_res->{'priority'};
393 push( @reservloop, \
%getreserv );
395 # if we have a reserve waiting, initiate waitingreserveloop
396 if ($getreserv{waiting
} == 1) {
397 push (@WaitingReserveLoop, \
%getWaitingReserveInfo)
402 # return result to the template
404 countreserv
=> scalar @reservloop,
405 reservloop
=> \
@reservloop ,
406 WaitingReserveLoop
=> \
@WaitingReserveLoop,
408 $template->param( adultborrower
=> 1 ) if ( $borrower->{'category_type'} eq 'A' );
411 # make the issued books table.
412 my $todaysissues = '';
420 # get each issue of the borrower & separate them in todayissues & previous issues
421 my ($issueslist) = GetPendingIssues
($borrower->{'borrowernumber'});
422 # split in 2 arrays for today & previous
423 foreach my $it ( @
$issueslist ) {
424 my $itemtypeinfo = getitemtypeinfo
( (C4
::Context
->preference('item-level_itypes')) ?
$it->{'itype'} : $it->{'itemtype'} );
425 # set itemtype per item-level_itype syspref - FIXME this is an ugly hack
426 $it->{'itemtype'} = ( C4
::Context
->preference( 'item-level_itypes' ) ) ?
$it->{'itype'} : $it->{'itemtype'};
428 ($it->{'charge'}, $it->{'itemtype_charge'}) = GetIssuingCharges
(
429 $it->{'itemnumber'}, $borrower->{'borrowernumber'}
431 $it->{'charge'} = sprintf("%.2f", $it->{'charge'});
432 my ($can_renew, $can_renew_error) = CanBookBeRenewed
(
433 $borrower->{'borrowernumber'},$it->{'itemnumber'}
435 $it->{"renew_error_${can_renew_error}"} = 1 if defined $can_renew_error;
436 my ( $restype, $reserves ) = CheckReserves
( $it->{'itemnumber'} );
437 $it->{'can_renew'} = $can_renew;
438 $it->{'can_confirm'} = !$can_renew && !$restype;
439 $it->{'renew_error'} = $restype;
440 $it->{'checkoutdate'} = C4
::Dates
->new($it->{'issuedate'},'iso')->output('syspref');
442 $totalprice += $it->{'replacementprice'};
443 $it->{'itemtype'} = $itemtypeinfo->{'description'};
444 $it->{'itemtype_image'} = $itemtypeinfo->{'imageurl'};
445 $it->{'dd'} = format_date
($it->{'date_due'});
446 $it->{'displaydate'} = format_date
($it->{'issuedate'});
447 $it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ?
1 : 0 ;
448 ($it->{'author'} eq '') and $it->{'author'} = ' ';
449 $it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}};
451 if ( $todaysdate eq $it->{'issuedate'} or $todaysdate eq $it->{'lastreneweddate'} ) {
452 push @todaysissues, $it;
454 push @previousissues, $it;
457 if ( C4
::Context
->preference( "todaysIssuesDefaultSortOrder" ) eq 'asc' ) {
458 @todaysissues = sort { $a->{'timestamp'} cmp $b->{'timestamp'} } @todaysissues;
461 @todaysissues = sort { $b->{'timestamp'} cmp $a->{'timestamp'} } @todaysissues;
463 if ( C4
::Context
->preference( "previousIssuesDefaultSortOrder" ) eq 'asc' ){
464 @previousissues = sort { $a->{'date_due'} cmp $b->{'date_due'} } @previousissues;
467 @previousissues = sort { $b->{'date_due'} cmp $a->{'date_due'} } @previousissues;
474 my $CGIselectborrower;
475 if ($borrowerslist) {
477 sort {(lc $a->{'surname'} cmp lc $b->{'surname'} || lc $a->{'firstname'} cmp lc $b->{'firstname'})
481 push @values, $_->{'borrowernumber'};
482 $labels{ $_->{'borrowernumber'} } =
483 "$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ... $_->{'address'} ";
485 $CGIselectborrower = CGI
::scrolling_list
(
486 -name
=> 'borrowernumber',
488 -id
=> 'borrowernumber',
491 -onclick
=> "window.location = '/cgi-bin/koha/circ/circulation.pl?borrowernumber=' + this.value;",
499 my $flags = $borrower->{'flags'};
500 foreach my $flag ( sort keys %$flags ) {
501 $template->param( flagged
=> 1);
502 $flags->{$flag}->{'message'} =~ s
#\n#<br />#g;
503 if ( $flags->{$flag}->{'noissues'} ) {
508 if ( $flag eq 'GNA' ) {
509 $template->param( gna
=> 'true' );
511 elsif ( $flag eq 'LOST' ) {
512 $template->param( lost
=> 'true' );
514 elsif ( $flag eq 'DBARRED' ) {
515 $template->param( dbarred
=> 'true' );
517 elsif ( $flag eq 'CHARGES' ) {
520 chargesmsg
=> $flags->{'CHARGES'}->{'message'},
521 chargesamount
=> $flags->{'CHARGES'}->{'amount'},
522 charges_is_blocker
=> 1
525 elsif ( $flag eq 'CREDITS' ) {
528 creditsmsg
=> $flags->{'CREDITS'}->{'message'},
529 creditsamount
=> sprintf("%.02f", -($flags->{'CREDITS'}->{'amount'})), # from patron's pov
534 if ( $flag eq 'CHARGES' ) {
538 chargesmsg
=> $flags->{'CHARGES'}->{'message'},
539 chargesamount
=> $flags->{'CHARGES'}->{'amount'},
542 elsif ( $flag eq 'CREDITS' ) {
545 creditsmsg
=> $flags->{'CREDITS'}->{'message'},
546 creditsamount
=> sprintf("%.02f", -($flags->{'CREDITS'}->{'amount'})), # from patron's pov
549 elsif ( $flag eq 'ODUES' ) {
553 oduesmsg
=> $flags->{'ODUES'}->{'message'}
556 my $items = $flags->{$flag}->{'itemlist'};
557 if ( ! $query->param('module') || $query->param('module') ne 'returns' ) {
558 $template->param( nonreturns
=> 'true' );
561 elsif ( $flag eq 'NOTES' ) {
565 notesmsg
=> $flags->{'NOTES'}->{'message'}
571 my $amountold = $borrower->{flags
}->{'CHARGES'}->{'message'} || 0;
572 $amountold =~ s/^.*\$//; # remove upto the $, if any
574 my ( $total, $accts, $numaccts) = GetMemberAccountRecords
( $borrowernumber );
576 if ( $borrower->{'category_type'} eq 'C') {
577 my ( $catcodes, $labels ) = GetborCatFromCatType
( 'A', 'WHERE category_type = ?' );
578 my $cnt = scalar(@
$catcodes);
579 $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1;
580 $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1;
583 my $CGIorganisations;
584 my $member_of_institution;
585 if ( C4
::Context
->preference("memberofinstitution") ) {
586 my $organisations = get_institutions
();
589 foreach my $organisation ( keys %$organisations ) {
590 push @orgs, $organisation;
591 $org_labels{$organisation} = $organisations->{$organisation}->{'surname'};
593 $member_of_institution = 1;
594 $CGIorganisations = CGI
::popup_menu
(
595 -id
=> 'organisations',
596 -name
=> 'organisations',
597 -labels
=> \
%org_labels,
602 my $lib_messages_loop = GetMessages
( $borrowernumber, 'L', $branch );
603 if($lib_messages_loop){ $template->param(flagged
=> 1 ); }
605 my $bor_messages_loop = GetMessages
( $borrowernumber, 'B', $branch );
606 if($bor_messages_loop){ $template->param(flagged
=> 1 ); }
608 # Computes full borrower address
609 my (undef, $roadttype_hashref) = &GetRoadTypes
();
610 my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'};
613 lib_messages_loop
=> $lib_messages_loop,
614 bor_messages_loop
=> $bor_messages_loop,
615 all_messages_del
=> C4
::Context
->preference('AllowAllMessageDeletion'),
616 findborrower
=> $findborrower,
617 borrower
=> $borrower,
618 borrowernumber
=> $borrowernumber,
620 branchname
=> GetBranchName
($borrower->{'branchcode'}),
622 printername
=> $printer,
623 firstname
=> $borrower->{'firstname'},
624 surname
=> $borrower->{'surname'},
625 dateexpiry
=> format_date
($newexpiry),
626 expiry
=> format_date
($borrower->{'dateexpiry'}),
627 categorycode
=> $borrower->{'categorycode'},
628 categoryname
=> $borrower->{description
},
630 address2
=> $borrower->{'address2'},
631 email
=> $borrower->{'email'},
632 emailpro
=> $borrower->{'emailpro'},
633 borrowernotes
=> $borrower->{'borrowernotes'},
634 city
=> $borrower->{'city'},
635 zipcode
=> $borrower->{'zipcode'},
636 country
=> $borrower->{'country'},
637 phone
=> $borrower->{'phone'} || $borrower->{'mobile'},
638 cardnumber
=> $borrower->{'cardnumber'},
639 amountold
=> $amountold,
641 stickyduedate
=> $stickyduedate,
642 duedatespec
=> $duedatespec,
644 CGIselectborrower
=> $CGIselectborrower,
645 totalprice
=> sprintf('%.2f', $totalprice),
646 totaldue
=> sprintf('%.2f', $total),
647 todayissues
=> \
@todaysissues,
648 previssues
=> \
@previousissues,
649 inprocess
=> $inprocess,
650 memberofinstution
=> $member_of_institution,
651 CGIorganisations
=> $CGIorganisations,
652 is_child
=> ($borrower->{'category_type'} eq 'C'),
654 soundon
=> C4
::Context
->preference("SoundOn"),
657 # save stickyduedate to session
658 if ($stickyduedate) {
659 $session->param( 'stickyduedate', $duedatespec );
662 my ($picture, $dberror) = GetPatronImage
($borrower->{'cardnumber'});
663 $template->param( picture
=> 1 ) if $picture;
665 # get authorised values with type of BOR_NOTES
667 my $canned_notes = GetAuthorisedValues
("BOR_NOTES");
670 debt_confirmed
=> $debt_confirmed,
671 SpecifyDueDate
=> $duedatespec_allow,
672 CircAutocompl
=> C4
::Context
->preference("CircAutocompl"),
673 AllowRenewalLimitOverride
=> C4
::Context
->preference("AllowRenewalLimitOverride"),
674 dateformat
=> C4
::Context
->preference("dateformat"),
675 DHTMLcalendar_dateformat
=> C4
::Dates
->DHTMLcalendar(),
676 canned_bor_notes_loop
=> $canned_notes,
678 output_html_with_http_headers
$query, $cookie, $template->output;