Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / elements / tr-select-cust_tag.html
index d88f3a8..b133dcc 100644 (file)
@@ -1,7 +1,7 @@
-% if ( $curuser->access_right('Edit customer tags') && @part_tag ) {
+% if ( ($curuser->access_right('Edit customer tags') && @part_tag) || $is_report ) {
 
   <TR>
-    <TD ALIGN="right"><% $opt{'label'} || 'Tags' %></TD>
+    <TH ALIGN="right"><% $opt{'label'} || 'Tags' %></TD>
     <TD>
       <% include( '/elements/select-cust_tag.html',
                      'curr_value' => \@curr_tagnum,
@@ -25,9 +25,10 @@ my $curuser = $FS::CurrentUser::CurrentUser;
 
 my %opt = @_;
 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,