diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-08-16 20:14:03 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-08-16 22:32:11 -0400 |
commit | 2fc8238ca5301e2ed686447f4efea0e55cd69567 (patch) | |
tree | 0d604ed28d7b64e0206020793a6cd4673629efa8 /bin | |
parent | 7b8350fe734d659d61c870128e98161ce4ba4449 (diff) |
RT# 78356 - updated script to allow for null values when moving.
Diffstat (limited to 'bin')
-rwxr-xr-x[-rw-r--r--] | bin/move_svc_broadband_speeds.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/move_svc_broadband_speeds.pl b/bin/move_svc_broadband_speeds.pl index 8a9af99f2..7d20ef68a 100644..100755 --- a/bin/move_svc_broadband_speeds.pl +++ b/bin/move_svc_broadband_speeds.pl @@ -16,10 +16,10 @@ foreach my $rec (qsearch({ 'table' => 'svc_broadband', 'addl_from' => 'LEFT JOIN cust_svc USING ( svcnum ) LEFT JOIN cust_pkg USING ( pkgnum )', })) { - $rec->{Hash}->{speed_test_up} = $rec->{Hash}->{speed_up}; - $rec->{Hash}->{speed_test_down} = $rec->{Hash}->{speed_down}; - $rec->{Hash}->{speed_up} = $rec->{Hash}->{fcc477_upstream} * 1000; - $rec->{Hash}->{speed_down} = $rec->{Hash}->{fcc477_downstream} * 1000; + $rec->{Hash}->{speed_test_up} = $rec->{Hash}->{speed_up} ? $rec->{Hash}->{speed_up} : "null"; + $rec->{Hash}->{speed_test_down} = $rec->{Hash}->{speed_down} ? $rec->{Hash}->{speed_down} : "null"; + $rec->{Hash}->{speed_up} = $rec->{Hash}->{fcc477_upstream} ? $rec->{Hash}->{fcc477_upstream} * 1000 : "null"; + $rec->{Hash}->{speed_down} = $rec->{Hash}->{fcc477_downstream} ? $rec->{Hash}->{fcc477_downstream} * 1000 : "null"; my $sql = "UPDATE svc_broadband set speed_up = $rec->{Hash}->{speed_up}, |