From a940c3bf8468cca2b8910516b4bee8d7390e7f78 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 23 Jul 2013 21:14:54 -0700 Subject: script to restore removed setup dates, RT#24130 --- bin/cust_pkg-remove_setup | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 bin/cust_pkg-remove_setup (limited to 'bin/cust_pkg-remove_setup') diff --git a/bin/cust_pkg-remove_setup b/bin/cust_pkg-remove_setup new file mode 100755 index 000000000..58dc6b9b6 --- /dev/null +++ b/bin/cust_pkg-remove_setup @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +use strict; +use FS::UID qw( adminsuidsetup ); +use FS::Record qw( qsearchs ); +use FS::cust_pkg; + +my $user = shift or &usage; +adminsuidsetup $user; + +my $pkgnum = shift or &usage; + +my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $pkgnum } ) + or die "unknown pkgnum $pkgnum\n"; + +$cust_pkg->setup(''); +my $error = $cust_pkg->replace; + +die $error if $error; + +sub usage { + die "usage: cust_pkg-remove_setup employee_username pkgnum\n"; +} + +1; + -- cgit v1.2.1