X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=2837e47e7464d393a728a12c978a4fc15f0550f5;hb=a60b8251761d45c90fce93cc01a856c9330434f7;hp=410c81d4968672cd3a6b03daadb7dc8698cead55;hpb=5ca1a5271823c4e3ffbd2f53a0dff62692619d2b;p=freeside.git
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 410c81d49..2837e47e7 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -69,7 +69,6 @@ Tax information
-% my $conf = new FS::Conf;
% if ( $conf->exists('enable_taxclasses') ) {
@@ -106,10 +105,14 @@ Line-item revenue recognition
-% if ( $cgi->param('clone') || $conf->exists('agent_defaultpkg') ) {
+% if ( $cgi->param('clone') ) {
+% } elsif ( scalar(@all_agent_types) == 1) {
+
+
+
% } else {
Reseller information
@@ -369,8 +372,10 @@ if ( $cgi->param('pkgnum') && $cgi->param('pkgnum') =~ /^(\d+)$/ ) {
my ($query) = $cgi->keywords;
+my $conf = new FS::Conf;
my $part_pkg = '';
my @agent_type = ();
+my @all_agent_types = map {$_->typenum} qsearch('agent_type',{});
if ( $cgi->param('error') ) {
$part_pkg = new FS::part_pkg ( {
map { $_, scalar($cgi->param($_)) } fields('part_pkg')
@@ -397,6 +402,8 @@ if ( $cgi->param('clone') ) {
unless ( $part_pkg ) {
$part_pkg = new FS::part_pkg {};
$part_pkg->plan('flat');
+ @agent_type = @all_agent_types if $conf->exists('agent_defaultpkg');
+
}
}
unless ( $part_pkg->plan ) { #backwards-compat
|