[freeside-commits] freeside/httemplate/browse part_referral.html,
1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Fri Aug 11 01:02:28 PDT 2006
- Previous message: [freeside-commits] freeside/httemplate/elements
select-part_referral.html, NONE,
1.1 tr-select-part_referral.html, NONE, 1.1 select-agent.html,
1.3, 1.4 tr-select-agent.html, 1.2, 1.3
- Next message: [freeside-commits] freeside/FS/FS cust_pkg.pm,1.64,1.65
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail:/tmp/cvs-serv9900/httemplate/browse
Modified Files:
part_referral.html
Log Message:
virtualize referrals on customer addition
Index: part_referral.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/part_referral.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- part_referral.html 10 Aug 2006 13:50:45 -0000 1.3
+++ part_referral.html 11 Aug 2006 08:02:26 -0000 1.4
@@ -32,7 +32,7 @@
'Total' => 86400, # 60sec * 60min * 24hrs
);
- $extra_sql = " WHERE ". FS::part_referral->acl_agentnum_sql;
+ my $curuser = $FS::CurrentUser::CurrentUser;
my $statement = "SELECT COUNT(*) FROM h_cust_main
WHERE history_action = 'insert'
@@ -67,14 +67,7 @@
</TR>
<%
-foreach my $part_referral (
-
- qsearch({
- 'table' => 'part_referral',
- 'extra_sql' => "$extra_sql ORDER BY refnum",
- })
-
-) {
+foreach my $part_referral ( FS::part_referral->all_part_referral(1) ) {
if ( $bgcolor eq $bgcolor1 ) {
$bgcolor = $bgcolor2;
@@ -82,13 +75,23 @@
$bgcolor = $bgcolor1;
}
+ $a = 0;
+
%>
<TR>
- <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><A HREF="<%= $p %>edit/part_referral.html?<%= $part_referral->refnum %>">
- <%= $part_referral->refnum %></A></TD>
- <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><A HREF="<%= $p %>edit/part_referral.html?<%= $part_referral->refnum %>">
- <%= $part_referral->referral %></A></TD>
+ <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>">
+ <% if ( $part_referral->agentnum || $curuser->access_right('Edit global advertising sources') ) {
+ $a++;
+ %>
+ <A HREF="<%= $p %>edit/part_referral.html?<%= $part_referral->refnum %>">
+ <% } %>
+ <%= $part_referral->refnum %><%= $a ? '</A>' : '' %></TD>
+ <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>">
+ <% if ( $a ) { %>
+ <A HREF="<%= $p %>edit/part_referral.html?<%= $part_referral->refnum %>">
+ <% } %>
+ <%= $part_referral->referral %><%= $a ? '</A>' : '' %></TD>
<% if ( $show_agentnums ) { %>
<TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><%= $part_referral->agentnum ? $part_referral->agent->agent : '(global)' %></TD>
- Previous message: [freeside-commits] freeside/httemplate/elements
select-part_referral.html, NONE,
1.1 tr-select-part_referral.html, NONE, 1.1 select-agent.html,
1.3, 1.4 tr-select-agent.html, 1.2, 1.3
- Next message: [freeside-commits] freeside/FS/FS cust_pkg.pm,1.64,1.65
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list