[freeside-commits] branch FREESIDE_3_BRANCH updated. 556e722992efcab0c7c52cd55b7b3a133bef250e
Ivan
ivan at 420.am
Tue Feb 2 15:12:43 PST 2016
The branch, FREESIDE_3_BRANCH has been updated
via 556e722992efcab0c7c52cd55b7b3a133bef250e (commit)
from c3fcc93441665b40e3b2bdc22653a8fe43372ea4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 556e722992efcab0c7c52cd55b7b3a133bef250e
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Feb 2 15:12:40 2016 -0800
add service replacement script, RT#40031
diff --git a/bin/svc.replace b/bin/svc.replace
new file mode 100644
index 0000000..1d2513a
--- /dev/null
+++ b/bin/svc.replace
@@ -0,0 +1,21 @@
+#!/usr/bin/perl -w
+
+use strict;
+use FS::UID qw( adminsuidsetup );
+use FS::Record qw( qsearch );
+use FS::cust_svc;
+
+my $user = shift or die &usage;
+adminsuidsetup;
+
+my $svcpart = shift or die &usage;
+
+foreach my $cust_svc ( qsearch('cust_svc', { 'svcpart'=>$svcpart } ) ) {
+ my $svc_x = $cust_svc->svc_x;
+ my $error = $svc_x->replace;
+ warn "$error\n" if $error
+}
+
+sub usage {
+ die "Usage\n\n svc.replace user svcpart\n";
+}
-----------------------------------------------------------------------
Summary of changes:
bin/svc.replace | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 bin/svc.replace
More information about the freeside-commits
mailing list