3 # script to execute issuing of books
5 # Copyright 2000-2002 Katipo Communications
6 # copyright 2010 BibLibre
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
45 use List
::MoreUtils qw
/uniq/;
53 my $sessionID = $query->cookie("CGISESSID") ;
54 my $session = get_session
($sessionID);
56 # branch and printer are now defined by the userenv
57 # but first we have to check if someone has tried to change them
59 my $branch = $query->param('branch');
61 # update our session so the userenv is updated
62 $session->param('branch', $branch);
63 $session->param('branchname', GetBranchName
($branch));
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
();
92 my @failedrenews = $query->param('failedrenew'); # expected to be itemnumbers
94 for (@failedrenews) { $renew_failed{$_} = 1; }
96 my $findborrower = $query->param('findborrower');
97 $findborrower =~ s
|,| |g
;
98 my $borrowernumber = $query->param('borrowernumber');
100 $branch = C4
::Context
->userenv->{'branch'};
101 $printer = C4
::Context
->userenv->{'branchprinter'};
104 # If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian
105 if (C4
::Context
->preference("AutoLocation") != 1) {
106 $template->param(ManualLocation
=> 1);
109 if (C4
::Context
->preference("DisplayClearScreenButton")) {
110 $template->param(DisplayClearScreenButton
=> 1);
113 if (C4
::Context
->preference("UseTablesortForCirc")) {
114 $template->param(UseTablesortForCirc
=> 1);
117 my $barcode = $query->param('barcode') || '';
118 $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
120 $barcode = barcodedecode
($barcode) if( $barcode && C4
::Context
->preference('itemBarcodeInputFilter'));
121 my $stickyduedate = $query->param('stickyduedate') || $session->param('stickyduedate');
122 my $duedatespec = $query->param('duedatespec') || $session->param('stickyduedate');
123 my $issueconfirmed = $query->param('issueconfirmed');
124 my $cancelreserve = $query->param('cancelreserve');
125 my $organisation = $query->param('organisations');
126 my $print = $query->param('print');
127 my $newexpiry = $query->param('dateexpiry');
128 my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice
130 # Check if stickyduedate is turned off
132 # was stickyduedate loaded from session?
133 if ( $stickyduedate && ! $query->param("stickyduedate") ) {
134 $session->clear( 'stickyduedate' );
135 $stickyduedate = $query->param('stickyduedate');
136 $duedatespec = $query->param('duedatespec');
140 my ($datedue,$invalidduedate);
142 my $duedatespec_allow = C4
::Context
->preference('SpecifyDueDate');
143 if($duedatespec_allow){
145 if ($duedatespec =~ C4
::Dates
->regexp('syspref')) {
146 my $tempdate = C4
::Dates
->new($duedatespec);
147 # if ($tempdate and $tempdate->output('iso') gt C4::Dates->new()->output('iso')) {
148 # # i.e., it has to be later than today/now
149 $datedue = $tempdate;
151 # $invalidduedate = 1;
152 # $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec);
156 $template->param(IMPOSSIBLE
=>1, INVALID_DATE
=>$duedatespec);
161 my $todaysdate = C4
::Dates
->new->output('iso');
163 # check and see if we should print
164 if ( $barcode eq '' && $print eq 'maybe' ) {
168 my $inprocess = ($barcode eq '') ?
'' : $query->param('inprocess');
169 if ( $barcode eq '' && $query->param('charges') eq 'yes' ) {
172 borrowernumber
=> $borrowernumber
176 if ( $print eq 'yes' && $borrowernumber ne '' ) {
177 printslip
( $borrowernumber );
178 $query->param( 'borrowernumber', '' );
179 $borrowernumber = '';
183 # STEP 2 : FIND BORROWER
184 # if there is a list of find borrowers....
189 my ($count, $borrowers) = SearchMember
($findborrower, 'cardnumber', 'web');
190 my @borrowers = @
$borrowers;
191 if (C4
::Context
->preference("AddPatronLists")) {
193 "AddPatronLists_".C4
::Context
->preference("AddPatronLists")=> "1",
195 if (C4
::Context
->preference("AddPatronLists")=~/code/){
196 my $categories = GetBorrowercategoryList
;
197 $categories->[0]->{'first'} = 1;
198 $template->param(categories
=>$categories);
201 if ( $#borrowers == -1 ) {
202 $query->param( 'findborrower', '' );
203 $message = "'$findborrower'";
205 elsif ( $#borrowers == 0 ) {
206 $query->param( 'borrowernumber', $borrowers[0]->{'borrowernumber'} );
207 $query->param( 'barcode', '' );
208 $borrowernumber = $borrowers[0]->{'borrowernumber'};
211 $borrowerslist = \
@borrowers;
215 # get the borrower information.....
217 if ($borrowernumber) {
218 $borrower = GetMemberDetails
( $borrowernumber, 0 );
219 my ( $od, $issue, $fines ) = GetMemberIssuesAndFines
( $borrowernumber );
221 # Warningdate is the date that the warning starts appearing
222 my ( $today_year, $today_month, $today_day) = Today
();
223 my ($warning_year, $warning_month, $warning_day) = split /-/, $borrower->{'dateexpiry'};
224 my ( $enrol_year, $enrol_month, $enrol_day) = split /-/, $borrower->{'dateenrolled'};
225 # Renew day is calculated by adding the enrolment period to today
226 my ( $renew_year, $renew_month, $renew_day);
227 if ($enrol_year*$enrol_month*$enrol_day>0) {
228 ( $renew_year, $renew_month, $renew_day) =
229 Add_Delta_YM
( $enrol_year, $enrol_month, $enrol_day,
230 0 , $borrower->{'enrolmentperiod'});
232 # if the expiry date is before today ie they have expired
233 if ( !$borrower->{'dateexpiry'} || $warning_year*$warning_month*$warning_day==0
234 || Date_to_Days
($today_year, $today_month, $today_day )
235 > Date_to_Days
($warning_year, $warning_month, $warning_day) )
237 #borrowercard expired, no issues
242 renewaldate
=> format_date
("$renew_year-$renew_month-$renew_day")
245 # check for NotifyBorrowerDeparture
246 elsif ( C4
::Context
->preference('NotifyBorrowerDeparture') &&
247 Date_to_Days
(Add_Delta_Days
($warning_year,$warning_month,$warning_day,- C4
::Context
->preference('NotifyBorrowerDeparture'))) <
248 Date_to_Days
( $today_year, $today_month, $today_day ) )
250 # borrower card soon to expire warn librarian
251 $template->param("warndeparture" => format_date
($borrower->{dateexpiry
}),
253 if (C4
::Context
->preference('ReturnBeforeExpiry')){
254 $template->param("returnbeforeexpiry" => 1);
259 issuecount
=> $issue,
269 # always check for blockers on issuing
270 my ( $error, $question ) =
271 CanBookBeIssued
( $borrower, $barcode, $datedue , $inprocess );
272 my $blocker = $invalidduedate ?
1 : 0;
274 delete $question->{'DEBT'} if ($debt_confirmed);
275 foreach my $impossible ( keys %$error ) {
277 $impossible => $$error{$impossible},
283 my $confirm_required = 0;
284 unless($issueconfirmed){
285 # Get the item title for more information
286 my $getmessageiteminfo = GetBiblioFromItemNumber
(undef,$barcode);
287 $template->param( itemhomebranch
=> $getmessageiteminfo->{'homebranch'} );
289 # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
290 foreach my $needsconfirmation ( keys %$question ) {
292 $needsconfirmation => $$question{$needsconfirmation},
293 getTitleMessageIteminfo
=> $getmessageiteminfo->{'title'},
294 getBarcodeMessageIteminfo
=> $getmessageiteminfo->{'barcode'},
295 NEEDSCONFIRMATION
=> 1
297 $confirm_required = 1;
300 unless($confirm_required) {
301 AddIssue
( $borrower, $barcode, $datedue, $cancelreserve );
306 # FIXME If the issue is confirmed, we launch another time GetMemberIssuesAndFines, now display the issue count after issue
307 my ( $od, $issue, $fines ) = GetMemberIssuesAndFines
( $borrowernumber );
308 $template->param( issuecount
=> $issue );
311 # reload the borrower info for the sake of reseting the flags.....
312 if ($borrowernumber) {
313 $borrower = GetMemberDetails
( $borrowernumber, 0 );
316 ##################################################################################
318 # show all reserves of this borrower, and the position of the reservation ....
319 if ($borrowernumber) {
322 # now we show the status of the borrower's reservations
323 my @borrowerreserv = GetReservesFromBorrowernumber
($borrowernumber );
325 my @WaitingReserveLoop;
327 foreach my $num_res (@borrowerreserv) {
329 my %getWaitingReserveInfo;
330 my $getiteminfo = GetBiblioFromItemNumber
( $num_res->{'itemnumber'} );
331 my $itemtypeinfo = getitemtypeinfo
( (C4
::Context
->preference('item-level_itypes')) ?
$getiteminfo->{'itype'} : $getiteminfo->{'itemtype'} );
332 my ( $transfertwhen, $transfertfrom, $transfertto ) =
333 GetTransfers
( $num_res->{'itemnumber'} );
335 $getreserv{waiting
} = 0;
336 $getreserv{transfered
} = 0;
337 $getreserv{nottransfered
} = 0;
339 $getreserv{reservedate
} = format_date
( $num_res->{'reservedate'} );
340 $getreserv{reservenumber
} = $num_res->{'reservenumber'};
341 $getreserv{title
} = $getiteminfo->{'title'};
342 $getreserv{itemtype
} = $itemtypeinfo->{'description'};
343 $getreserv{author
} = $getiteminfo->{'author'};
344 $getreserv{barcodereserv
} = $getiteminfo->{'barcode'};
345 $getreserv{itemcallnumber
} = $getiteminfo->{'itemcallnumber'};
346 $getreserv{biblionumber
} = $getiteminfo->{'biblionumber'};
347 $getreserv{waitingat
} = GetBranchName
( $num_res->{'branchcode'} );
348 # check if we have a waiting status for reservations
349 if ( $num_res->{'found'} eq 'W' ) {
350 $getreserv{color
} = 'reserved';
351 $getreserv{waiting
} = 1;
352 # genarate information displaying only waiting reserves
353 $getWaitingReserveInfo{title
} = $getiteminfo->{'title'};
354 $getWaitingReserveInfo{biblionumber
} = $getiteminfo->{'biblionumber'};
355 $getWaitingReserveInfo{itemtype
} = $itemtypeinfo->{'description'};
356 $getWaitingReserveInfo{author
} = $getiteminfo->{'author'};
357 $getWaitingReserveInfo{reservedate
} = format_date
( $num_res->{'reservedate'} );
358 $getWaitingReserveInfo{waitingat
} = GetBranchName
( $num_res->{'branchcode'} );
359 $getWaitingReserveInfo{waitinghere
} = 1 if $num_res->{'branchcode'} eq $branch;
361 # check transfers with the itemnumber foud in th reservation loop
362 if ($transfertwhen) {
363 $getreserv{color
} = 'transfered';
364 $getreserv{transfered
} = 1;
365 $getreserv{datesent
} = format_date
($transfertwhen);
366 $getreserv{frombranch
} = GetBranchName
($transfertfrom);
367 } elsif ($getiteminfo->{'holdingbranch'} ne $num_res->{'branchcode'}) {
368 $getreserv{nottransfered
} = 1;
369 $getreserv{nottransferedby
} = GetBranchName
( $getiteminfo->{'holdingbranch'} );
372 # if we don't have a reserv on item, we put the biblio infos and the waiting position
373 if ( $getiteminfo->{'title'} eq '' ) {
374 my $getbibinfo = GetBiblioData
( $num_res->{'biblionumber'} );
376 $getreserv{color
} = 'inwait';
377 $getreserv{title
} = $getbibinfo->{'title'};
378 $getreserv{nottransfered
} = 0;
379 $getreserv{itemtype
} = $itemtypeinfo->{'description'};
380 $getreserv{author
} = $getbibinfo->{'author'};
381 $getreserv{biblionumber
} = $num_res->{'biblionumber'};
383 $getreserv{waitingposition
} = $num_res->{'priority'};
384 push( @reservloop, \
%getreserv );
386 # if we have a reserve waiting, initiate waitingreserveloop
387 if ($getreserv{waiting
} == 1) {
388 push (@WaitingReserveLoop, \
%getWaitingReserveInfo)
393 # return result to the template
395 countreserv
=> scalar @reservloop,
396 reservloop
=> \
@reservloop ,
397 WaitingReserveLoop
=> \
@WaitingReserveLoop,
399 $template->param( adultborrower
=> 1 ) if ( $borrower->{'category_type'} eq 'A' );
402 # make the issued books table.
403 my $todaysissues = '';
409 my $displayrelissues;
413 sub build_issue_data
{
414 my $issueslist = shift;
415 my $relatives = shift;
417 # split in 2 arrays for today & previous
418 foreach my $it ( @
$issueslist ) {
419 my $itemtypeinfo = getitemtypeinfo
( (C4
::Context
->preference('item-level_itypes')) ?
$it->{'itype'} : $it->{'itemtype'} );
421 # Getting borrower details
422 my $memberdetails = GetMemberDetails
($it->{'borrowernumber'});
423 $it->{'borrowername'} = $memberdetails->{'firstname'} . " " . $memberdetails->{'surname'};
424 $it->{'cardnumber'} = $memberdetails->{'cardnumber'};
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 (!$relatives) ?
push @todaysissues, $it : push @relissues, $it;
454 (!$relatives) ?
push @previousissues, $it : push @relprevissues, $it;
461 # Getting borrower relatives
462 my @relborrowernumbers = GetMemberRelatives
($borrower->{'borrowernumber'});
463 #push @borrowernumbers, $borrower->{'borrowernumber'};
465 # get each issue of the borrower & separate them in todayissues & previous issues
466 my $issueslist = GetPendingIssues
($borrower->{'borrowernumber'});
467 my $relissueslist = [];
468 if ( @relborrowernumbers ) {
469 $relissueslist = GetPendingIssues
(@relborrowernumbers);
472 build_issue_data
($issueslist, 0);
473 build_issue_data
($relissueslist, 1);
475 $displayrelissues = scalar($relissueslist);
477 if ( C4
::Context
->preference( "todaysIssuesDefaultSortOrder" ) eq 'asc' ) {
478 @todaysissues = sort { $a->{'timestamp'} cmp $b->{'timestamp'} } @todaysissues;
481 @todaysissues = sort { $b->{'timestamp'} cmp $a->{'timestamp'} } @todaysissues;
484 if ( C4
::Context
->preference( "previousIssuesDefaultSortOrder" ) eq 'asc' ){
485 @previousissues = sort { $a->{'date_due'} cmp $b->{'date_due'} } @previousissues;
488 @previousissues = sort { $b->{'date_due'} cmp $a->{'date_due'} } @previousissues;
495 my $CGIselectborrower;
496 if ($borrowerslist) {
498 sort {(lc $a->{'surname'} cmp lc $b->{'surname'} || lc $a->{'firstname'} cmp lc $b->{'firstname'})
502 push @values, $_->{'borrowernumber'};
503 $labels{ $_->{'borrowernumber'} } =
504 "$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ... $_->{'address'} ";
506 $CGIselectborrower = CGI
::scrolling_list
(
507 -name
=> 'borrowernumber',
509 -id
=> 'borrowernumber',
512 -ondblclick
=> 'document.forms[\'mainform\'].submit()',
520 my $flags = $borrower->{'flags'};
521 foreach my $flag ( sort keys %$flags ) {
522 $template->param( flagged
=> 1);
523 $flags->{$flag}->{'message'} =~ s
#\n#<br />#g;
524 if ( $flags->{$flag}->{'noissues'} ) {
529 if ( $flag eq 'GNA' ) {
530 $template->param( gna
=> 'true' );
532 elsif ( $flag eq 'LOST' ) {
533 $template->param( lost
=> 'true' );
535 elsif ( $flag eq 'DBARRED' ) {
536 $template->param( dbarred
=> 'true' );
538 elsif ( $flag eq 'CHARGES' ) {
541 chargesmsg
=> $flags->{'CHARGES'}->{'message'},
542 chargesamount
=> $flags->{'CHARGES'}->{'amount'},
543 charges_is_blocker
=> 1
546 elsif ( $flag eq 'CREDITS' ) {
549 creditsmsg
=> $flags->{'CREDITS'}->{'message'},
550 creditsamount
=> sprintf("%.02f", -($flags->{'CREDITS'}->{'amount'})), # from patron's pov
555 if ( $flag eq 'CHARGES' ) {
559 chargesmsg
=> $flags->{'CHARGES'}->{'message'},
560 chargesamount
=> $flags->{'CHARGES'}->{'amount'},
563 elsif ( $flag eq 'CREDITS' ) {
566 creditsmsg
=> $flags->{'CREDITS'}->{'message'},
567 creditsamount
=> sprintf("%.02f", -($flags->{'CREDITS'}->{'amount'})), # from patron's pov
570 elsif ( $flag eq 'ODUES' ) {
574 oduesmsg
=> $flags->{'ODUES'}->{'message'}
577 my $items = $flags->{$flag}->{'itemlist'};
578 if ( ! $query->param('module') || $query->param('module') ne 'returns' ) {
579 $template->param( nonreturns
=> 'true' );
582 elsif ( $flag eq 'NOTES' ) {
586 notesmsg
=> $flags->{'NOTES'}->{'message'}
592 my $amountold = $borrower->{flags
}->{'CHARGES'}->{'message'} || 0;
593 $amountold =~ s/^.*\$//; # remove upto the $, if any
595 my ( $total, $accts, $numaccts) = GetMemberAccountRecords
( $borrowernumber );
597 if ( $borrower->{'category_type'} eq 'C') {
598 my ( $catcodes, $labels ) = GetborCatFromCatType
( 'A', 'WHERE category_type = ?' );
599 my $cnt = scalar(@
$catcodes);
600 $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1;
601 $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1;
604 my $CGIorganisations;
605 my $member_of_institution;
606 if ( C4
::Context
->preference("memberofinstitution") ) {
607 my $organisations = get_institutions
();
610 foreach my $organisation ( keys %$organisations ) {
611 push @orgs, $organisation;
612 $org_labels{$organisation} = $organisations->{$organisation}->{'surname'};
614 $member_of_institution = 1;
615 $CGIorganisations = CGI
::popup_menu
(
616 -id
=> 'organisations',
617 -name
=> 'organisations',
618 -labels
=> \
%org_labels,
623 my $lib_messages_loop = GetMessages
( $borrowernumber, 'L', $branch );
624 if($lib_messages_loop){ $template->param(flagged
=> 1 ); }
626 my $bor_messages_loop = GetMessages
( $borrowernumber, 'B', $branch );
627 if($bor_messages_loop){ $template->param(flagged
=> 1 ); }
629 # Computes full borrower address
630 my (undef, $roadttype_hashref) = &GetRoadTypes
();
631 my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'};
633 my $fast_cataloging = 0;
634 if (defined getframeworkinfo
('FA')) {
639 lib_messages_loop
=> $lib_messages_loop,
640 bor_messages_loop
=> $bor_messages_loop,
641 all_messages_del
=> C4
::Context
->preference('AllowAllMessageDeletion'),
642 findborrower
=> $findborrower,
643 borrower
=> $borrower,
644 borrowernumber
=> $borrowernumber,
646 branchname
=> GetBranchName
($borrower->{'branchcode'}),
648 printername
=> $printer,
649 firstname
=> $borrower->{'firstname'},
650 surname
=> $borrower->{'surname'},
651 dateexpiry
=> format_date
($newexpiry),
652 expiry
=> format_date
($borrower->{'dateexpiry'}),
653 categorycode
=> $borrower->{'categorycode'},
654 categoryname
=> $borrower->{description
},
656 address2
=> $borrower->{'address2'},
657 email
=> $borrower->{'email'},
658 emailpro
=> $borrower->{'emailpro'},
659 borrowernotes
=> $borrower->{'borrowernotes'},
660 city
=> $borrower->{'city'},
661 state => $borrower->{'state'},
662 zipcode
=> $borrower->{'zipcode'},
663 country
=> $borrower->{'country'},
664 phone
=> $borrower->{'phone'} || $borrower->{'mobile'},
665 cardnumber
=> $borrower->{'cardnumber'},
666 amountold
=> $amountold,
668 stickyduedate
=> $stickyduedate,
669 duedatespec
=> $duedatespec,
671 CGIselectborrower
=> $CGIselectborrower,
672 totalprice
=> sprintf('%.2f', $totalprice),
673 totaldue
=> sprintf('%.2f', $total),
674 todayissues
=> \
@todaysissues,
675 previssues
=> \
@previousissues,
676 relissues
=> \
@relissues,
677 relprevissues
=> \
@relprevissues,
678 displayrelissues
=> $displayrelissues,
679 inprocess
=> $inprocess,
680 memberofinstution
=> $member_of_institution,
681 CGIorganisations
=> $CGIorganisations,
682 is_child
=> ($borrower->{'category_type'} eq 'C'),
684 soundon
=> C4
::Context
->preference("SoundOn"),
685 fast_cataloging
=> $fast_cataloging,
688 # save stickyduedate to session
689 if ($stickyduedate) {
690 $session->param( 'stickyduedate', $duedatespec );
693 my ($picture, $dberror) = GetPatronImage
($borrower->{'cardnumber'});
694 $template->param( picture
=> 1 ) if $picture;
696 # get authorised values with type of BOR_NOTES
698 my $canned_notes = GetAuthorisedValues
("BOR_NOTES");
701 debt_confirmed
=> $debt_confirmed,
702 SpecifyDueDate
=> $duedatespec_allow,
703 CircAutocompl
=> C4
::Context
->preference("CircAutocompl"),
704 AllowRenewalLimitOverride
=> C4
::Context
->preference("AllowRenewalLimitOverride"),
705 dateformat
=> C4
::Context
->preference("dateformat"),
706 DHTMLcalendar_dateformat
=> C4
::Dates
->DHTMLcalendar(),
707 canned_bor_notes_loop
=> $canned_notes,
709 output_html_with_http_headers
$query, $cookie, $template->output;