diff options
author | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2010-12-27 00:04:45 +0000 |
commit | c82d349f864e6bd9f96fd1156903bc1f7193a203 (patch) | |
tree | e117a87533656110b6acd56fc0ca64289892a9f5 /FS/bin/freeside-reset-fixed | |
parent | 74e058c8a010ef6feb539248a550d0bb169c1e94 (diff) |
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'FS/bin/freeside-reset-fixed')
-rwxr-xr-x | FS/bin/freeside-reset-fixed | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/FS/bin/freeside-reset-fixed b/FS/bin/freeside-reset-fixed deleted file mode 100755 index 5829d441b..000000000 --- a/FS/bin/freeside-reset-fixed +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use vars qw($opt_p $opt_s $opt_r); -use Getopt::Std; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::cust_svc; -use FS::svc_Common; - -getopts('p:s:r'); - -my $user = shift or die &usage; -adminsuidsetup $user; - -die &usage - if ($opt_p && $opt_s); - -$FS::Record::nowarn_identical = 1; -$FS::svc_Common::noexport_hack = 1 - unless $opt_r; - -my @svc_x = (); -if ( $opt_s ) { - $opt_s =~ /^(\d+)$/ or die "invalid svcnum"; - my $cust_svc = qsearchs('cust_svc', { svcnum => $1 } ) - or die "svcnum $opt_s not found\n"; - push @svc_x, $cust_svc->svc_x; -} elsif ( $opt_p ) { - $opt_p =~ /^(\d+)$/ or die "invalid svcpart"; - push @svc_x, map { $_->svc_x } qsearch('cust_svc', { svcpart => $1 } ); - die "no services with svcpart $opt_p found\n" unless @svc_x; -} else { - push @svc_x, map { $_->svc_x } qsearch('cust_svc', {} ); - die "no services found\n" unless @svc_x; -} - -foreach my $svc_x ( @svc_x ) { - my $result = $svc_x->setfixed; - die $result unless ref($result); - my $error = $svc_x->replace - if $svc_x->modified; - die $error if $error; -} - - -sub usage { - die "Usage:\n\n freeside-reset-fixed user [ -s svcnum | -p svcpart ] [ -r ]\n"; -} - -=head1 NAME - -freeside-reset-fixed - Command line tool to set the fixed columns for existing services - -=head1 SYNOPSIS - - freeside-reset-fixed user [ -s svcnum | -p svcpart ] [ -r ] - -=head1 DESCRIPTION - - Resets the fixed columns for the specified service part or service number. - Re-exports the service if -r is specified. - -=head1 SEE ALSO - -L<freeside-reexport>, L<FS::part_svc> - -=cut - |