From b3cd89e7cd941f6b0438602ba116cf50042b8771 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 18 Sep 2009 12:51:39 +0000 Subject: [PATCH] Reserves Updates Ported From Dev_Week This is a much improved re-implementation of the reserves updates from dev_week. Less new code has been added, and more existing functions are used instead of adding new ones. The 'Lock Hold' function has been removed due to it not working as intended. --- C4/Reserves.pm | 117 ++++++++++++++++++-- installer/data/mysql/updatedatabase.pl | 10 ++ .../prog/en/modules/reserve/request.tmpl | 74 ++++++++++++ koha-tmpl/intranet-tmpl/prog/img/go-bottom.png | Bin 0 -> 663 bytes koha-tmpl/intranet-tmpl/prog/img/go-down.png | Bin 0 -> 683 bytes koha-tmpl/intranet-tmpl/prog/img/go-top.png | Bin 0 -> 636 bytes koha-tmpl/intranet-tmpl/prog/img/go-up.png | Bin 0 -> 652 bytes koha-tmpl/intranet-tmpl/prog/img/x.png | Bin 0 -> 655 bytes .../opac-tmpl/prog/en/modules/opac-reserve.tmpl | 33 ++++++ koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl | 8 +- misc/cronjobs/cancel_expired_reserves.pl | 39 +++++++ opac/opac-reserve.pl | 18 ++-- opac/opac-user.pl | 7 + reserve/placerequest.pl | 9 +- reserve/request.pl | 26 ++++- 15 files changed, 313 insertions(+), 28 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/go-bottom.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/go-down.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/go-top.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/go-up.png create mode 100644 koha-tmpl/intranet-tmpl/prog/img/x.png create mode 100755 misc/cronjobs/cancel_expired_reserves.pl diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 8610036..6265e63 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -113,19 +113,22 @@ BEGIN { &CancelReserve &IsAvailableForItemLevelRequest + + &AlterPriority + &ToggleLowestPriority ); } =item AddReserve - AddReserve($branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$notes,$title,$checkitem,$found) + AddReserve($branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$resdate,$expdate,$notes,$title,$checkitem,$found) =cut sub AddReserve { my ( $branch, $borrowernumber, $biblionumber, - $constraint, $bibitems, $priority, $resdate, $notes, + $constraint, $bibitems, $priority, $resdate, $expdate, $notes, $title, $checkitem, $found ) = @_; my $fee = @@ -135,6 +138,7 @@ sub AddReserve { my $const = lc substr( $constraint, 0, 1 ); $resdate = format_date_in_iso( $resdate ) if ( $resdate ); $resdate = C4::Dates->today( 'iso' ) unless ( $resdate ); + $expdate = format_date_in_iso( $expdate ) if ( $expdate ); if ( C4::Context->preference( 'AllowHoldDateInFuture' ) ) { # Make room in reserves for this before those of a later reserve date $priority = _ShiftPriorityByDateAndPriority( $biblionumber, $resdate, $priority ); @@ -165,16 +169,16 @@ sub AddReserve { my $query = qq/ INSERT INTO reserves (borrowernumber,biblionumber,reservedate,branchcode,constrainttype, - priority,reservenotes,itemnumber,found,waitingdate) + priority,reservenotes,itemnumber,found,waitingdate,expirationdate) VALUES (?,?,?,?,?, - ?,?,?,?,?) + ?,?,?,?,?,?) /; my $sth = $dbh->prepare($query); $sth->execute( $borrowernumber, $biblionumber, $resdate, $branch, $const, $priority, $notes, $checkitem, - $found, $waitingdate + $found, $waitingdate, $expdate ); #} @@ -217,7 +221,9 @@ sub GetReservesFromBiblionumber { constrainttype, found, itemnumber, - reservenotes + reservenotes, + expirationdate, + lowestPriority FROM reserves WHERE biblionumber = ? "; unless ( $all_dates ) { @@ -660,6 +666,26 @@ sub CheckReserves { } } +=item CancelExpiredReserves + + CancelExpiredReserves(); + + Cancels all reserves with an expiration date from before today. + +=cut + +sub CancelExpiredReserves { + + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare( "SELECT * FROM reserves WHERE DATE(expirationdate) < DATE( CURDATE() ) AND expirationdate != '0000-00-00'" ); + $sth->execute(); + + while ( my $res = $sth->fetchrow_hashref() ) { + CancelReserve( $res->{'biblionumber'}, '', $res->{'borrowernumber'} ); + } + +} + =item CancelReserve &CancelReserve($biblionumber, $itemnumber, $borrowernumber); @@ -1165,9 +1191,75 @@ sub IsAvailableForItemLevelRequest { } } +=item AlterPriority +AlterPriority( $where, $borrowernumber, $biblionumber, $reservedate ); + +This function changes a reserve's priority up, down, to the top, or to the bottom. +Input: $where is 'up', 'down', 'top' or 'bottom'. Biblionumber, Date reserve was placed +Output: None on success, -1 on failure + +=cut +sub AlterPriority { + my ( $where, $borrowernumber, $biblionumber ) = @_; + + my $newPriority = -1; + + my $dbh = C4::Context->dbh; + + ## Find this reserve + my $sth = $dbh->prepare('SELECT * FROM reserves WHERE biblionumber = ? AND borrowernumber = ? AND cancellationdate IS NULL'); + $sth->execute( $biblionumber, $borrowernumber ); + my $reserve = $sth->fetchrow_hashref(); + $sth->finish(); + + if ( $where eq 'up' || $where eq 'down' ) { + + my $priority = $reserve->{'priority'}; + $priority = $where eq 'up' ? $priority - 1 : $priority + 1; + _FixPriority( $biblionumber, $borrowernumber, $priority ) + + } elsif ( $where eq 'top' ) { + + _FixPriority( $biblionumber, $borrowernumber, '1' ) + + } elsif ( $where eq 'bottom' ) { + + _FixPriority( $biblionumber, $borrowernumber, '999999' ) + + } + + return $newPriority; + +} + +=item ToggleLowestPriority +ToggleLowestPriority( $borrowernumber, $biblionumber ); + +This function sets the lowestPriority field to true if is false, and false if it is true. +=cut + +sub ToggleLowestPriority { + my ( $borrowernumber, $biblionumber ) = @_; + + my $dbh = C4::Context->dbh; + + my $sth = $dbh->prepare( + "UPDATE reserves SET lowestPriority = NOT lowestPriority + WHERE biblionumber = ? + AND borrowernumber = ?" + ); + $sth->execute( + $biblionumber, + $borrowernumber, + ); + $sth->finish; + + _FixPriority( $biblionumber, $borrowernumber, '999999' ); +} + =item _FixPriority -&_FixPriority($biblio,$borrowernumber,$rank); +&_FixPriority($biblio,$borrowernumber,$rank,$ignoreSetLowestRank); Only used internally (so don't export it) Changed how this functions works # @@ -1179,7 +1271,7 @@ sub IsAvailableForItemLevelRequest { =cut sub _FixPriority { - my ( $biblio, $borrowernumber, $rank ) = @_; + my ( $biblio, $borrowernumber, $rank, $ignoreSetLowestRank ) = @_; my $dbh = C4::Context->dbh; if ( $rank eq "del" ) { CancelReserve( $biblio, undef, $borrowernumber ); @@ -1255,6 +1347,15 @@ sub _FixPriority { ); $sth->finish; } + + $sth = $dbh->prepare( "SELECT borrowernumber FROM reserves WHERE lowestPriority = 1 ORDER BY priority" ); + $sth->execute(); + + unless ( $ignoreSetLowestRank ) { + while ( my $res = $sth->fetchrow_hashref() ) { + _FixPriority( $biblio, $res->{'borrowernumber'}, '999999', 1 ); + } + } } =item _Findgroupreserve diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 10c3451..5dd5ecf 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2675,6 +2675,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.01.00.061'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE `reserves` ADD `expirationdate` DATE NOT NULL"); + $dbh->do("ALTER TABLE `reserves` ADD `lowestPriority` BOOL NOT NULL"); + $dbh->do("ALTER TABLE `old_reserves` ADD `expirationdate` DATE NOT NULL"); + $dbh->do("ALTER TABLE `old_reserves` ADD `lowestPriority` BOOL NOT NULL"); + print "Upgrade to $DBversion done ( Added Additional Fields to Reserves tables )\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl index 9fd20c4..3fec9d4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl @@ -282,6 +282,7 @@ function checkMultiHold() { +
  • @@ -314,6 +315,37 @@ function checkMultiHold() {
  • +
  • + + + /lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarExpirationDate" style="cursor: pointer;" /> + + Clear Date +
  • +
  • @@ -530,11 +562,15 @@ function checkMultiHold() { Priority +   Patron Notes Date + Expiration Pick up Library Details + +   @@ -551,6 +587,25 @@ function checkMultiHold() { + + + &biblionumber=&date="> + + + + &biblionumber=&date="> + + + + &biblionumber=&date="> + + + + &biblionumber=&date="> + + + + " > @@ -562,6 +617,7 @@ function checkMultiHold() { + @@ -621,7 +677,25 @@ function checkMultiHold() { + + + &biblionumber=&date="> + + + + + + + + + + &biblionumber=&date="> + + + + + diff --git a/koha-tmpl/intranet-tmpl/prog/img/go-bottom.png b/koha-tmpl/intranet-tmpl/prog/img/go-bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..2c5a80385cca2f80f829819f25e943bee4fbb759 GIT binary patch literal 663 zcmV;I0%-k-P)^@R5*>5 zQafl0i$fhnu!z>dT@ZRl2cb)*4pLDG zZG=odu7yxbG&DksLWh*3HCi!E@4f%ybBM&$q+$>J%i-gE|2f}bM1)ohPMBp7qUZ#M ziZjW3S}CJ#h!C}JK7mjILiv!2Lnsa|Jv>a^ZWC@70Kk}r+-e%0*oG^%;PEY-Ju=$y zQ(8wB42=DLU;tx~itk0BkqZ%lKmgIM0>;oi(;G18uk)G8m+}(D!pA`x$GW$IlKT-XC=du~Fhe@}W5cL!R;jp>uMpvSGepPcH4u{1 zFCV)GvtXJgHvG>pEgb<%Lm;Fh9zKRhs1Mm!vo0wl9h=v7T*0wCML#^(K9-8dDwfOPh0opXQOv3a5686BHXl{Qv0xety%&@%$fU@!t2&O}F$dq3~5 zSJ&non@{aHV_O3h#uf_mOTDqf@uT4c(+v&P(of1QI%OprzW-Sy$L2MXNX}+oxQB2O x2h<5XpL^yi`NwxFSmKUBf0KK`E>-@2`~s>b4Ju;H8xa5i002ovPDHLkV1l6R8=C+C literal 0 HcmV?d00001 diff --git a/koha-tmpl/intranet-tmpl/prog/img/go-down.png b/koha-tmpl/intranet-tmpl/prog/img/go-down.png new file mode 100644 index 0000000000000000000000000000000000000000..3dd7fccdf06321880f69d65631a363e4b813ba04 GIT binary patch literal 683 zcmV;c0#yBpP)i}4~9FCHr5K@{qtRq-ka(iJ?ZP=uTm zA)-=KTXM11RS2~$6nm&uv{cQSuKf$?CbP4jht?XK7~kVJ-#qia^UW|KLbc-EY953z z>WRV7dqi_}NvUZfgl}C)!*&F0M_|b+V97E80CykVr~%gk05Haon|Y41T|%KagO77# zXg_$ht|?xxSRKlv`0H+L2mld?91sx{?rsQB5|>q-9K_b`yI?say^?H5vawt?QN0%L zQr8VKjyDQ9NJT;|(TgXq`xKW7BF8I9f|vxjL{S!?dO5hlaQ@UaF9;B#f^;@jnqQnt zF(N{uTTQn`k0*~rlb-kaSCCvlqKp-L5!3TI5NItHN89$(7@Zg?Pfm^Zz3vh1d@XXv z%dw2{#h9WC`nbQFn~GCVFR$PcMeY21IKx0j@A8ZjM9Y6Ue=LTlryr z>(@2W+wdKbgN~t*f$yfVK)ah_*yWGG{JKoJQ9bX-)!YpMx+aPwk<4VDSzECWL8lc@ z`=3~j{FA#{Y~yeIt$3GuF4Da7HUP}#KVRBt{l5SJIDAFD4*L zlTS!gQ51)N=l*%UXM%2Q)F>(p+zgmdf)8?0hB*|-MC$(Y7uSP)<6hBvp%pb#VTA`mW=f8m3=A+VF$gz+5g|*fW9a=~fVCub#hVuLlKG!y<+UFWVr@ zx}I*`6F`LLL;b0)!-tO1O8E;`N}ti*)<%831DzmD?+S1|ojsB`IeM-?t-lsNLXv_Y zi4Wgq(ARs$>S*s8bv>PJ3UEE0w6rsoxp>?8Sy_bP08%N`;|ezT7d{op$Nz_$1Jr8{;^A=dpOl#Zx*NxBimVOIKWYqfyp}XTIm^nr{$U_L)(rG}9&-Pp{q+Q5 zlTT<9K@`TnH@h?0jfHw>O#jh>1nt2m6SAzrkW<%*%=Q}tRboP9pC%r$9&(LA+0sq)ybQD9srhR zz3Fxu)^6aqJl)?FN%nOeOgb)4?+M_zJQ@)DvRBSb2FFH|!GH*69hXP{3*flC1BAti zbJNzAm&ca3iTKDR3xq|-Y2`eKx?tij|4I5$vH1yqf%5H^Fb8J54jK)5$VM-C5%i8b<|k&Kxh=#FG>Ox&>r z4?sb}hlkg>1-vahgJcyDBP0eg&{{(&pkA-x@zeQAv9vj35<}`!ZpEItce&w-qk8xH z6RRw9@QrP7!N5#{!3lE@ZdYYZTfgiFi6Lb!&3aDLCbZTHrTP~zgJ5t59%w*hOuEoyT++I zn$b9r%cFfhHe2K68PkBu*@^<$y+7xQ$wJ~;c5aBx$R=xq*41Wo zhwQus_VOgm0hughj}MhOvs#{>Vg09Y8WxjWUJY5YW zJ?&8eG!59Cz=|E%Ns@013KLWOLV)CObIIj_5{>{#k%TEAMs_GbdDV`x-iYsGH z#=Z{USAQA>NY(}X7=3{K8# Hold Starts on Date + Hold Not Needed After Place On: @@ -337,7 +338,39 @@ //]]> + + + " id="expiration_date_" size="10" readonly="readonly"> + /lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarExpirationDate" style="cursor: pointer;" /> + +
    + ').value='';">Clear Date + + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl index 77ee406..4c39619 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl @@ -323,10 +323,11 @@ $.tablesorter.addParser({ + - - - + + + @@ -349,6 +350,7 @@ $.tablesorter.addParser({ + diff --git a/misc/cronjobs/cancel_expired_reserves.pl b/misc/cronjobs/cancel_expired_reserves.pl new file mode 100755 index 0000000..41a810e --- /dev/null +++ b/misc/cronjobs/cancel_expired_reserves.pl @@ -0,0 +1,39 @@ +#!/usr/bin/perl + +# This script loops through each overdue item, determines the fine, +# and updates the total amount of fines due by each user. It relies on +# the existence of /tmp/fines, which is created by ??? +# Doesnt really rely on it, it relys on being able to write to /tmp/ +# It creates the fines file +# +# This script is meant to be run nightly out of cron. + +# Copyright 2000-2002 Katipo Communications +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + +# $Id: sendoverdues.pl,v 1.1.2.1 2007/03/26 22:38:09 tgarip1957 Exp $ + +BEGIN { + # find Koha's Perl modules + # test carefully before changing this + use FindBin; + eval { require "$FindBin::Bin/../kohalib.pl" }; +} + +use C4::Reserves; + +CancelExpiredReserves(); \ No newline at end of file diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 4471dff..02d7c5e 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -199,6 +199,8 @@ if ( $query->param('place_reserve') ) { ) { $startdate = $query->param("reserve_date_$biblioNum"); } + + my $expiration_date = $query->param("expiration_date_$biblioNum"); # If a specific item was selected and the pickup branch is the same as the # holdingbranch, force the value $rank and $found. @@ -216,7 +218,7 @@ if ( $query->param('place_reserve') ) { } # Here we actually do the reserveration. Stage 3. - AddReserve($branch, $borrowernumber, $biblioNum, 'a', [$biblioNum], $rank, $startdate, $notes, + AddReserve($branch, $borrowernumber, $biblioNum, 'a', [$biblioNum], $rank, $startdate, $expiration_date, $notes, $biblioData->{'title'}, $itemNum, $found); } @@ -475,15 +477,13 @@ $template->param(itemtable_colspan => $itemTableColspan); # display infos $template->param(bibitemloop => $biblioLoop); -# can set reserve date in future -if ( - C4::Context->preference( 'AllowHoldDateInFuture' ) && - C4::Context->preference( 'OPACAllowHoldDateInFuture' ) - ) { - $template->param( - reserve_in_future => 1, +$template->param( DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), - ); +); + +# can set reserve date in future +if ( C4::Context->preference( 'AllowHoldDateInFuture' ) && C4::Context->preference( 'OPACAllowHoldDateInFuture' ) ) { + $template->param( reserve_in_future => 1 ); } output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 487c136..e92d50c 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -184,6 +184,13 @@ $template->param( branchloop => \@branch_loop ); my @reserves = GetReservesFromBorrowernumber( $borrowernumber ); foreach my $res (@reserves) { $res->{'reservedate'} = format_date( $res->{'reservedate'} ); + + if ( $res->{'expirationdate'} ne '0000-00-00' ) { + $res->{'expirationdate'} = format_date( $res->{'expirationdate'} ) + } else { + $res->{'expirationdate'} = ''; + } + my $publictype = $res->{'publictype'}; $res->{$publictype} = 1; $res->{'waiting'} = 1 if $res->{'found'} eq 'W'; diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl index 7026140..84096cc 100755 --- a/reserve/placerequest.pl +++ b/reserve/placerequest.pl @@ -51,6 +51,7 @@ my $type=$input->param('type'); my $title=$input->param('title'); my $borrowernumber=GetMember($borrower,'cardnumber'); my $checkitem=$input->param('checkitem'); +my $expirationdate = $input->param('expiration_date'); my $multi_hold = $input->param('multi_hold'); my $biblionumbers = $multi_hold ? $input->param('biblionumbers') : ($biblionumber . '/'); @@ -98,17 +99,17 @@ if ($type eq 'str8' && $borrowernumber ne ''){ if ($multi_hold) { my $bibinfo = $bibinfos{$biblionumber}; AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',[$biblionumber], - $bibinfo->{rank},$startdate,$notes,$bibinfo->{title},$checkitem,$found); + $bibinfo->{rank},$startdate,$expirationdate,$notes,$bibinfo->{title},$checkitem,$found); } else { if ($input->param('request') eq 'any'){ # place a request on 1st available - AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$notes,$title,$checkitem,$found); + AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem,$found); } elsif ($reqbib[0] ne ''){ # FIXME : elsif probably never reached, (see top of the script) # place a request on a given item - AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'o',\@reqbib,$rank[0],$startdate,$notes,$title,$checkitem, $found); + AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'o',\@reqbib,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem, $found); } else { - AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$notes,$title,$checkitem, $found); + AddReserve($branch,$borrowernumber->{'borrowernumber'},$biblionumber,'a',\@realbi,$rank[0],$startdate,$expirationdate,$notes,$title,$checkitem, $found); } } } diff --git a/reserve/request.pl b/reserve/request.pl index 2a744e3..6780d5b 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -91,6 +91,24 @@ my $warnings; my $messages; my $date = C4::Dates->today('iso'); +my $action = $input->param('action'); + +if ( $action eq 'move' ) { + my $where = $input->param('where'); + my $borrowernumber = $input->param('borrowernumber'); + my $biblionumber = $input->param('biblionumber'); + + AlterPriority( $where, $borrowernumber, $biblionumber ); + +} elsif ( $action eq 'cancel' ) { + my $borrowernumber = $input->param('borrowernumber'); + my $biblionumber = $input->param('biblionumber'); + CancelReserve( $biblionumber, '', $borrowernumber ); +} elsif ( $action eq 'setLowestPriority' ) { + my $borrowernumber = $input->param('borrowernumber'); + my $biblionumber = $input->param('biblionumber'); + ToggleLowestPriority( $borrowernumber, $biblionumber ); +} if ($findborrower) { my ( $count, $borrowers ) = @@ -482,6 +500,7 @@ foreach my $biblionumber (@biblionumbers) { $reserve{'hidename'} = 1; $reserve{'cardnumber'} = $reserveborrowerinfo->{'cardnumber'}; } + $reserve{'expirationdate'} = format_date( $res->{'expirationdate'} ) unless ( $res->{'expirationdate'} eq '0000-00-00' ); $reserve{'date'} = format_date( $res->{'reservedate'} ); $reserve{'borrowernumber'} = $res->{'borrowernumber'}; $reserve{'biblionumber'} = $res->{'biblionumber'}; @@ -497,6 +516,7 @@ foreach my $biblionumber (@biblionumbers) { $reserve{'ccode'} = $res->{'ccode'}; $reserve{'barcode'} = $res->{'barcode'}; $reserve{'priority'} = $res->{'priority'}; + $reserve{'lowestPriority'} = $res->{'lowestPriority'}; $reserve{'branchloop'} = GetBranchesLoop($res->{'branchcode'}); $reserve{'optionloop'} = \@optionloop; @@ -549,16 +569,14 @@ foreach my $biblionumber (@biblionumbers) { $template->param( biblioloop => \@biblioloop ); $template->param( biblionumbers => $biblionumbers ); +$template->param( DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar() ); if ($multihold) { $template->param( multi_hold => 1 ); } if ( C4::Context->preference( 'AllowHoldDateInFuture' ) ) { - $template->param( - reserve_in_future => 1, - DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), - ); + template->param( reserve_in_future => 1 ); } # printout the page -- 1.5.6.5
    Title Placed OnExpires On Pick Up LocationPriorityPriority Status Modify
    Never Expires