X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=7c6115423bbd512f6eb5c97dd96d982ff6e870dc;hb=d6dbf288fd8ea42ebd5171d80817356248cf22ce;hp=83ca2cafda13ef221fa966a3c066ae5e1488e986;hpb=5f5d2124d615efbcdbb34eea691f2ca8724b3e47;p=freeside.git diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 83ca2cafd..7c6115423 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -89,7 +89,10 @@ Package information - <% include( '/elements/tr-select-pkg_class.html', $part_pkg->classnum ) %> + <% include( '/elements/tr-select-pkg_class.html', + 'curr_value' => $part_pkg->classnum, + ) + %> Promotional code @@ -159,25 +162,34 @@ Line-item revenue recognition -%#Reseller information # after 1.7.2 -%#<% ntable("#cccccc", 2) %> -%# -%# <% 'Agent Types' %> -%# -%# <% include( '/elements/select-table.html', -%# 'element_name' => 'agent_type', -%# 'table' => 'agent_type', -%# 'name_col' => 'atype', -%# 'value' => \@agent_type, -%# 'empty_label' => '(none)', -%# 'element_etc' => 'multiple size="10"', -%# ) -%# %> -%# -%# -%# +% if ( $cgi->param('clone') || $conf->exists('agent_defaultpkg') ) { + + + +% } else { + + Reseller information + <% ntable("#cccccc", 2) %> + + <% 'Agent Types' %> + + <% include( '/elements/select-table.html', + 'element_name' => 'agent_type', + 'table' => 'agent_type', + 'name_col' => 'atype', + 'value' => \@agent_type, + 'empty_label' => 'select agent types', + 'element_etc' => 'multiple size="10"', + ) + %> + + + + +% } + -% + % %my $thead = "\n\n". ntable('#cccccc', 2). % 'Quan.'; @@ -271,9 +283,7 @@ Line-item revenue recognition %#} else { %# push @fixups, 'taxclass'; #hidden %#} -%my @form_elements = ( 'classnum', 'taxclass' ); -%# copying non-existant elements is probably harmless, but after 1.7.2 -%#my @form_elements = ( 'classnum', 'taxclass', 'agent_type' ); +%my @form_elements = ( 'classnum', 'taxclass', 'agent_type' ); % %my @form_radio = (); %if ( dbdef->table('pkg_svc')->column('primary_svc') ) { @@ -292,7 +302,7 @@ Line-item revenue recognition % 'form_action' => 'process/part_pkg.cgi', % 'form_elements' => \@form_elements, % 'form_text' => [ qw(pkg comment promo_code clone pkgnum pkgpart), -% qw(pay_weight credit_weight), +% qw(pay_weight credit_weight), #keys(%weight), % @fixups, % ], % 'form_checkbox' => [ qw(setuptax recurtax disabled) ], @@ -325,12 +335,14 @@ Line-item revenue recognition % % $html .= ''. $href->{$field}{'name'}. ''; % +% my $format = sub { shift }; +% $format = $href->{$field}{'format'} if exists($href->{$field}{'format'}); % if ( ! exists($href->{$field}{'type'}) ) { % $html .= qq!!; #after 1.7.2 +% qq!">!; % } elsif ( $href->{$field}{'type'} eq 'checkbox' ) { % $html .= qq!{$field}{'type'} eq 'select_multiple'; -% $html .= qq! NAME="$field" onChange="fchanged(this)">!; # after 1.7.2 +% $html .= qq! NAME="$field">!; % % if ( $href->{$field}{'select_table'} ) { % foreach my $record ( @@ -364,7 +376,7 @@ Line-item revenue recognition % ? ' SELECTED' % : '' % ). -% '">'. $value; +% '>'. $value; % } % % } else { @@ -385,7 +397,7 @@ Line-item revenue recognition % % $html .= ''; #after 1.7.2 +% '">'; % % $html; %