# 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
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=head1 request.pl
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { reserveforothers => 1 },
+ flagsrequired => { reserveforothers => 'place_holds' },
}
);
);
}
- if ( defined $res->{'found'} && $res->{'found'} eq 'W' ) {
+ if ( defined $res->{'found'} && $res->{'found'} eq 'W' || $res->{'found'} eq 'T' ) {
my $item = $res->{'itemnumber'};
$item = GetBiblioFromItemNumber($item,undef);
$reserve{'wait'}= 1;
}
# set found to 1 if reserve is waiting for patron pickup
$reserve{'found'} = 1 if $res->{'found'} eq 'W';
+ $reserve{'intransit'} = 1 if $res->{'found'} eq 'T';
} elsif ($res->{priority} > 0) {
if (defined($res->{itemnumber})) {
my $item = GetItem($res->{itemnumber});
$reserve{'hidename'} = 1;
$reserve{'cardnumber'} = $reserveborrowerinfo->{'cardnumber'};
}
- $reserve{'expirationdate'} = format_date( $res->{'expirationdate'} ) unless ( $res->{'expirationdate'} eq '0000-00-00' );
+ $reserve{'expirationdate'} = format_date( $res->{'expirationdate'} )
+ unless ( !defined($res->{'expirationdate'}) || $res->{'expirationdate'} eq '0000-00-00' );
$reserve{'date'} = format_date( $res->{'reservedate'} );
$reserve{'borrowernumber'} = $res->{'borrowernumber'};
$reserve{'biblionumber'} = $res->{'biblionumber'};
}
if ( C4::Context->preference( 'AllowHoldDateInFuture' ) ) {
- template->param( reserve_in_future => 1 );
+ $template->param( reserve_in_future => 1 );
}
# printout the page