[freeside-commits] branch FREESIDE_3_BRANCH updated. 4eb3eff789fa9535a1e2d37d52bfeaf9e5a7e5ca

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


The branch, FREESIDE_3_BRANCH has been updated
       via  4eb3eff789fa9535a1e2d37d52bfeaf9e5a7e5ca (commit)
      from  c2c5b730277cdedaef48c301e1eb0f99158b92db (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 4eb3eff789fa9535a1e2d37d52bfeaf9e5a7e5ca
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Jan 17 08:57:58 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