Confusion over this bit of code in Circ2.pm
Hi, I am looking at committing katipo koha changes back to cvs and i noticed this bit of code variation katipo (older) version: my ($resfound, $resrec) = CheckReserves($iteminformation->{'itemnumber'}); if ($resfound and not $ignoreRs) { $resrec->{'ResFound'} = $resfound; $messages->{'ResFound'} = $resrec; $dotransfer = 0; } #actually do the transfer.... if ($dotransfer) { dotransfer($iteminformation->{'itemnumber'}, $fbr, $tbr); $messages->{'WasTransfered'} = 1; } newer version on Savannah cvs: my ($resfound, $resrec) = CheckReserves($iteminformation->{'itemnumber'}); if ($resfound and not $ignoreRs) { $resrec->{'ResFound'} = $resfound; # $messages->{'ResFound'} = $resrec; $dotransfer = 1; } if ($dotransfer and not $resfound) { dotransfer($iteminformation->{'itemnumber'}, $fbr, $tbr); $messages->{'WasTransfered'} = 1; } i'm confused as to what the newer version of code is trying to achieve, the way i read it (and i might be wrong) is that it is saying that if a reserve is found, and the ignore reserve is false (ie. do not ignore reserve), allow dotransfer but then the next bit says if dotransfer and not reserve found then allow transfer which seems to be contrary to the first bit any help to understanding the change will be most appreciated thanks, Robert Lyon
Le Mercredi 7 Juin 2006 02:33, bob@katipo.co.nz a écrit :
Hi,
I am looking at committing katipo koha changes back to cvs and i noticed this bit of code variation
katipo (older) version:
my ($resfound, $resrec) = CheckReserves($iteminformation->{'itemnumber'}); if ($resfound and not $ignoreRs) { $resrec->{'ResFound'} = $resfound; $messages->{'ResFound'} = $resrec; $dotransfer = 0; } #actually do the transfer.... if ($dotransfer) { dotransfer($iteminformation->{'itemnumber'}, $fbr, $tbr); $messages->{'WasTransfered'} = 1; }
newer version on Savannah cvs:
my ($resfound, $resrec) = CheckReserves($iteminformation->{'itemnumber'}); if ($resfound and not $ignoreRs) { $resrec->{'ResFound'} = $resfound; # $messages->{'ResFound'} = $resrec; $dotransfer = 1; }
if ($dotransfer and not $resfound) { dotransfer($iteminformation->{'itemnumber'}, $fbr, $tbr); $messages->{'WasTransfered'} = 1; }
i'm confused as to what the newer version of code is trying to achieve, the way i read it (and i might be wrong) is that it is saying that if a reserve is found, and the ignore reserve is false (ie. do not ignore reserve), allow dotransfer but then the next bit says if dotransfer and not reserve found then allow transfer which seems to be contrary to the first bit
any help to understanding the change will be most appreciated thanks,
Robert Lyon
I think this new function, is for return the document to his homebranch, if the document is returned in an another library, the system check if there is no reserves linked to this document, and if the document is not on his homebranch, we return the document (by dotransfer function...) to his homebranch ..... .
On Wed, Jun 07, 2006 at 11:40:29AM +0200, arnaud laurin said:
I think this new function, is for return the document to his homebranch, if the document is returned in an another library, the system check if there is no reserves linked to this document, and if the document is not on his homebranch, we return the document (by dotransfer function...) to his homebranch ..... .
Hi Arnaud Ahh, I see, perhaps we should make this a system preference. So that a library can choose to have this behaviour, or not. For HLT, they move their items between branches quite regularly, and they dont want it to come back to the homebranch all the time. IE they send a box of books from one branch to another, to stay there for a period of time, 2 or 3 months for example. And then to come back to their home branch. So they dont want them to get transfered on a return straight away. Does this make sense? Chris -- Chris Cormack Programmer 027 4500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
participants (3)
-
arnaud laurin -
bob@katipo.co.nz -
Chris Cormack