From: ivan Date: Sun, 6 Dec 2009 23:44:54 +0000 (+0000) Subject: fix initial value of agent types when cloning X-Git-Tag: root_of_svc_elec_features~634 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=d807bc23b37960187378c44c4f03db2e44660b67 fix initial value of agent types when cloning --- diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 7140ca500..f2c7448d5 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -340,7 +340,8 @@ my $edit_callback = sub { $recur_disabled = $object->freq ? 0 : 1; - (@agent_type) = map {$_->typenum} qsearch('type_pkgs',{'pkgpart'=>$1}); + (@agent_type) = + map {$_->typenum} qsearch('type_pkgs', { 'pkgpart' => $object->pkgpart } ); my @report_option = (); foreach ($object->options) { @@ -397,6 +398,11 @@ my $clone_callback = sub { $object->disabled('Y'); + } else { #not when cloning... + + (@agent_type) = + map {$_->typenum} qsearch('type_pkgs',{ 'pkgpart' => $object->pkgpart } ); + } %options = $object->options;