|
Lines 78-85
BEGIN {
Link Here
|
| 78 |
&GetMemberAccountRecords |
78 |
&GetMemberAccountRecords |
| 79 |
&GetBorNotifyAcctRecord |
79 |
&GetBorNotifyAcctRecord |
| 80 |
|
80 |
|
| 81 |
GetBorrowerCategorycode |
|
|
| 82 |
|
| 83 |
&GetBorrowersToExpunge |
81 |
&GetBorrowersToExpunge |
| 84 |
&GetBorrowersWhoHaveNeverBorrowed |
82 |
&GetBorrowersWhoHaveNeverBorrowed |
| 85 |
&GetBorrowersWithIssuesHistoryOlderThan |
83 |
&GetBorrowersWithIssuesHistoryOlderThan |
|
Lines 522-528
sub ModMember {
Link Here
|
| 522 |
} |
520 |
} |
| 523 |
} |
521 |
} |
| 524 |
|
522 |
|
| 525 |
my $old_categorycode = GetBorrowerCategorycode( $data{borrowernumber} ); |
523 |
my $old_categorycode = Koha::Patrons->find( $data{borrowernumber} )->categorycode; |
| 526 |
|
524 |
|
| 527 |
# get only the columns of a borrower |
525 |
# get only the columns of a borrower |
| 528 |
my $schema = Koha::Database->new()->schema; |
526 |
my $schema = Koha::Database->new()->schema; |
|
Lines 1213-1238
sub GetUpcomingMembershipExpires {
Link Here
|
| 1213 |
return $results; |
1211 |
return $results; |
| 1214 |
} |
1212 |
} |
| 1215 |
|
1213 |
|
| 1216 |
=head2 GetBorrowerCategorycode |
|
|
| 1217 |
|
| 1218 |
$categorycode = &GetBorrowerCategoryCode( $borrowernumber ); |
| 1219 |
|
| 1220 |
Given the borrowernumber, the function returns the corresponding categorycode |
| 1221 |
|
| 1222 |
=cut |
| 1223 |
|
| 1224 |
sub GetBorrowerCategorycode { |
| 1225 |
my ( $borrowernumber ) = @_; |
| 1226 |
my $dbh = C4::Context->dbh; |
| 1227 |
my $sth = $dbh->prepare( qq{ |
| 1228 |
SELECT categorycode |
| 1229 |
FROM borrowers |
| 1230 |
WHERE borrowernumber = ? |
| 1231 |
} ); |
| 1232 |
$sth->execute( $borrowernumber ); |
| 1233 |
return $sth->fetchrow; |
| 1234 |
} |
| 1235 |
|
| 1236 |
=head2 GetAge |
1214 |
=head2 GetAge |
| 1237 |
|
1215 |
|
| 1238 |
$dateofbirth,$date = &GetAge($date); |
1216 |
$dateofbirth,$date = &GetAge($date); |