Lines 23-32
use Carp;
Link Here
|
23 |
use Text::CSV; |
23 |
use Text::CSV; |
24 |
|
24 |
|
25 |
use C4::Members; |
25 |
use C4::Members; |
26 |
use C4::Branch; |
|
|
27 |
use C4::Members::Attributes qw(:all); |
26 |
use C4::Members::Attributes qw(:all); |
28 |
use C4::Members::AttributeTypes; |
27 |
use C4::Members::AttributeTypes; |
29 |
|
28 |
|
|
|
29 |
use Koha::Libraries; |
30 |
use Koha::Patrons; |
31 |
use Koha::Patron::Categories; |
30 |
use Koha::DateUtils; |
32 |
use Koha::DateUtils; |
31 |
|
33 |
|
32 |
=head1 NAME |
34 |
=head1 NAME |
Lines 401-407
Returns an array of borrowers' table columns.
Link Here
|
401 |
sub set_column_keys { |
403 |
sub set_column_keys { |
402 |
my ($self, $extended) = @_; |
404 |
my ($self, $extended) = @_; |
403 |
|
405 |
|
404 |
my @columnkeys = map { $_ ne 'borrowernumber' ? $_ : () } C4::Members::columns(); |
406 |
my @columnkeys = map { $_ ne 'borrowernumber' ? $_ : () } Koha::Patrons->columns(); |
405 |
push( @columnkeys, 'patron_attributes' ) if $extended; |
407 |
push( @columnkeys, 'patron_attributes' ) if $extended; |
406 |
|
408 |
|
407 |
return @columnkeys; |
409 |
return @columnkeys; |
Lines 450-457
sub check_branch_code {
Link Here
|
450 |
} |
452 |
} |
451 |
|
453 |
|
452 |
# look for branch code |
454 |
# look for branch code |
453 |
my $branch_name = GetBranchName( $branchcode ); |
455 |
my $library = Koha::Libraries->find( $branchcode ); |
454 |
unless( $branch_name ) { |
456 |
unless( $library ) { |
455 |
push (@$missing_criticals, { key => 'branchcode', line => $line_number, lineraw => $borrowerline, |
457 |
push (@$missing_criticals, { key => 'branchcode', line => $line_number, lineraw => $borrowerline, |
456 |
value => $branchcode, branch_map => 1, }); |
458 |
value => $branchcode, branch_map => 1, }); |
457 |
} |
459 |
} |
Lines 475-481
sub check_borrower_category {
Link Here
|
475 |
} |
477 |
} |
476 |
|
478 |
|
477 |
# Looking for borrower category |
479 |
# Looking for borrower category |
478 |
my $category = GetBorrowercategory( $categorycode ); |
480 |
my $category = Koha::Patron::Categories->find($categorycode); |
479 |
unless( $category ) { |
481 |
unless( $category ) { |
480 |
push (@$missing_criticals, { key => 'categorycode', line => $line_number, lineraw => $borrowerline, |
482 |
push (@$missing_criticals, { key => 'categorycode', line => $line_number, lineraw => $borrowerline, |
481 |
value => $categorycode, category_map => 1, }); |
483 |
value => $categorycode, category_map => 1, }); |