]> git.koha-community.org Git - koha.git/commit
Bug 12868: Wrong variable used for borrower number
authorMark Tompsett <mtompset@hotmail.com>
Wed, 3 Sep 2014 23:15:12 +0000 (19:15 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Sat, 10 Jan 2015 19:16:57 +0000 (16:16 -0300)
commit483ad2aee510cb23f2bae61883d6b90de262d13d
treefaa7b70c5d6e47724ad780fe91f5aac8924aa278
parente6dbae9dbf8ce506d6692cb7abace9c9b3175e3e
Bug 12868: Wrong variable used for borrower number

When only the card number is passed to GetMemberDetail, the
value of $borrowernumber is undefined. Even after finding the
correct borrower and providing a nice hash ($borrower), the
GetMemberAccountRecords is called with the wrong borrower number,
even though it is in the hash ($borrower).

This was fixed by changing $borrowernumber to
$borrower->{borrowernumber}, so that the hash's value will always
be used, since it is correct regardless of whether borrowernumber
or cardnumber were used to find the borrower.

TEST PLAN
---------
1) Apply both patches
2) prove -v t/db_dependent/Member.t
   -- This time the previously failing test will pass.
3) run koha QA test tools.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Members.pm