X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fcust_pay_or_refund.html;h=002b1a4c2ac66e21b2fdb1ce285efd38c8d2dbd7;hb=ea3ce8d7f076e7fecff4be7ae63bc413adb0adf5;hp=fccb9eef7f5598a25f4305f969876f9e75ddcf6d;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/httemplate/search/elements/cust_pay_or_refund.html b/httemplate/search/elements/cust_pay_or_refund.html index fccb9eef7..002b1a4c2 100755 --- a/httemplate/search/elements/cust_pay_or_refund.html +++ b/httemplate/search/elements/cust_pay_or_refund.html @@ -39,8 +39,8 @@ Examples: ) -<% include( 'search.html', - 'title' => $title, +<& search.html, + 'title' => $title, # XXX: translate 'name_singular' => $name_singular, 'query' => $sql_query, 'count_query' => $count_query, @@ -53,8 +53,7 @@ Examples: 'links' => \@links, 'color' => \@color, 'style' => \@style, - ) -%> +&> <%init> my %opt = @_; @@ -75,8 +74,9 @@ $title = 'Unapplied ' if $unapplied; $title .= "\u$name_singular Search Results"; my $link = ''; -if ( ( $curuser->access_right('View invoices') #XXX for now - || $curuser->access_right('View customer payments') +if ( ( $curuser->access_right('View invoices') #remove in 2.5 (2.7?) + || ($curuser->access_right('View payments') && $table =~ /^cust_pay/) + || ($curuser->access_right('View refunds') && $table eq 'cust_refund') ) && ! $opt{'disable_link'} ) @@ -158,21 +158,21 @@ push @fields, 'payby_payinfo_pretty', push @sort_fields, '', $amount_field; if ( $unapplied ) { - push @header, 'Unapplied'; + push @header, emt('Unapplied'); $align .= 'r'; push @links, ''; push @fields, sub { sprintf('$%.2f', shift->unapplied_amount) }; push @sort_fields, ''; } -push @header, 'Date'; +push @header, emt('Date'); $align .= 'r'; push @links, ''; push @fields, sub { time2str('%b %d %Y', shift->_date ) }; push @sort_fields, '_date'; unless ( $opt{'disable_by'} ) { - push @header, 'By'; + push @header, emt('By'); $align .= 'c'; push @links, ''; push @fields, sub { my $o = shift->otaker; @@ -183,7 +183,7 @@ unless ( $opt{'disable_by'} ) { } if ( $tax_names ) { - push @header, ('Tax names', 'Tax province'); + push @header, (emt('Tax names'), emt('Tax province')); $align .= 'cc'; push @links, ('',''); push @fields, sub { join (' + ', map { /^(.*?)(, \w\w)?$/; $1 }