#!/usr/bin/perl
use strict;
-use vars qw( $opt_a $opt_p $opt_t $opt_k );
+use vars qw( $opt_a $opt_p $opt_t $opt_k $opt_c );
use Getopt::Std;
use FS::UID qw(adminsuidsetup);
use FS::Record qw(qsearch qsearchs);
use FS::cust_tag;
use FS::cust_pkg;
-getopts('a:p:t:k:');
+getopts('a:p:t:k:c:');
my $user = shift or &usage;
adminsuidsetup $user;
}
}
+ if ( $opt_c ) {
+ my @error = $cust_main->cancel( 'reason' => $opt_c );
+ die join(' / ', @error). "\n" if @error;
+ }
+
}
sub usage {
=head1 SYNOPSIS
- cust_main-bulk_change [ -a agentnum ] [ -p NEW_PAYBY ] [ -t tagnum ] [ -k old_pkgpart:new_pkgpart,... ] username <custnums.txt
+ cust_main-bulk_change [ -a agentnum ] [ -p NEW_PAYBY ] [ -t tagnum ] [ -k old_pkgpart:new_pkgpart,... ] [ -c reasonnum ] username <custnums.txt
=head1 DESCRIPTION
-k: old_pkgpart:new_pkgpart, for example, I<5:4>. Multiple entries can be comma-separated.
+-c: Cancel customer
+
user: Employee username
=head1 BUGS