4 use vars qw($opt_p $opt_s $opt_r);
6 use FS::UID qw(adminsuidsetup);
7 use FS::Record qw(qsearch qsearchs);
13 my $user = shift or die &usage;
17 if ($opt_p && $opt_s);
19 $FS::Record::nowarn_identical = 1;
20 $FS::svc_Common::noexport_hack = 1
25 $opt_s =~ /^(\d+)$/ or die "invalid svcnum";
26 my $cust_svc = qsearchs('cust_svc', { svcnum => $1 } )
27 or die "svcnum $opt_s not found\n";
28 push @svc_x, $cust_svc->svc_x;
30 $opt_p =~ /^(\d+)$/ or die "invalid svcpart";
31 push @svc_x, map { $_->svc_x } qsearch('cust_svc', { svcpart => $1 } );
32 die "no services with svcpart $opt_p found\n" unless @svc_x;
34 push @svc_x, map { $_->svc_x } qsearch('cust_svc', {} );
35 die "no services found\n" unless @svc_x;
38 foreach my $svc_x ( @svc_x ) {
39 my $result = $svc_x->setfixed;
40 die $result unless ref($result);
41 my $error = $svc_x->replace
48 die "Usage:\n\n freeside-reset-fixed user [ -s svcnum | -p svcpart ] [ -r ]\n";
53 freeside-reset-fixed - Command line tool to set the fixed columns for existing services
57 freeside-reset-fixed user [ -s svcnum | -p svcpart ] [ -r ]
61 Resets the fixed columns for the specified service part or service number.
62 Re-exports the service if -r is specified.
66 L<freeside-reexport>, L<FS::part_svc>