X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=883630f0afa93cdb24cb7a7f567376f863666379;hb=f4b93f8790be61c976cb3a9236753a65d97f661e;hp=f9818c4f931bf653d58823b7a7c49f63cca8098e;hpb=698797ff979b7c501eb171d14720b508d7201a3a;p=freeside.git diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index f9818c4f9..883630f0a 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -47,6 +47,7 @@ 'bill_dst_pkgpart' => 'Include line item(s) from package', 'svc_dst_pkgpart' => 'Include services of package', 'report_option' => 'Report classes', + 'fcc_ds0s' => 'Voice-grade eqivalents', }, 'fields' => [ @@ -159,6 +160,16 @@ { field=>'pay_weight', type=>'text', size=>6 }, { field=>'credit_weight', type=>'text', size=>6 }, + ( $conf->exists('cust_pkg-show_fcc_voice_grade_equivalent') + ? ( + { type => 'tablebreak-tr-title', + value => 'FCC Form 477 information', + }, + { field=>'fcc_ds0s', type=>'text', size=>6 }, + ) + : () + ), + { type => 'columnend' }, @@ -183,6 +194,10 @@ }, { 'field' => 'bill_dst_pkgpart', 'type' => 'select-part_pkg', + 'extra_sql' => sub { $pkgpart + ? "AND pkgpart != $pkgpart" + : '' + }, 'm2_label' => 'Include line item(s) from package', 'm2m_method' => 'bill_part_pkg_link', 'm2m_dstcol' => 'dst_pkgpart', @@ -205,6 +220,10 @@ { 'field' => 'svc_dst_pkgpart', 'label' => 'Also include services from package: ', 'type' => 'select-part_pkg', + 'extra_sql' => sub { $pkgpart + ? "AND pkgpart != $pkgpart" + : '' + }, 'm2_label' => 'Include services of package: ', 'm2m_method' => 'svc_part_pkg_link', 'm2m_dstcol' => 'dst_pkgpart', @@ -281,6 +300,8 @@ my @taxproductnums = ( qw( setup recur ), sort (keys %taxproductnums) ); my %options = (); my $recur_disabled = 1; +my $pkgpart = ''; + my $error_callback = sub { my($cgi, $object, $fields, $opt ) = @_; @@ -314,6 +335,8 @@ my $error_callback = sub { $object->set($_ => scalar($cgi->param($_)) ) foreach (qw( setup_fee recur_fee )); + $pkgpart = $object->pkgpart; + }; my $new_hashref_callback = sub { { 'plan' => 'flat' }; }; @@ -363,6 +386,8 @@ my $edit_callback = sub { $object->set($_ => $object->option($_)) foreach (qw( setup_fee recur_fee )); + $pkgpart = $object->pkgpart; + }; my $new_callback = sub { @@ -506,6 +531,12 @@ my $html_bottom = sub { : keys %{ $href }; foreach my $field ( grep $_ !~ /^(setup|recur)_fee$/, @fields ) { + + if(!exists($href->{$field})) { + # shouldn't happen + warn "nonexistent part_pkg option: '$field'\n"; + next; + } $html .= ''. $href->{$field}{'name'}. '';