View | Details | Raw Unified | Return to bug 35001
Collapse All | Expand All

(-)a/misc/cronjobs/membership_expiry.pl (-6 / +31 lines)
Lines 95-105 Optional parameter to use another renewal notice than the default: MEMBERSHIP_RE Link Here
95
=item B<-active>
95
=item B<-active>
96
96
97
Optional parameter to include active patrons only (active within passed number of months).
97
Optional parameter to include active patrons only (active within passed number of months).
98
This parameter needs the preference TrackLastPatronActivityTriggers.
99
100
IMPORTANT: You should be using those triggers already for the period that you
101
consider a user to be (in)active.
98
102
99
=item B<-inactive>
103
=item B<-inactive>
100
104
101
Optional parameter to include inactive patrons only (inactive within passed number of months).
105
Optional parameter to include inactive patrons only (inactive within passed number of months).
102
This allows you to e.g. send expiry warnings only to inactive patrons.
106
This allows you to e.g. send expiry warnings only to inactive patrons.
107
This parameter needs the preference TrackLastPatronActivityTriggers.
108
109
IMPORTANT: You should be using those triggers already for the period that you
110
consider a user to be (in)active.
103
111
104
=item B<-renew>
112
=item B<-renew>
105
113
Lines 194-204 $letter_renew = 'MEMBERSHIP_RENEWED' if !$letter_renew; Link Here
194
pod2usage( -verbose => 2 ) if $man;
202
pod2usage( -verbose => 2 ) if $man;
195
pod2usage(1) if $help || !$confirm;
203
pod2usage(1) if $help || !$confirm;
196
204
197
pod2usage(
205
# Check active/inactive. Note that passing no value or zero is a no-op.
198
    -verbose => 1,
206
if ( !C4::Context->preference('TrackLastPatronActivityTriggers')
199
    -msg     => q{The --active and --inactive flags are mutually exclusive},
207
    && ( $active || $inactive ) )
200
    -exitval => 1
208
{
201
) if defined $active && defined $inactive;
209
    pod2usage(
210
        -verbose => 1,
211
        -msg     =>
212
            q{Exiting membership_expiry.pl: Using --active or --inactive needs use of TrackLastPatronActivityTriggers over specified period},
213
        -exitval => 1
214
    );
215
} elsif ( $active && $inactive ) {
216
    pod2usage(
217
        -verbose => 1,
218
        -msg     => q{The --active and --inactive flags are mutually exclusive},
219
        -exitval => 1
220
    );
221
} elsif ( ( defined $active && !$active ) || ( defined $inactive && !$inactive ) ) {
222
    pod2usage(
223
        -verbose => 1,
224
        -msg     => q{Options --active and --inactive need a number of months},
225
        -exitval => 1
226
    );
227
}
202
228
203
cronlogaction({ info => $command_line_options });
229
cronlogaction({ info => $command_line_options });
204
230
205
- 

Return to bug 35001