Replaces all instances of GetMemberDetails with the more efficient GetMember. Since
no hash values other than the borrowers table's fields are used in this module, the
transition is safe.
To test:
1. Checkout a material; the page should load without error
2. Renew a material: the page should load without error
3. Return a material: the page should load without error
The above test plan invokes all the subroutines affected by this patch; any call to an undefined
value in a hashref should give a warning
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
-=item C<$borrower> hash with borrower informations (from GetMemberDetails)
+=item C<$borrower> hash with borrower informations (from GetMember or GetMemberDetails)
=item C<$barcode> is the bar code of the book being issued.
=item C<$barcode> is the bar code of the book being issued.
elsif ($issue->{borrowernumber}) {
# issued to someone else
elsif ($issue->{borrowernumber}) {
# issued to someone else
- my $currborinfo = C4::Members::GetMemberDetails( $issue->{borrowernumber} );
+ my $currborinfo = C4::Members::GetMember( borrowernumber => $issue->{borrowernumber} );
# warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
$needsconfirmation{ISSUED_TO_ANOTHER} = 1;
# warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
$needsconfirmation{ISSUED_TO_ANOTHER} = 1;
my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} );
if ($restype) {
my $resbor = $res->{'borrowernumber'};
my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} );
if ($restype) {
my $resbor = $res->{'borrowernumber'};
- my ( $resborrower ) = C4::Members::GetMemberDetails( $resbor, 0 );
+ my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor );
my $branches = GetBranches();
my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'};
if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" )
my $branches = GetBranches();
my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'};
if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" )
-=item C<$borrower> is a hash with borrower informations (from GetMemberDetails).
+=item C<$borrower> is a hash with borrower informations (from GetMember or GetMemberDetails).
=item C<$barcode> is the barcode of the item being issued.
=item C<$barcode> is the barcode of the item being issued.
my $issue = GetItemIssue($itemnumber);
# warn Dumper($iteminformation);
if ($issue and $issue->{borrowernumber}) {
my $issue = GetItemIssue($itemnumber);
# warn Dumper($iteminformation);
if ($issue and $issue->{borrowernumber}) {
- $borrower = C4::Members::GetMemberDetails($issue->{borrowernumber})
+ $borrower = C4::Members::GetMember( borrowernumber => $issue->{borrowernumber})
or die "Data inconsistency: barcode $barcode (itemnumber:$itemnumber) claims to be issued to non-existant borrowernumber '$issue->{borrowernumber}'\n"
. Dumper($issue) . "\n";
} else {
or die "Data inconsistency: barcode $barcode (itemnumber:$itemnumber) claims to be issued to non-existant borrowernumber '$issue->{borrowernumber}'\n"
. Dumper($issue) . "\n";
} else {
# based on the value of the RenewalPeriodBase syspref.
unless ($datedue) {
# based on the value of the RenewalPeriodBase syspref.
unless ($datedue) {
- my $borrower = C4::Members::GetMemberDetails( $borrowernumber, 0 ) or return undef;
+ my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ) or return undef;
my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'};
$datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ?
my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'};
$datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ?
my $renewsallowed = 0;
my $renewsleft = 0;
my $renewsallowed = 0;
my $renewsleft = 0;
- my $borrower = C4::Members::GetMemberDetails($bornum);
+ my $borrower = C4::Members::GetMember( borrowernumber => $bornum);
my $item = GetItem($itemno);
# Look in the issues table for this item, lent to this borrower,
my $item = GetItem($itemno);
# Look in the issues table for this item, lent to this borrower,