From 3502810346d5e2b24417c47638f2ee42dd5c61d7 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 23 Sep 2009 16:10:23 +0000 Subject: [PATCH] (bug 1532) 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. [RM note for documentation: this adds the following features: * ability to specify an expiration date for a hold request when placing it via the staff interface or OPAC * daily batch job to cancel expired holds * nice interface to change the priority of hold requests for a bib in the staff interface] Signed-off-by: Galen Charlton --- C4/Reserves.pm | 111 ++++++++++++++++-- installer/data/mysql/updatedatabase.pl | 12 ++ .../prog/en/modules/reserve/request.tmpl | 74 ++++++++++++ .../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 .../prog/en/modules/opac-reserve.tmpl | 33 ++++++ .../opac-tmpl/prog/en/modules/opac-user.tmpl | 8 +- misc/cronjobs/cancel_expired_reserves.pl | 39 ++++++ opac/opac-reserve.pl | 10 +- opac/opac-user.pl | 7 ++ reserve/placerequest.pl | 9 +- reserve/request.pl | 26 +++- 15 files changed, 306 insertions(+), 23 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 d98b838ed4..668117e2f9 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -115,19 +115,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 = @@ -137,6 +140,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 ); @@ -167,16 +171,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 ); #} @@ -219,7 +223,9 @@ sub GetReservesFromBiblionumber { constrainttype, found, itemnumber, - reservenotes + reservenotes, + expirationdate, + lowestPriority FROM reserves WHERE biblionumber = ? "; unless ( $all_dates ) { @@ -833,6 +839,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); @@ -1338,9 +1364,69 @@ 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 + +=cut +sub AlterPriority { + my ( $where, $borrowernumber, $biblionumber ) = @_; + + 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' ) + + } +} + +=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 # @@ -1352,7 +1438,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 ); @@ -1428,6 +1514,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 2f3c670cfd..915a38bdac 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3479,6 +3479,18 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES print "Upgrade to $DBversion done (bug 1080: add soundon system preference for circulation sounds)\n"; SetVersion ($DBversion); } + +$DBversion = '3.01.00.121'; +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 51c4e0a62a..d5250e6953 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 @@ -339,7 +340,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 1a5663481e..fabcb94c3f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl @@ -334,10 +334,11 @@ $.tablesorter.addParser({ + - - - + + + @@ -360,6 +361,7 @@ $.tablesorter.addParser({ + diff --git a/misc/cronjobs/cancel_expired_reserves.pl b/misc/cronjobs/cancel_expired_reserves.pl new file mode 100755 index 0000000000..41a810ecd4 --- /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 a0b0e45caa..499f9cb726 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -189,6 +189,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. @@ -208,7 +210,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) if ($canreserve); } @@ -486,9 +488,9 @@ if ( C4::Context->preference( 'OPACAllowHoldDateInFuture' ) ) { $template->param( - reserve_in_future => 1, - DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), - ); + reserve_in_future => 1, + DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), + ); } output_html_with_http_headers $query, $cookie, $template->output; diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 3c73b81b1e..772b7f34d0 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -183,6 +183,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 b299c17402..dba43c424b 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('cardnumber'=>$borrower); 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 908a626b24..561bb5a03b 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 ) = @@ -491,6 +509,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'}; @@ -506,6 +525,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; @@ -558,16 +578,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 -- 2.39.5
    Title Placed OnExpires On Pick Up LocationPriorityPriority Status Modify
    Never Expires