X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fprospect_main.html;h=d6bcbe7ada315a87b7425f7e252b05901511e695;hp=689b422a47d8216f60681437292aa815451d39d6;hb=b71b1576c68bc40ad26592b354feace37a029f0e;hpb=d2acdd4d53071f9e0f9718e14532cb009cda1a85 diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html index 689b422a4..d6bcbe7ad 100644 --- a/httemplate/view/prospect_main.html +++ b/httemplate/view/prospect_main.html @@ -1,51 +1,44 @@ -<% include('/elements/header.html', - 'Prospect View: '. $prospect_main->company - ) -%> +<& /elements/header.html, $title &> % if ( $curuser->access_right('Edit prospect') ) { Edit this prospect % } -<% ntable("#cccccc",2) %> - - - Prospect # - <% $prospectnum %> -% if ( $prospect_main->disabled ) { - (DISABLED) -% } - - - -%unless ( scalar(@agentnums) == 1 -% && !$curuser->access_right('View customers of all agents') ) { -% my $agent = qsearchs('agent',{ 'agentnum' => $prospect_main->agentnum } ); - - Agent - <% $agent->agentnum %>: <% $agent->agent |h %> - -%} + %unless ( ! $prospect_main->refnum ) { # || scalar(@part_referral) == 1 ) { % my $part_referral = qsearchs('part_referral',{ 'refnum' => $prospect_main->refnum } ); - + %} % if ( $prospect_main->company ) { - + % } -% foreach my $contact ( $prospect_main->contact ) { +% foreach my $prospect_contact ( $prospect_main->prospect_contact ) { +% my $contact = $prospect_contact->contact; - - + + %} @@ -54,7 +47,7 @@ % #but only one, for now % foreach my $cust_location (@cust_location) { - + + + +% }
Advertising sourceAdvertising source <% $part_referral->referral |h %>
CompanyCompany <% $prospect_main->company |h %>
<% $contact->contact_classname %> Contact<% $contact->line %><% $prospect_contact->contact_classname |h %> Contact + <% $contact->line |h %>
+ +% for my $row ( $contact->contact_email ) { + +% } +% for my $row ( $contact->contact_phone ) { + +% } +% if ( $prospect_contact->comment ) { + +% } +
E-Mail:<% $row->emailaddress |h %>
<% $row->phone_type->typename |h %>:<% $row->phonenum_pretty |h %>
Comment:<% $prospect_contact->comment |h %>
+
AddressAddress <% $cust_location->location_label( 'join_string' => '
', @@ -71,53 +64,25 @@ &> % } % } +% if ( my $tax_status = $prospect_main->tax_status ) { +
Tax status + + <% $tax_status->taxstatus %>: <% $tax_status->description %> +

-% 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 %> - <% mt('Setup') |h %> - <% mt('Recurring') |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 %> - <% $a %><% $quotation->total_setup |h %> - <% $a %><% $quotation->total_recur |h %> - Convert to customer - -% } - -% } -

-% } - +<& /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', + 'label' => 'New Qualification', 'actionlabel' => 'New Qualification', 'color' => '#333399', 'prospect_main' => $prospect_main, @@ -130,15 +95,7 @@

% } - +%# XXX display prospect tickets <%init> @@ -147,10 +104,6 @@ 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; @@ -168,6 +121,13 @@ my $prospect_main = qsearchs( { }); die "Prospect not found!" unless $prospect_main; +my $title = mt("Prospect"). ': '. $prospect_main->name; +$title .= ' ('.mt('DISABLED').')' + if $prospect_main->disabled; + my @agentnums = $curuser->agentnums; +if (scalar(@agentnums) > 1 ) { + $title = encode_entities($prospect_main->agent->agent). " $title"; +}