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)
committerPaul Poulain <paul.poulain@biblibre.com>
Sun, 6 Nov 2011 16:55:37 +0000 (17:55 +0100)
commit58bdfdb08883eb52777321f883491eaff1493857
treed905686cd34452525696d5b5068291711bbab86a
parentbc33391fc5491e0acbc9431d3a6b24c4f357ff79
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.
acqui/booksellers.pl