Lines 75-81
overdue_notices.pl
Link Here
|
75 |
-list-all list all overdues |
75 |
-list-all list all overdues |
76 |
-date <yyyy-mm-dd> emulate overdues run for this date |
76 |
-date <yyyy-mm-dd> emulate overdues run for this date |
77 |
-email <email_type> type of email that will be used. Can be 'email', 'emailpro' or 'B_email'. Repeatable. |
77 |
-email <email_type> type of email that will be used. Can be 'email', 'emailpro' or 'B_email'. Repeatable. |
78 |
--owning Send notices from item homebranch library instead of issuing library |
78 |
--frombranch Set the from address for the notice to one of 'item-homebranch' or 'item-issuebranch'. |
79 |
|
79 |
|
80 |
=head1 OPTIONS |
80 |
=head1 OPTIONS |
81 |
|
81 |
|
Lines 184-193
use it in order to send overdues on a specific date and not Now. Format: YYYY-MM
Link Here
|
184 |
|
184 |
|
185 |
Allows to specify which type of email will be used. Can be email, emailpro or B_email. Repeatable. |
185 |
Allows to specify which type of email will be used. Can be email, emailpro or B_email. Repeatable. |
186 |
|
186 |
|
187 |
=item B<--owning> |
187 |
=item B<--frombranch> |
188 |
|
188 |
|
189 |
Use the address information from the item homebranch library instead of the issuing library. |
189 |
Use the address information from the item homebranch library instead of the issuing library. |
190 |
|
190 |
|
|
|
191 |
Defaults to 'item-issuebranch' |
192 |
|
191 |
=back |
193 |
=back |
192 |
|
194 |
|
193 |
=head1 DESCRIPTION |
195 |
=head1 DESCRIPTION |
Lines 297-303
my $verbose = 0;
Link Here
|
297 |
my $nomail = 0; |
299 |
my $nomail = 0; |
298 |
my $MAX = 90; |
300 |
my $MAX = 90; |
299 |
my $test_mode = 0; |
301 |
my $test_mode = 0; |
300 |
my $owning_library = 0; |
302 |
my $frombranch = 'item-issuebranch'; |
301 |
my @branchcodes; # Branch(es) passed as parameter |
303 |
my @branchcodes; # Branch(es) passed as parameter |
302 |
my @emails_to_use; # Emails to use for messaging |
304 |
my @emails_to_use; # Emails to use for messaging |
303 |
my @emails; # Emails given in command-line parameters |
305 |
my @emails; # Emails given in command-line parameters |
Lines 329-335
GetOptions(
Link Here
|
329 |
'borcat=s' => \@myborcat, |
331 |
'borcat=s' => \@myborcat, |
330 |
'borcatout=s' => \@myborcatout, |
332 |
'borcatout=s' => \@myborcatout, |
331 |
'email=s' => \@emails, |
333 |
'email=s' => \@emails, |
332 |
'owning' => \$owning_library, |
334 |
'frombranch=s' => \$frombranch, |
333 |
) or pod2usage(2); |
335 |
) or pod2usage(2); |
334 |
pod2usage(1) if $help; |
336 |
pod2usage(1) if $help; |
335 |
pod2usage( -verbose => 2 ) if $man; |
337 |
pod2usage( -verbose => 2 ) if $man; |
Lines 339-344
if ( defined $csvfilename && $csvfilename =~ /^-/ ) {
Link Here
|
339 |
warn qq(using "$csvfilename" as filename, that seems odd); |
341 |
warn qq(using "$csvfilename" as filename, that seems odd); |
340 |
} |
342 |
} |
341 |
|
343 |
|
|
|
344 |
die "--frombranch takes item-homebranch or item-issuebranch only" |
345 |
unless ( $frombranch eq 'item-issuebranch' |
346 |
|| $frombranch eq 'item-homebranch' ); |
347 |
my $owning_library = ( $frombranch eq 'item-homebranch' ) ? 1 : 0; |
348 |
|
342 |
my @overduebranches = C4::Overdues::GetBranchcodesWithOverdueRules(); # Branches with overdue rules |
349 |
my @overduebranches = C4::Overdues::GetBranchcodesWithOverdueRules(); # Branches with overdue rules |
343 |
my @branches; # Branches passed as parameter with overdue rules |
350 |
my @branches; # Branches passed as parameter with overdue rules |
344 |
my $branchcount = scalar(@overduebranches); |
351 |
my $branchcount = scalar(@overduebranches); |
345 |
- |
|
|