RT# 82988 - Fixed so only formats that can handle electronic refunds can download...
[freeside.git] / bin / cust_pkg-remove_setup
1 #!/usr/bin/perl
2
3 use strict;
4 use FS::UID qw( adminsuidsetup );
5 use FS::Record qw( qsearchs );
6 use FS::cust_pkg;
7
8 my $user = shift or &usage;
9 adminsuidsetup $user;
10
11 my $pkgnum = shift or &usage;
12
13 my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $pkgnum } )
14   or die "unknown pkgnum $pkgnum\n";
15
16 $cust_pkg->setup('');
17 my $error = $cust_pkg->replace;
18
19 die $error if $error;
20
21 sub usage {
22   die "usage: cust_pkg-remove_setup employee_username pkgnum\n";
23 }
24
25 1;
26