|
Lines 67-73
GetOptions(
Link Here
|
| 67 |
); |
67 |
); |
| 68 |
|
68 |
|
| 69 |
if ( $man ) { |
69 |
if ( $man ) { |
| 70 |
pod2usage( -verbose => 2 |
70 |
pod2usage( -verbose => 2 |
| 71 |
-exitval => 0 |
71 |
-exitval => 0 |
| 72 |
); |
72 |
); |
| 73 |
} |
73 |
} |
|
Lines 79-94
if ( $help ) {
Link Here
|
| 79 |
} |
79 |
} |
| 80 |
|
80 |
|
| 81 |
if ( scalar @$borrower_category && scalar @$skip_borrower_category) { |
81 |
if ( scalar @$borrower_category && scalar @$skip_borrower_category) { |
| 82 |
pod2usage( -verbose => 1, |
82 |
pod2usage( -verbose => 1, |
| 83 |
-message => "The options --category and --skip-category are muually exclusive.\n" |
83 |
-message => "The options --category and --skip-category are mually exclusive.\n" |
| 84 |
. "Use one or the other.", |
84 |
. "Use one or the other.", |
| 85 |
-exitval => 1 |
85 |
-exitval => 1 |
| 86 |
); |
86 |
); |
| 87 |
} |
87 |
} |
| 88 |
|
88 |
|
| 89 |
if ( $list_categories ) { |
89 |
if ( $list_categories ) { |
| 90 |
my @categories = sort map { uc $_->[0] } @{ C4::Context->dbh->selectall_arrayref(q|SELECT categorycode FROM categories|) }; |
90 |
my @categories = sort map { uc $_->[0] } @{ C4::Context->dbh->selectall_arrayref(q|SELECT categorycode FROM categories|) }; |
| 91 |
print "\nBorrowrer Categories: " . join( " ", @categories ) . "\n\n"; |
91 |
print "\nBorrowrer Categories: " . join( " ", @categories ) . "\n\n"; |
| 92 |
exit 0; |
92 |
exit 0; |
| 93 |
} |
93 |
} |
| 94 |
|
94 |
|
|
Lines 97-103
if ( $list_categories ) {
Link Here
|
| 97 |
longoverdue.pl [ --help | -h | --man | --list-categories ] |
97 |
longoverdue.pl [ --help | -h | --man | --list-categories ] |
| 98 |
longoverdue.pl --lost | -l DAYS=LOST_CODE [ --charge | -c CHARGE_CODE ] [ --verbose | -v ] [ --quiet ] |
98 |
longoverdue.pl --lost | -l DAYS=LOST_CODE [ --charge | -c CHARGE_CODE ] [ --verbose | -v ] [ --quiet ] |
| 99 |
[ --maxdays MAX_DAYS ] [ --mark-returned ] [ --category BORROWER_CATEGORY ] ... |
99 |
[ --maxdays MAX_DAYS ] [ --mark-returned ] [ --category BORROWER_CATEGORY ] ... |
| 100 |
[ --skip-category BORROWER_CATEGOERY ] ... |
100 |
[ --skip-category BORROWER_CATEGORY ] ... |
| 101 |
[ --commit ] |
101 |
[ --commit ] |
| 102 |
|
102 |
|
| 103 |
|
103 |
|
|
Lines 145-157
When an item is marked lost, remove it from the borrowers issued items.
Link Here
|
| 145 |
|
145 |
|
| 146 |
=item B<--category> |
146 |
=item B<--category> |
| 147 |
|
147 |
|
| 148 |
Act on the listed borrower category code (borrowers.categorycode). |
148 |
Act on the listed borrower category code (borrowers.categorycode). |
| 149 |
Exclude all others. This may be specified multiple times to include multiple categories. |
149 |
Exclude all others. This may be specified multiple times to include multiple categories. |
| 150 |
May not be used with B<--skip-category> |
150 |
May not be used with B<--skip-category> |
| 151 |
|
151 |
|
| 152 |
=item B<--skip-category> |
152 |
=item B<--skip-category> |
| 153 |
|
153 |
|
| 154 |
Act on all available borrower category codes, except those listed. |
154 |
Act on all available borrower category codes, except those listed. |
| 155 |
This may be specified multiple times, to exclude multiple categories. |
155 |
This may be specified multiple times, to exclude multiple categories. |
| 156 |
May not be used with B<--category> |
156 |
May not be used with B<--category> |
| 157 |
|
157 |
|
|
Lines 268-274
sub check_user_categories {
Link Here
|
| 268 |
pod2usage( '-verbose' => 1 |
268 |
pod2usage( '-verbose' => 1 |
| 269 |
, '-exitval' => 1 |
269 |
, '-exitval' => 1 |
| 270 |
, '-message' => $error |
270 |
, '-message' => $error |
| 271 |
); |
271 |
); |
| 272 |
} |
272 |
} |
| 273 |
} |
273 |
} |
| 274 |
|
274 |
|
| 275 |
- |
|
|