-my ( $search, $condition, $action, $search_arg, $condition_arg, $action_arg,
- $template_id, $transaction, $transaction_type, $help, $verbose );
-GetOptions( "search=s" => \$search,
- "search-arg=s" => \$search_arg,
- "condition=s" => \$condition,
- "condition-arg=s" => \$condition_arg,
- "action-arg=s" => \$action_arg,
- "action=s" => \$action,
- "template-id=s" => \$template_id,
- "transaction=s" => \$transaction,
- "transaction-type=s" => \$transaction_type,
- "help" => \$help,
- "verbose|v" => \$verbose );
-
-help() if $help or not $search or not $action;
-
-$transaction ||= 'first';
-unless ( $transaction =~ /^(first|last)$/i ) {
- print STDERR loc("--transaction argument could be only 'first' or 'last'");
+help() unless $search && $action;
+
+$transaction = lc( $transaction||'' );
+if ( $transaction && $transaction !~ /^(first|all|last)$/i ) {
+ print STDERR loc("--transaction argument could be only 'first', 'last' or 'all'");
+ exit 1;
+}
+
+if ( $template && $template_id ) {
+ print STDERR loc("--template-id is deprecated argument and can not be used with --template");