<TD BGCOLOR="#FFFFFF"><B><% $prospectnum %></B></TD>
</TR>
-%unless ( scalar(@agentnums) == 1 ) {
+%unless ( scalar(@agentnums) == 1
+% && !$curuser->access_right('View customers of all agents') ) {
% my $agent = qsearchs('agent',{ 'agentnum' => $prospect_main->agentnum } );
<TR>
<TD ALIGN="right">Agent</TD>
</TR>
%}
-<TR>
- <TD ALIGN="right">Company</TD>
- <TD BGCOLOR="#FFFFFF"><B><% $prospect_main->company |h %></B></TD>
-</TR>
+% if ( $prospect_main->company ) {
+ <TR>
+ <TD ALIGN="right">Company</TD>
+ <TD BGCOLOR="#FFFFFF"><B><% $prospect_main->company |h %></B></TD>
+ </TR>
+% }
% foreach my $contact ( $prospect_main->contact ) {
<TR>
- <TD ALIGN="right">Contact</TD>
+ <TD ALIGN="right"><% $contact->contact_classname %> Contact</TD>
<TD BGCOLOR="#FFFFFF"><% $contact->line %></TD>
</TR>
%}
)
%>
</TD>
- </TR>
+ </TR>
+% if ( $cust_location->latitude && $cust_location->longitude ) {
+ <& /elements/tr-coords.html, $cust_location->latitude,
+ $cust_location->longitude,
+ $prospect_main->name,
+ &>
+% }
% }
</TABLE>
<BR>
+% if ( $curuser->access_right('Generate quotation') ) {
+ <FONT CLASS="fsinnerbox-title"><% mt( 'Quotations' ) |h %></FONT>
+ <A HREF="<%$p%>edit/quotation.html?prospectnum=<% $prospectnum %>">New quotation</A>
+% my @quotations = $prospect_main->quotation;
+% if ( @quotations ) {
+ <& /elements/table-grid.html &>
+% my $bgcolor1 = '#eeeeee';
+% my $bgcolor2 = '#ffffff';
+% my $bgcolor = '';
+ <TR>
+ <TH CLASS="grid" BGCOLOR="#cccccc">#</TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Date') |h %></TH>
+ </TR>
+% foreach my $quotation (@quotations) {
+% if ( $bgcolor eq $bgcolor1 ) {
+% $bgcolor = $bgcolor2;
+% } else {
+% $bgcolor = $bgcolor1;
+% }
+% my $a = qq(<A HREF="$p/view/quotation.html?quotationnum=). #"
+% $quotation->quotationnum. '">';
+ <TR>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% $quotation->quotationnum %></A></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% time2str($date_format, $quotation->_date) |h %></A></TD>
+ </TR>
+% }
+ </TABLE>
+% }
+ <BR><BR>
+% }
+
+
+% if ( $curuser->access_right('Qualify service') ) {
+<% include( '/elements/popup_link-prospect_main.html',
+ 'action' => $p. 'misc/qual.html',
+ 'label' => 'New Qualification',
+ 'actionlabel' => 'New Qualification',
+ 'color' => '#333399',
+ 'prospect_main' => $prospect_main,
+ 'closetext' => 'Close',
+ 'width' => 763,
+ 'height' => 436,
+ )
+%>
+ | <A HREF="<%$p%>search/qual.cgi?prospectnum=<% $prospect_main->prospectnum %>">View Qualifications</A>
+ <BR><BR>
+% }
+
+<!--
<% ntable("#cccccc") %>
<TR>
</TR>
</TABLE>
+-->
<%init>
die "access denied"
unless $curuser->access_right('View prospect');
+my $conf = new FS::Conf;
+
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+
my $prospectnum;
if ( $cgi->param('prospectnum') =~ /^(\d+)$/ ) {
$prospectnum = $1;