X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=circ%2Fcirculation.pl;h=70e7fd230ba507da2f7f059c88d4aa69c9287c6c;hb=99f92cc8a54a11bd5722f2d577f814dfcf214526;hp=3f35aa6b2b81a700cd21b767200f819183f2f293;hpb=1157ed9457849e7475c8bad48d48fe8cd9b93f58;p=koha.git diff --git a/circ/circulation.pl b/circ/circulation.pl index 3f35aa6b2b..70e7fd230b 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -92,6 +92,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( flagsrequired => { circulate => 1 }, } ); + my $branches = GetBranches(); my $printers = GetPrinters(); @@ -120,9 +121,6 @@ $printer = C4::Context->userenv->{'branchprinter'}; my $barcode = $query->param('barcode') || ''; $barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter')); -my $year = $query->param('year'); -my $month = $query->param('month'); -my $day = $query->param('day'); my $stickyduedate = $query->param('stickyduedate'); my $duedatespec = $query->param('duedatespec'); my $issueconfirmed = $query->param('issueconfirmed'); @@ -130,6 +128,7 @@ my $cancelreserve = $query->param('cancelreserve'); my $organisation = $query->param('organisations'); my $print = $query->param('print'); my $newexpiry = $query->param('dateexpiry'); +my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice #set up cookie..... # my $branchcookie; @@ -261,6 +260,8 @@ if ($barcode) { my ( $error, $question ) = CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess ); my $noerror = $invalidduedate ? 0 : 1; + + delete $question->{'DEBT'} if ($debt_confirmed); foreach my $impossible ( keys %$error ) { $template->param( $impossible => $$error{$impossible}, @@ -386,12 +387,12 @@ if ($borrowernumber) { my $getbibtype = getitemtypeinfo( $getbibinfo->{'itemtype'} ); # fixme - we should have item-level reserves here ? $getreserv{color} = 'inwait'; $getreserv{title} = $getbibinfo->{'title'}; - $getreserv{waitingposition} = $num_res->{'priority'}; $getreserv{nottransfered} = 0; $getreserv{itemtype} = $getbibtype->{'description'}; $getreserv{author} = $getbibinfo->{'author'}; $getreserv{biblionumber} = $num_res->{'biblionumber'}; } + $getreserv{waitingposition} = $num_res->{'priority'}; push( @reservloop, \%getreserv ); # if we have a reserve waiting, initiate waitingreserveloop @@ -452,7 +453,6 @@ if ($borrower) { # ADDED BY JF: NEW ITEMTYPE COUNT DISPLAY $issued_itemtypes_count->{ $it->{'itemtype'} }++; - warn "$todaysdate, $it->{'issuedate'}, $it->{'lastreneweddate'}, $it->{'barcode'}"; if ( $todaysdate eq $it->{'issuedate'} or $todaysdate eq $it->{'lastreneweddate'} ) { push @todaysissues, $it; } else { @@ -523,10 +523,7 @@ my %labels; my $CGIselectborrower; if ($borrowerslist) { foreach ( - sort { - lc $a->{'surname'} - . lc $a->{'firstname'} cmp lc $b->{'surname'} - . lc $b->{'firstname'} + sort {(lc $a->{'surname'} cmp lc $b->{'surname'} ?lc $a->{'surname'} cmp lc $b->{'surname'}:lc $a->{'firstname'} cmp lc $b->{'firstname'}) } @$borrowerslist ) { @@ -673,13 +670,14 @@ $template->param( dateexpiry => format_date($newexpiry), expiry => format_date($borrower->{'dateexpiry'}), categorycode => $borrower->{'categorycode'}, - categoryname => $borrowercategory->{description}, + categoryname => $borrower->{description}, address => $borrower->{'address'}, address2 => $borrower->{'address2'}, email => $borrower->{'email'}, emailpro => $borrower->{'emailpro'}, borrowernotes => $borrower->{'borrowernotes'}, city => $borrower->{'city'}, + zipcode => $borrower->{'zipcode'}, phone => $borrower->{'phone'} || $borrower->{'mobile'}, cardnumber => $borrower->{'cardnumber'}, amountold => $amountold, @@ -713,9 +711,10 @@ $template->param( picture => 1 ) if $picture; $template->param( + debt_confirmed => $debt_confirmed, SpecifyDueDate => C4::Context->preference("SpecifyDueDate"), CircAutocompl => C4::Context->preference("CircAutocompl"), - dateformat => C4::Context->preference("dateformat"), + dateformat => C4::Context->preference("dateformat"), DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), ); output_html_with_http_headers $query, $cookie, $template->output;