X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fprospect_main.html;h=6c4595dbe1b0c75586e8e401a140e5664cc01c7f;hb=fa2d8d66b29628e95a8a3aad05e59cbb173f4671;hp=de446a9fbdb9b7e43a693d59ea24deec2ee7cb32;hpb=03ceab71dad1e5eb366865d304e5e459cc905ce4;p=freeside.git diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html index de446a9fb..6c4595dbe 100644 --- a/httemplate/view/prospect_main.html +++ b/httemplate/view/prospect_main.html @@ -14,7 +14,8 @@ <% $prospectnum %> -%unless ( scalar(@agentnums) == 1 ) { +%unless ( scalar(@agentnums) == 1 +% && !$curuser->access_right('View customers of all agents') ) { % my $agent = qsearchs('agent',{ 'agentnum' => $prospect_main->agentnum } ); Agent @@ -22,14 +23,16 @@ %} - - Company - <% $prospect_main->company |h %> - +% if ( $prospect_main->company ) { + + Company + <% $prospect_main->company |h %> + +% } % foreach my $contact ( $prospect_main->contact ) { - Contact + <% $contact->contact_classname %> Contact <% $contact->line %> %} @@ -48,20 +51,76 @@ ) %> - + +% if ( $cust_location->latitude && $cust_location->longitude ) { + <& /elements/tr-coords.html, $cust_location->latitude, + $cust_location->longitude, + $prospect_main->name, + &> +% } % }
+% if ( $curuser->access_right('Generate quotation') ) { + <% mt( 'Quotations' ) |h %> + New quotation +% my @quotations = $prospect_main->quotation; +% if ( @quotations ) { + <& /elements/table-grid.html &> +% my $bgcolor1 = '#eeeeee'; +% my $bgcolor2 = '#ffffff'; +% my $bgcolor = ''; + + # + <% mt('Date') |h %> + +% foreach my $quotation (@quotations) { +% if ( $bgcolor eq $bgcolor1 ) { +% $bgcolor = $bgcolor2; +% } else { +% $bgcolor = $bgcolor1; +% } +% my $a = qq(quotationnum. '">'; + + <% $a %><% $quotation->quotationnum %> + <% $a %><% time2str($date_format, $quotation->_date) |h %> + +% } + +% } +

+% } + + +% 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 +

+% } + + <%init> @@ -70,6 +129,10 @@ my $curuser = $FS::CurrentUser::CurrentUser; 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;