<& /elements/header.html, $title &> % if ( $curuser->access_right('Edit prospect') ) { Edit this prospect % } %unless ( ! $prospect_main->refnum ) { # || scalar(@part_referral) == 1 ) { % my $part_referral = qsearchs('part_referral',{ 'refnum' => $prospect_main->refnum } ); %} % if ( $prospect_main->company ) { % } % foreach my $prospect_contact ( $prospect_main->prospect_contact ) { % my $contact = $prospect_contact->contact; %} % my @cust_location = % qsearch('cust_location', { 'prospectnum' => $prospectnum } ); % #but only one, for now % foreach my $cust_location (@cust_location) { % if ( $cust_location->latitude && $cust_location->longitude ) { <& /elements/tr-coords.html, $cust_location->latitude, $cust_location->longitude, $prospect_main->name, &> % } % } % if ( my $tax_status = $prospect_main->tax_status ) { % }
Advertising source <% $part_referral->referral |h %>
Company <% $prospect_main->company |h %>
<% $prospect_contact->contact_classname %> Contact <% $contact->line %>
Address <% $cust_location->location_label( 'join_string' => '
', 'double_space' => '   ', 'escape_function' => \&encode_entities, ) %>
Tax status <% $tax_status->taxstatus %>: <% $tax_status->description %>

<& /elements/quotations.html, prospect_main=>$prospect_main &> % 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, ) %> | View Qualifications

% } %# XXX display prospect tickets <%init> my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" unless $curuser->access_right('View prospect'); my $prospectnum; if ( $cgi->param('prospectnum') =~ /^(\d+)$/ ) { $prospectnum = $1; } else { die "No prospect specified (bad URL)!" unless $cgi->keywords; my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array $query =~ /^(\d+)$/; $prospectnum = $1; } my $prospect_main = qsearchs( { 'table' => 'prospect_main', 'hashref' => { 'prospectnum' => $prospectnum }, 'extra_sql' => ' AND '. $curuser->agentnums_sql, }); die "Prospect not found!" unless $prospect_main; my $title = encode_entities($prospect_main->name); $title = mt("Prospect"). ": $title"; $title .= ' ('.mt('DISABLED').')' if $prospect_main->disabled; my @agentnums = $curuser->agentnums; if (scalar(@agentnums) > 1 ) { $title = encode_entities($prospect_main->agent->agent). " $title"; }