summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2016-11-15 03:10:32 -0600
committerJonathan Prykop <jonathan@freeside.biz>2016-11-15 03:10:32 -0600
commit8568f687b70154d27c32fe16b0d018420807ded1 (patch)
tree9d92bdc78053d4ee3f76eee68667cda339832b2c /httemplate
parentca870678fbcc49f24e3ccbba899c974938c77336 (diff)
parent79c4a2f57e660defff2eb03d1f5c8ad7e590272b (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/view/cust_main/notes.html8
1 files changed, 7 insertions, 1 deletions
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 @@
<A HREF="<% $p.'view/cust_main.cgi?custnum=' . $cust_main->custnum .
($view ? ";show=$view" : '') . '#notes'
%>"><I>(<% mt('Show active attachments') |h %>)</I></A>
-% } 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 )
+% )
+% {
<A HREF="<% $p.'view/cust_main.cgi?custnum=' . $cust_main->custnum .
($view ? ";show=$view" : '') . ';show_deleted=1#notes'
%>"><I>(<% mt('Show deleted attachments') |h %>)</I></A>