summaryrefslogtreecommitdiff
path: root/bin/svc_broadband.reset_coords
blob: 23b41fd99141239c3bf388a19ceb03ec4394423d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;