From 0da64773779bee0d594e32764a760d79abdd89b0 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Fri, 14 May 2010 23:20:41 +0200 Subject: [PATCH] Bug 4326 ; returndate were fixed on the day before dropbox mode was set even though it was not dropbox. This patch is an adaptation of Ian Walls http://www.mail-archive.com/koha-patches@lists.koha.org/msg04736.html --- C4/Circulation.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 0b0a9b2fe4..5fcd294554 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1431,9 +1431,10 @@ sub AddReturn { # case of a return of document (deal with issues and holdingbranch) if ($doreturn) { - my $circControlBranch = _GetCircControlBranch($iteminformation,$borrower); + my $circControlBranch; if($dropbox) { # don't allow dropbox mode to create an invalid entry in issues (issuedate > returndate) FIXME: actually checks eq, not gt + $circControlBranch=_GetCircControlBranch($iteminformation,$borrower) unless ( $iteminformation->{'issuedate'} eq C4::Dates->today('iso') ); undef($dropbox) if ( $iteminformation->{'issuedate'} eq C4::Dates->today('iso') ); } MarkIssueReturned($borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'},$circControlBranch); -- 2.39.5