X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=7c6115423bbd512f6eb5c97dd96d982ff6e870dc;hb=d6dbf288fd8ea42ebd5171d80817356248cf22ce;hp=f970508da662de6fe20d03823e498473e4e54e9b;hpb=05686487551e26418c9b2d6b92ea0d89bb100082;p=freeside.git
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index f970508da..7c6115423 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 {
@@ -85,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 |
@@ -153,8 +160,36 @@ Line-item revenue recognition
% }
+ |
+
+% 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. | ';
@@ -248,7 +283,7 @@ Line-item revenue recognition
%#} else {
%# push @fixups, 'taxclass'; #hidden
%#}
-%my @form_elements = ( 'classnum', 'taxclass' );
+%my @form_elements = ( 'classnum', 'taxclass', 'agent_type' );
%
%my @form_radio = ();
%if ( dbdef->table('pkg_svc')->column('primary_svc') ) {
@@ -300,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!!;
+% qq!">!;
% } elsif ( $href->{$field}{'type'} eq 'checkbox' ) {
% $html .= qq!{$field}{'type'} eq 'select_multiple';
-% $html .= qq! NAME="$field" onChange="fchanged(this)">!;
+% $html .= qq! NAME="$field">!;
%
% if ( $href->{$field}{'select_table'} ) {
% foreach my $record (
@@ -360,7 +397,7 @@ Line-item revenue recognition
%
% $html .= '';
+% '">';
%
% $html;
%
|