]> git.koha-community.org Git - koha.git/commit
bug 3435: AddReturn overhaul.
authorJoe Atzberger <joe.atzberger@liblime.com>
Thu, 30 Jul 2009 00:56:07 +0000 (19:56 -0500)
committerGalen Charlton <galen.charlton@liblime.com>
Thu, 30 Jul 2009 15:06:50 +0000 (11:06 -0400)
commit51e8fc2cb6a0cf79f19206c822a4361aeca6f63f
tree26dcf3a9022f17b71c187a5d0d20771a3a7bae1b
parent08816bab078c5aa9ec8bfce59ea71fdc4a1c2fed
bug 3435: AddReturn overhaul.

Required for SIP checkin implementation, but also for internal correctness.
AddReturn had too many things going on, with no guarantee of data being
available for the later calls.  At some point we started tacking on all the
branch transfer logic without testing edge cases.  In particular, $borrower
is not checked to be sure it is defined, considering the item may not have been
checked out so no borrower would be associated.  That means that CircControl
of "PatronLibrary" would be inaccurate, Circ Alerts will be totally confused
(untargeted), and the Fix... subs would fail.

Note that *many* errors are still present in _FixAccountForLostAndReturned, including
those where comments are added, such that it might behave strangely even with $borrower.

Renamed the internal subs with leading underscore, per convention.  Changed
the arguments to be scalars when only scalars are needed, not entire objects.
Added depth to WrongBranch message that includes Rightbranch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
C4/Circulation.pm
t/lib/KohaTest/Circulation.pm