X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-pkg_class.html;h=28ed5d67df6e24620e7ed0aa034aa56bbd3e0dbc;hb=50f247ce6da7497428ce772d3c37c6cba3b9c736;hp=1c04314edaecb0ebde187fc5c85edda8259f4550;hpb=0ab5a147a0013e54b42390db0b0ca176b008b40f;p=freeside.git
diff --git a/httemplate/elements/tr-select-pkg_class.html b/httemplate/elements/tr-select-pkg_class.html
index 1c04314ed..28ed5d67d 100644
--- a/httemplate/elements/tr-select-pkg_class.html
+++ b/httemplate/elements/tr-select-pkg_class.html
@@ -1,6 +1,6 @@
-% if ( $count == 0 ) {
+% if ( scalar(@{ $opt{'pkg_class'} }) == 0 ) {
-
+
% } else {
@@ -22,6 +22,6 @@
my %opt = @_;
my $classnum = $opt{'curr_value'} || $opt{'value'};
-my $count = scalar( qsearch( 'pkg_class', {} ) );
+$opt{'pkg_class'} ||= [ qsearch( 'pkg_class', { disabled=>'' } ) ];
%init>