projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 77532 - fixed error where cust main fax not showing, and fixed checking of phonet...
[freeside.git]
/
httemplate
/
view
/
cust_main
/
notes.html
diff --git
a/httemplate/view/cust_main/notes.html
b/httemplate/view/cust_main/notes.html
index
6250200
..
c02af38
100755
(executable)
--- 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>
<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>
<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>