|
Lines 42-47
use Getopt::Long;
Link Here
|
| 42 |
use C4::Log; |
42 |
use C4::Log; |
| 43 |
use Pod::Usage; |
43 |
use Pod::Usage; |
| 44 |
use Koha::Patrons; |
44 |
use Koha::Patrons; |
|
|
45 |
use Koha::Patron::Categories; |
| 46 |
use Koha::ItemTypes; |
| 45 |
|
47 |
|
| 46 |
my $lost; # key=lost value, value=num days. |
48 |
my $lost; # key=lost value, value=num days. |
| 47 |
my ($charge, $verbose, $confirm, $quiet); |
49 |
my ($charge, $verbose, $confirm, $quiet); |
|
Lines 103-115
if ( scalar @$itemtype && scalar @$skip_itemtype) {
Link Here
|
| 103 |
} |
105 |
} |
| 104 |
|
106 |
|
| 105 |
if ( $list_categories ) { |
107 |
if ( $list_categories ) { |
| 106 |
my @categories = sort map { uc $_->[0] } @{ C4::Context->dbh->selectall_arrayref(q|SELECT categorycode FROM categories|) }; |
108 |
|
|
|
109 |
my @categories = Koha::Patron::Categories->search()->get_column('categorycode'); |
| 107 |
print "\nBorrower Categories: " . join( " ", @categories ) . "\n\n"; |
110 |
print "\nBorrower Categories: " . join( " ", @categories ) . "\n\n"; |
| 108 |
exit 0; |
111 |
exit 0; |
| 109 |
} |
112 |
} |
| 110 |
|
113 |
|
| 111 |
if ( $list_itemtypes ) { |
114 |
if ( $list_itemtypes ) { |
| 112 |
my @itemtypes = sort map { uc $_->[0] } @{ C4::Context->dbh->selectall_arrayref(q|SELECT itemtype FROM itemtypes|) }; |
115 |
my @itemtypes = Koha::ItemTypes->search()->get_column('itemtype'); |
| 113 |
print "\nItemtypes: " . join( " ", @itemtypes ) . "\n\n"; |
116 |
print "\nItemtypes: " . join( " ", @itemtypes ) . "\n\n"; |
| 114 |
exit 0; |
117 |
exit 0; |
| 115 |
} |
118 |
} |
|
Lines 293-299
sub longoverdue_sth {
Link Here
|
| 293 |
|
296 |
|
| 294 |
my $dbh = C4::Context->dbh; |
297 |
my $dbh = C4::Context->dbh; |
| 295 |
|
298 |
|
| 296 |
my @available_categories = map { uc $_->[0] } @{ $dbh->selectall_arrayref(q|SELECT categorycode FROM categories|) }; |
299 |
my @available_categories = Koha::Patron::Categories->search()->get_column('categorycode'); |
| 297 |
$borrower_category = [ map { uc $_ } @$borrower_category ]; |
300 |
$borrower_category = [ map { uc $_ } @$borrower_category ]; |
| 298 |
$skip_borrower_category = [ map { uc $_} @$skip_borrower_category ]; |
301 |
$skip_borrower_category = [ map { uc $_} @$skip_borrower_category ]; |
| 299 |
my %category_to_process; |
302 |
my %category_to_process; |
|
Lines 321-327
if ( @$skip_borrower_category ) {
Link Here
|
| 321 |
|
324 |
|
| 322 |
my $filter_borrower_categories = ( scalar @$borrower_category || scalar @$skip_borrower_category ); |
325 |
my $filter_borrower_categories = ( scalar @$borrower_category || scalar @$skip_borrower_category ); |
| 323 |
|
326 |
|
| 324 |
my @available_itemtypes = map { uc $_->[0] } @{ $dbh->selectall_arrayref(q|SELECT itemtype FROM itemtypes|) }; |
327 |
my @available_itemtypes = Koha::ItemTypes->search()->get_column('itemtype'); |
| 325 |
$itemtype = [ map { uc $_ } @$itemtype ]; |
328 |
$itemtype = [ map { uc $_ } @$itemtype ]; |
| 326 |
$skip_itemtype = [ map { uc $_} @$skip_itemtype ]; |
329 |
$skip_itemtype = [ map { uc $_} @$skip_itemtype ]; |
| 327 |
my %itemtype_to_process; |
330 |
my %itemtype_to_process; |
| 328 |
- |
|
|