From: ivan Date: Sun, 6 Dec 2009 23:44:55 +0000 (+0000) Subject: fix initial value of agent types when cloning X-Git-Tag: freeside_1_9_2~190 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=4768daa7cef8b7f99c838a0854052d6cad71d84f;p=freeside.git fix initial value of agent types when cloning --- diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 745c0ad7e..a02545f84 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -332,7 +332,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) { @@ -389,6 +390,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;