1 package FS::Report::FCC_477;
4 use vars qw( @ISA @upload @download @technology @part2aoption @part2boption );
6 use FS::Record qw( dbh );
8 @ISA = qw( FS::Report );
12 FS::Report::FCC_477 - Routines for FCC Form 477 reports
54 'Terrestrial Fixed Wireless',
55 'Terrestrial Mobile Wireless',
56 'Electric Power Line',
63 'unswitched UNE loops',
80 sub restore_fcc477map {
82 FS::Record::scalar_sql('',"select formvalue from fcc477map where formkey = ?",$key);
89 # lame, particularly lack of transactions
91 my $sql = "delete from fcc477map where formkey = ?";
92 my $sth = dbh->prepare($sql) or die dbh->errstr;
93 $sth->execute($key) or die "Error removing FCC 477 form defaults: " . $sth->errstr;
95 $sql = "insert into fcc477map (formkey,formvalue) values (?,?)";
96 $sth = dbh->prepare($sql) or die dbh->errstr;
97 $sth->execute($key,$value) or die "Error setting FCC 477 form defaults: " . $sth->errstr;
102 sub parse_technology_option {
107 for (my $i = 0; $i < scalar(@technology); $i++) {
108 my $value = $cgi->param("part1_technology_option_$i"); #lame
109 save_fcc477map("part1_technology_option_$i",$value)
110 if $save && $value =~ /^\d+$/;
111 push @result, $value =~ /^\d+$/ ? $value : 0;