[freeside-commits] branch master updated. 725b65c280dd45a78d60e0a7fe1c445c658e2b14

Ivan ivan at 420.am
Tue Feb 2 15:12:38 PST 2016


The branch, master has been updated
       via  725b65c280dd45a78d60e0a7fe1c445c658e2b14 (commit)
      from  3eef5f9cd9dca000cabb601d62c2dff2728a9274 (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 725b65c280dd45a78d60e0a7fe1c445c658e2b14
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Feb 2 15:12:35 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