]> git.koha-community.org Git - koha.git/commit
Bug 6390 Followup: Basket's authorisedby might not be a borrowernumber
authorIan Walls <ian.walls@bywatersolutions.com>
Tue, 18 Oct 2011 20:13:15 +0000 (16:13 -0400)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Wed, 16 Nov 2011 12:47:55 +0000 (07:47 -0500)
commit598c008fa3155645059800d01d72458733ecd5fe
tree849f54bfab622bdad8e43ee033db89398f5c642b
parentedcbd0cde07d496ceb7b01e60ee7f21995b37274
Bug 6390 Followup: Basket's authorisedby might not be a borrowernumber

aqbasket.authorisedby is not foreign key constrainted to borrowers.borrowernumber,
so if it's anything other than that, vendor search breaks by using an undefined value
(GetMember() on an invalid borrowernumber) as a HASH ref.

This patch sets the branchcode (the desired value from GetMember) to a blank value, then only
changes it if GetMember is defined.  In the case where the authorisedby librarian has been deleted,
or the value is otherwise invalid, and AcqViewBaskets is set to 'branch', the basket will not appear
except to superlibrarians

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Invalid borrowernumber in aqbasket.authorisedby no longer breaks search.
(cherry picked from commit 58bdfdb08883eb52777321f883491eaff1493857)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
acqui/booksellers.pl