Bugzilla – Attachment 31355 Details for
Bug 12868
GetMemberDetails calls GetMemberAccountRecords incorrectly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12868: Wrong variable used for borrower number
Bug-12868-Wrong-variable-used-for-borrower-number.patch (text/plain), 1.51 KB, created by
Mark Tompsett
on 2014-09-03 23:21:38 UTC
(
hide
)
Description:
Bug 12868: Wrong variable used for borrower number
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-09-03 23:21:38 UTC
Size:
1.51 KB
patch
obsolete
>From 4127ca8afc4e2d909b9c6391af22aaa8fe0ff64b Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 3 Sep 2014 19:15:12 -0400 >Subject: [PATCH] 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. >--- > C4/Members.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index e3a5538..42c164a 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -356,7 +356,7 @@ sub GetMemberDetails { > } > my $borrower = $sth->fetchrow_hashref; > return unless $borrower; >- my ($amount) = GetMemberAccountRecords( $borrowernumber); >+ my ($amount) = GetMemberAccountRecords($borrower->{borrowernumber}); > $borrower->{'amountoutstanding'} = $amount; > # FIXME - patronflags calls GetMemberAccountRecords... just have patronflags return $amount > my $flags = patronflags( $borrower); >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12868
:
31354
|
31355
|
33942
|
33943
|
34314
|
34315