From 8f7d565df51ac65d7b20b489a416355442fb141b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 15 Nov 2021 09:35:04 +0000 Subject: [PATCH] Bug 28995: Update aliases Add an alias for added-before, added-after (Using an alias makes it backwards compatible) and update the POD. Signed-off-by: Caroline Cyr La Rose Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- misc/cronjobs/writeoff_debts.pl | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/misc/cronjobs/writeoff_debts.pl b/misc/cronjobs/writeoff_debts.pl index 85c2dd465f..1fc7ce18e3 100755 --- a/misc/cronjobs/writeoff_debts.pl +++ b/misc/cronjobs/writeoff_debts.pl @@ -13,13 +13,13 @@ use Koha::Script -cron; my ( $help, $verbose, @type, $before, $after, $file, $confirm ); GetOptions( - 'h|help' => \$help, - 'v|verbose+' => \$verbose, - 't|type:s' => \@type, - 'ab|added_before:s' => \$before, - 'aa|added_after:s' => \$after, - 'f|file:s' => \$file, - 'c|confirm' => \$confirm, + 'h|help' => \$help, + 'v|verbose+' => \$verbose, + 't|type:s' => \@type, + 'ab|added_before|added-before:s' => \$before, + 'aa|added_after|added-after:s' => \$after, + 'f|file:s' => \$file, + 'c|confirm' => \$confirm, ); @type = split( /,/, join( ',', @type ) ); @@ -154,13 +154,20 @@ This is to prevent an accidental 'writeoff all' operation. Prints this help message -=item B<--added_before> +=item B<--added-before> Writeoff debts added before the date passed. Dates should be in ISO format, e.g., 2013-07-19, and can be generated with `date -d '-3 month' --iso-8601`. +=item B<--added-after> + +Writeoff debts added after the date passed. + +Dates should be in ISO format, e.g., 2013-07-19, and can be generated +with `date -d '-3 month' --iso-8601`. + =item B<--type> Writeoff debts of the passed type. Accepts a list of CREDIT_TYPE_CODEs. -- 2.39.5