RT# 78356 - added speed test fields for broadband service and new modifier to get...
[freeside.git] / httemplate / edit / elements / svc_Common.html
index 97b630f..e1c3090 100644 (file)
                    my $columndef = $part_svc->part_svc_column($f->{'field'});
                    my $flag = $columndef->columnflag;
 
+                   $f->{'required'} = 1
+                     if $columndef->required;
+
                    if ( $flag eq 'F' ) { #fixed
                      $f->{'value'} = $columndef->columnvalue;
                      if (length($columndef->columnvalue)) {
                                      ];
                    } # shouldn't this be enforced for all 'S' fields?
 
+                   elsif ( $flag eq 'P' ) { #form fcc_477 values
+                     $f->{type}    = 'fixed';
+                     my $cust_pkg = FS::Record::qsearchs({
+                       'table'   => 'cust_pkg',
+                       'hashref' => { 'pkgnum' => $object->{Hash}->{pkgnum} }
+                     });
+                     my $fcc_record = $cust_pkg->fcc_477_record('broadband_'.$columndef->columnvalue.'stream') if $cust_pkg;
+                     $f->{'value'} = $fcc_record->{Hash}->{optionvalue} ? $fcc_record->{Hash}->{optionvalue} * 1000 : '';
+                   } # end 477 values
+
                    if ( $f->{'type'} =~ /^select-svc/ )
                    {
                      $f->{'include_opt_callback'} =