From c3c47af750f38dee973ba5f2ca13f9358ea04759 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Tue, 19 Feb 2008 10:06:41 +1300 Subject: [PATCH] Fix for renewals not working at circulation Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Circulation.pm | 3 +-- reserve/renewscript.pl | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 24a652f00c..613163bfbd 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1634,8 +1634,7 @@ sub AddRenewal { my ( $borrowernumber, $itemnumber, $branch ,$datedue ) = @_; my $dbh = C4::Context->dbh; - - my $biblio = GetBiblioFromItemNumber($itemnumber); + my $biblio = GetBiblioFromItemNumber($itemnumber); # If the due date wasn't specified, calculate it by adding the # book's loan length to today's date. unless ( $datedue ) { diff --git a/reserve/renewscript.pl b/reserve/renewscript.pl index 3700043056..088d55f19c 100755 --- a/reserve/renewscript.pl +++ b/reserve/renewscript.pl @@ -56,7 +56,10 @@ else { } my @barcodes = $input->param('barcodes[]'); my $branch=$input->param('branch'); -my $datedue=C4::Dates->new($input->param('newduedate')); +my $datedue; +if ($input->param('newduedate')){ + $datedue=C4::Dates->new($input->param('newduedate')); +} # warn "barcodes : @barcodes"; # -- 2.39.5