[Koha-patches] [PATCH 18/55] (MT #2930) fix return date

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Wed Mar 10 22:26:00 CET 2010


From: Nahuel ANGELINETTI <nahuel.angelinetti at biblibre.com>

when a document is returned, the return date set is yesterday, because it's detected as dropbox mode; It shouldn't.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>
---
 C4/Circulation.pm |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index cfe8f28..03988f1 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -1442,8 +1442,9 @@ sub AddReturn {
     # case of a return of document (deal with issues and holdingbranch)
     if ($doreturn) {
         $borrower or warn "AddReturn without current borrower";
-		my $circControlBranch = _GetCircControlBranch($item,$borrower);
+        my $circControlBranch;
         if ($dropbox) {
+            $circControlBranch = _GetCircControlBranch( $item, $borrower );
             # don't allow dropbox mode to create an invalid entry in issues (issuedate > returndate) FIXME: actually checks eq, not gt
             undef($dropbox) if ( $item->{'issuedate'} eq C4::Dates->today('iso') );
         }
-- 
1.6.3.3




More information about the Koha-patches mailing list