Bug 5549 : fixed non-cloned date object in Add date for calendar, also removed erounous dumper in moremember.pl that dumped entire issue

This commit is contained in:
Elliott Davis 2012-03-19 16:56:44 -05:00 committed by Chris Cormack
parent 49c35ba38e
commit da14b2f4ba
2 changed files with 8 additions and 8 deletions

View file

@ -996,12 +996,12 @@ sub AddIssue {
# check if we just renew the issue.
#
if ($actualissue->{borrowernumber} eq $borrower->{'borrowernumber'}) {
$datedue = AddRenewal(
$borrower->{'borrowernumber'},
$item->{'itemnumber'},
$branch,
$datedue,
$issuedate, # here interpreted as the renewal date
$datedue = AddRenewal(
$borrower->{'borrowernumber'},
$item->{'itemnumber'},
$branch,
$datedue,
$issuedate, # here interpreted as the renewal date
);
}
else {
@ -1016,7 +1016,6 @@ sub AddIssue {
}
MoveReserve( $item->{'itemnumber'}, $borrower->{'borrowernumber'}, $cancelreserve );
# Starting process for transfer job (checking transfert and validate it if we have one)
my ($datesent) = GetTransfers($item->{'itemnumber'});
if ($datesent) {

View file

@ -83,7 +83,8 @@ sub _init {
}
sub addDate {
my ( $self, $base_date, $add_duration, $unit ) = @_;
my ( $self, $startdate, $add_duration, $unit ) = @_;
my $base_date = $startdate->clone();
if ( ref $add_duration ne 'DateTime::Duration' ) {
$add_duration = DateTime::Duration->new( days => $add_duration );
}