X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-cust_tag.html;h=711408e27b57568906eda78be74862ad2a62d2f3;hp=b2b6d967e39c9d9d64f28293324679bafece6984;hb=7b0bbc4117a7959b9f7b7b2cf999b8188ba34160;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c diff --git a/httemplate/elements/tr-select-cust_tag.html b/httemplate/elements/tr-select-cust_tag.html index b2b6d967e..711408e27 100644 --- a/httemplate/elements/tr-select-cust_tag.html +++ b/httemplate/elements/tr-select-cust_tag.html @@ -1,11 +1,9 @@ % if ( ($curuser->access_right('Edit customer tags') && @part_tag) || $is_report ) { - <% $opt{'label'} || 'Tags' %> + <% $opt{'label'} || 'Tags' %> <% include( '/elements/select-cust_tag.html', - 'curr_value' => \@curr_tagnum, - 'part_tag' => \@part_tag, %opt, ) %> @@ -28,7 +26,7 @@ my $cgi = $opt{'cgi'}; my $is_report = $opt{'is_report'}; my @curr_tagnum = (); -if ( $cgi->param('error') ) { +if ( $cgi && $cgi->param('tagnum') ) { @curr_tagnum = $cgi->param('tagnum'); } elsif ( $opt{'custnum'} ) { @curr_tagnum = map $_->tagnum, @@ -38,6 +36,8 @@ if ( $cgi->param('error') ) { my $extra_sql = "WHERE disabled IS NULL OR disabled = '' "; $extra_sql .= ' OR tagnum IN ('. join(',', @curr_tagnum). ')' if @curr_tagnum; +#now kind of inefficient (we only want to know if there are any), but since +# its an edit control its not significant my @part_tag = qsearch({ 'table' => 'part_tag', 'hashref' => {},