|
Lines 13-25
use Koha::Script -cron;
Link Here
|
| 13 |
|
13 |
|
| 14 |
my ( $help, $verbose, @type, $before, $after, $file, $confirm ); |
14 |
my ( $help, $verbose, @type, $before, $after, $file, $confirm ); |
| 15 |
GetOptions( |
15 |
GetOptions( |
| 16 |
'h|help' => \$help, |
16 |
'h|help' => \$help, |
| 17 |
'v|verbose+' => \$verbose, |
17 |
'v|verbose+' => \$verbose, |
| 18 |
't|type:s' => \@type, |
18 |
't|type:s' => \@type, |
| 19 |
'ab|added_before:s' => \$before, |
19 |
'ab|added_before|added-before:s' => \$before, |
| 20 |
'aa|added_after:s' => \$after, |
20 |
'aa|added_after|added-after:s' => \$after, |
| 21 |
'f|file:s' => \$file, |
21 |
'f|file:s' => \$file, |
| 22 |
'c|confirm' => \$confirm, |
22 |
'c|confirm' => \$confirm, |
| 23 |
); |
23 |
); |
| 24 |
@type = split( /,/, join( ',', @type ) ); |
24 |
@type = split( /,/, join( ',', @type ) ); |
| 25 |
|
25 |
|
|
Lines 154-166
This is to prevent an accidental 'writeoff all' operation.
Link Here
|
| 154 |
|
154 |
|
| 155 |
Prints this help message |
155 |
Prints this help message |
| 156 |
|
156 |
|
| 157 |
=item B<--added_before> |
157 |
=item B<--added-before> |
| 158 |
|
158 |
|
| 159 |
Writeoff debts added before the date passed. |
159 |
Writeoff debts added before the date passed. |
| 160 |
|
160 |
|
| 161 |
Dates should be in ISO format, e.g., 2013-07-19, and can be generated |
161 |
Dates should be in ISO format, e.g., 2013-07-19, and can be generated |
| 162 |
with `date -d '-3 month' --iso-8601`. |
162 |
with `date -d '-3 month' --iso-8601`. |
| 163 |
|
163 |
|
|
|
164 |
=item B<--added-after> |
| 165 |
|
| 166 |
Writeoff debts added after the date passed. |
| 167 |
|
| 168 |
Dates should be in ISO format, e.g., 2013-07-19, and can be generated |
| 169 |
with `date -d '-3 month' --iso-8601`. |
| 170 |
|
| 164 |
=item B<--type> |
171 |
=item B<--type> |
| 165 |
|
172 |
|
| 166 |
Writeoff debts of the passed type. Accepts a list of CREDIT_TYPE_CODEs. |
173 |
Writeoff debts of the passed type. Accepts a list of CREDIT_TYPE_CODEs. |
| 167 |
- |
|
|