X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fnotes.html;h=c02af386616f6cedd02a3868676340fed93fc1f1;hp=62502002e660ea207ff02737b62313f0411e2d66;hb=e1e2c5a12697fc16078f46d1e59358de5684ee16;hpb=41cfbe060c6c3d816a6e369259a587e50639e94d diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html index 62502002e..c02af3866 100755 --- a/httemplate/view/cust_main/notes.html +++ b/httemplate/view/cust_main/notes.html @@ -30,7 +30,13 @@ ">(<% mt('Show active attachments') |h %>) -% } elsif($curuser->access_right('View deleted attachments')) { +% } elsif ( $curuser->access_right('View deleted attachments') +% && FS::Record->scalar_sql( +% 'SELECT 1 FROM cust_attachment WHERE custnum = ? '. +% ' AND disabled IS NOT NULL AND disabled > 0 LIMIT 1', +% $custnum ) +% ) +% { ">(<% mt('Show deleted attachments') |h %>)