[freeside-commits] branch master updated. 71df2acf44b4f4c87b52195465f6403e4c7419d2

Ivan ivan at 420.am
Tue Jan 17 08:57:55 PST 2017


The branch, master has been updated
       via  71df2acf44b4f4c87b52195465f6403e4c7419d2 (commit)
      from  8472a13849d11fb45721a4136df2cdc9f6514f5e (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 71df2acf44b4f4c87b52195465f6403e4c7419d2
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Jan 17 08:57:54 2017 -0800

    script to reset svc_broadband coordinates, RT#74147

diff --git a/bin/svc_broadband.reset_coords b/bin/svc_broadband.reset_coords
new file mode 100755
index 0000000..23b41fd
--- /dev/null
+++ b/bin/svc_broadband.reset_coords
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+
+use strict;
+use Text::CSV_XS;
+use FS::UID qw( adminsuidsetup );
+use FS::Record qw( qsearch );
+use FS::svc_broadband;
+
+my $user = shift or die &usage;
+adminsuidsetup $user;
+
+foreach my $svc_broadband (
+  qsearch({
+    'table'     => 'svc_broadband',
+    'hashref'   => {},
+    #'extra_sql' => 'WHERE latitude IS NOT NULL OR longitude IS NOT NULL',
+  })
+) {
+  $svc_broadband->latitude('');
+  $svc_broadband->longitude('');
+  my $error = $svc_broadband->replace;
+  die $error if $error;
+}
+
+sub usage {
+  "Usage:
+  svc_broadband.reset_coords user
+";
+}
+
+1;

-----------------------------------------------------------------------

Summary of changes:
 bin/svc_broadband.reset_coords |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100755 bin/svc_broadband.reset_coords




More information about the freeside-commits mailing list