X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=77822d7e0844857183ba004967b8714e81ec1378;hb=b16796957e3eefd03b4d6c7a35ce722ad794e3b7;hp=185d66ac772fb8879763cd8dcf4bdb40c8a1b857;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0;p=freeside.git diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 185d66ac7..77822d7e0 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -14,10 +14,12 @@ %my ($query) = $cgi->keywords; % %my $part_pkg = ''; +%my @agent_type = (); %if ( $cgi->param('error') ) { % $part_pkg = new FS::part_pkg ( { % map { $_, scalar($cgi->param($_)) } fields('part_pkg') % } ); +% (@agent_type) = $cgi->param('agent_type'); %} % %my $action = ''; @@ -30,6 +32,8 @@ % $part_pkg ||= $clone_part_pkg->clone; % $part_pkg->disabled('Y'); #isn't sticky on errors %} elsif ( $query && $query =~ /^(\d+)$/ ) { +% (@agent_type) = map {$_->typenum} qsearch('type_pkgs',{'pkgpart'=>$1}) +% unless $part_pkg; % $part_pkg ||= qsearchs('part_pkg',{'pkgpart'=>$1}); % $pkgpart = $part_pkg->pkgpart; %} else { @@ -117,25 +121,61 @@ Tax information {recurtax} eq 'Y' ? ' CHECKED' : '' %>> + % my $conf = new FS::Conf; % if ( $conf->exists('enable_taxclasses') ) { - Tax class <% include('/elements/select-taxclass.html', $hashref->{taxclass} ) %> -% } else { +% } else { <% include('/elements/select-taxclass.html', $hashref->{taxclass} ) %> + % } + +
+Line-item revenue recognition +<% ntable("#cccccc", 2) %> +% tie my %weight, 'Tie::IxHash', +% 'pay_weight' => 'Payment', +% 'credit_weight' => 'Credit' +% ; +% foreach my $weight (keys %weight) { + + <% $weight{$weight} %> weight + + {$weight} || 0 %>> + + +% } + + +%#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"', +%# ) +%# %> +%# +%# +%# % % @@ -225,12 +265,15 @@ Tax information % %tie my %options, 'Tie::IxHash', map { $_=>$plans{$_}->{'name'} } keys %plans; % -%my @form_select = ('classnum'); -%if ( $conf->exists('enable_taxclasses') ) { -% push @form_select, 'taxclass'; -%} else { -% push @fixups, 'taxclass'; #hidden -%} +%#my @form_select = ('classnum'); +%#if ( $conf->exists('enable_taxclasses') ) { +%# push @form_select, 'taxclass'; +%#} 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_radio = (); %if ( dbdef->table('pkg_svc')->column('primary_svc') ) { @@ -247,12 +290,13 @@ Tax information % 'options' => \%options, % 'form_name' => 'dummy', % 'form_action' => 'process/part_pkg.cgi', +% 'form_elements' => \@form_elements, % 'form_text' => [ qw(pkg comment promo_code clone pkgnum pkgpart), -% @fixups +% qw(pay_weight credit_weight), +% @fixups, % ], % 'form_checkbox' => [ qw(setuptax recurtax disabled) ], % 'form_radio' => \@form_radio, -% 'form_select' => \@form_select, % 'layer_callback' => sub { % my $layer = shift; % my $html = qq!!. @@ -286,7 +330,7 @@ Tax information % ( exists($plandata{$field}) % ? $plandata{$field} % : $href->{$field}{'default'} ). -% qq!" onChange="fchanged(this)">!; +% qq!" onChange="fchanged(this)">!; #after 1.7.2 % } elsif ( $href->{$field}{'type'} eq 'checkbox' ) { % $html .= qq!{$field}{'type'} eq 'select_multiple'; -% $html .= qq! NAME="$field" onChange="fchanged(this)">!; +% $html .= qq! NAME="$field" onChange="fchanged(this)">!; # after 1.7.2 % % if ( $href->{$field}{'select_table'} ) { % foreach my $record ( @@ -341,7 +385,7 @@ Tax information % % $html .= ''; +% '" onClick="fchanged(this)">'; #after 1.7.2 % % $html; %