[3.0.x](bug #3753) returning a document always needs transfert

This patch fix a bug in 3.0.4 that do, all returned documents will always need transfers.
This commit is contained in:
Nahuel ANGELINETTI 2009-11-03 11:55:53 +01:00 committed by Henri-Damien LAURENT
parent 3dfbe5d8af
commit 77392c752c
1 changed files with 5 additions and 2 deletions

View File

@ -1508,8 +1508,11 @@ sub AddReturn {
#adding message if holdingbranch is non equal a userenv branch to return the document to homebranch
#we check, if we don't have reserv or transfert for this document, if not, return it to homebranch .
if (($doreturn or $messages->{'NotIssued'}) and ($branch ne $iteminformation->{$hbr}) and not $messages->{'WrongTransfer'} and ($validTransfert ne 1) and ($reserveDone ne 1) ){
if (($doreturn or $messages->{'NotIssued'})
and ($branch ne $hbr)
and not $messages->{'WrongTransfer'}
and ($validTransfert ne 1)
and ($reserveDone ne 1) ){
if (C4::Context->preference("AutomaticItemReturn") == 1) {
ModItemTransfer($iteminformation->{'itemnumber'}, $branch, $iteminformation->{$hbr});
$messages->{'WasTransfered'} = 1;