X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_referral.html;h=27eb5454266f2d5c110a5c124f8187a7bf27dcac;hb=da863bce6c626f566e5e33e5a8896f6ae4aba470;hp=c7374673ff2d9cb175714db41759a7f1e302d911;hpb=406e97fe228cd249a8bd0fa58cbfbf33ab805f18;p=freeside.git
diff --git a/httemplate/browse/part_referral.html b/httemplate/browse/part_referral.html
index c7374673f..27eb54542 100755
--- a/httemplate/browse/part_referral.html
+++ b/httemplate/browse/part_referral.html
@@ -1,4 +1,4 @@
-<% include("/elements/header.html","Advertising source Listing" ) %>
+<& /elements/header.html, "Advertising source Listing" &>
Where a customer heard about your service. Tracked for informational purposes.
@@ -13,7 +13,11 @@ Where a customer heard about your service. Tracked for informational purposes.
'( show disabled advertising sources )'; }
%>
-<% include('/elements/table-grid.html') %>
+% ###
+% # Header
+% ###
+
+<& /elements/table-grid.html &>
% my $bgcolor1 = '#eeeeee';
% my $bgcolor2 = '#ffffff';
% my $bgcolor = '';
@@ -29,7 +33,7 @@ Where a customer heard about your service. Tracked for informational purposes.
Agent |
% }
- >Customers and Packages |
+ >Prospects, Customers and Packages |
% for my $period ( keys %after ) {
@@ -38,6 +42,10 @@ Where a customer heard about your service. Tracked for informational purposes.
+% ###
+% # Rows
+% ###
+
%foreach my $part_referral ( FS::part_referral->all_part_referral(1,!scalar($cgi->param('showdisabled'))) ) {
%
% if ( $bgcolor eq $bgcolor1 ) {
@@ -85,6 +93,8 @@ Where a customer heard about your service. Tracked for informational purposes.
% $today-$after{$period},
% $today+$before{$period},
% );
+% $prospect_sth->execute(@param) or die $prospect_sth->errstr;
+% my $num_prospect = $prospect_sth->fetchrow_arrayref->[0];
% $cust_sth->execute(@param) or die $cust_sth->errstr;
% my $num_cust = $cust_sth->fetchrow_arrayref->[0];
% $pkg_sth->execute(@param) or die $pkg_sth->errstr;
@@ -93,6 +103,10 @@ Where a customer heard about your service. Tracked for informational purposes.
+ <% $num_prospect %> |
+ prospects |
+
+
<% $num_cust %> |
customers |
@@ -106,10 +120,20 @@ Where a customer heard about your service. Tracked for informational purposes.
% }
+
+
+% ###
+% # Bottom Totals
+% ###
+
+% $prospect_statement =~ s/AND refnum = \?//;
+% $prospect_sth = dbh->prepare($prospect_statement)
+% or die dbh->errstr;
%
% $cust_statement =~ s/AND refnum = \?//;
% $cust_sth = dbh->prepare($cust_statement)
% or die dbh->errstr;
+%
% $pkg_statement =~ s/AND h_pkg_referral\.refnum = \?//;
% $pkg_sth = dbh->prepare($pkg_statement)
% or die dbh->errstr;
@@ -120,6 +144,8 @@ Where a customer heard about your service. Tracked for informational purposes.
% my @param = ( $today-$after{$period},
% $today+$before{$period},
% );
+% $prospect_sth->execute(@param) or die $prospect_sth->errstr;
+% my $num_prospect = $prospect_sth->fetchrow_arrayref->[0];
% $cust_sth->execute( @param ) or die $cust_sth->errstr;
% my $num_cust = $cust_sth->fetchrow_arrayref->[0];
% $pkg_sth->execute(@param) or die $pkg_sth->errstr;
@@ -128,6 +154,10 @@ Where a customer heard about your service. Tracked for informational purposes.
+ <% $num_prospect %> |
+ prospects |
+
+
<% $num_cust %> |
customers |
@@ -142,8 +172,8 @@ Where a customer heard about your service. Tracked for informational purposes.
- | |