&GetMemberAccountRecords
&GetBorNotifyAcctRecord
- GetBorrowerCategorycode
-
&GetBorrowersToExpunge
&GetBorrowersWhoHaveNeverBorrowed
&GetBorrowersWithIssuesHistoryOlderThan
}
}
- my $old_categorycode = GetBorrowerCategorycode( $data{borrowernumber} );
+ my $old_categorycode = Koha::Patrons->find( $data{borrowernumber} )->categorycode;
# get only the columns of a borrower
my $schema = Koha::Database->new()->schema;
return $results;
}
-=head2 GetBorrowerCategorycode
-
- $categorycode = &GetBorrowerCategoryCode( $borrowernumber );
-
-Given the borrowernumber, the function returns the corresponding categorycode
-
-=cut
-
-sub GetBorrowerCategorycode {
- my ( $borrowernumber ) = @_;
- my $dbh = C4::Context->dbh;
- my $sth = $dbh->prepare( qq{
- SELECT categorycode
- FROM borrowers
- WHERE borrowernumber = ?
- } );
- $sth->execute( $borrowernumber );
- return $sth->fetchrow;
-}
-
=head2 GetAge
$dateofbirth,$date = &GetAge($date);
use Koha::List::Patron;
use Koha::Libraries;
use Koha::Patron::Categories;
+use Koha::Patrons;
my $input = new CGI;
my $op = $input->param('op') || 'show_form';
}
}
- #
- my $borrower_categorycode = GetBorrowerCategorycode $borrowernumber;
+ my $borrower_categorycode = Koha::Patrons->find( $borrowernumber )->categorycode;
my $i=0;
for ( @attributes ) {
my $attribute;