X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fnotes.html;h=c02af386616f6cedd02a3868676340fed93fc1f1;hb=5b0df166c22e13eba83fabee858846ead6a54141;hp=62502002e660ea207ff02737b62313f0411e2d66;hpb=d98e4631640eaaf28b4c022efedd49b640a283c6;p=freeside.git
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 %>)