X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fprospect_main.html;h=d6bcbe7ada315a87b7425f7e252b05901511e695;hb=66fc0c9ba5d3f460a26a51ee72ee25923d644da8;hp=f4b2f58ee55031eadb76223dfd2d3e0c079cbc3b;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git
diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html
index f4b2f58ee..d6bcbe7ad 100644
--- a/httemplate/view/prospect_main.html
+++ b/httemplate/view/prospect_main.html
@@ -1,37 +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 %> |
-
-
-%unless ( scalar(@agentnums) == 1
-% && !$curuser->access_right('View customers of all agents') ) {
-% my $agent = qsearchs('agent',{ 'agentnum' => $prospect_main->agentnum } );
+%unless ( ! $prospect_main->refnum ) { # || scalar(@part_referral) == 1 ) {
+% my $part_referral = qsearchs('part_referral',{ 'refnum' => $prospect_main->refnum } );
- Agent |
- <% $agent->agentnum %>: <% $agent->agent %> |
+ Advertising source
+ | <% $part_referral->referral |h %> |
%}
-
- Company |
- <% $prospect_main->company |h %> |
-
+% if ( $prospect_main->company ) {
+
+ Company
+ | <% $prospect_main->company |h %> |
+
+% }
-% foreach my $contact ( $prospect_main->contact ) {
+% foreach my $prospect_contact ( $prospect_main->prospect_contact ) {
+% my $contact = $prospect_contact->contact;
- Contact |
- <% $contact->line %> |
+ <% $prospect_contact->contact_classname |h %> Contact |
+
+ <% $contact->line |h %>
+
+% for my $row ( $contact->contact_email ) {
+ E-Mail: | <% $row->emailaddress |h %> |
+% }
+% for my $row ( $contact->contact_phone ) {
+ <% $row->phone_type->typename |h %>: | <% $row->phonenum_pretty |h %> |
+% }
+% if ( $prospect_contact->comment ) {
+ Comment: | <% $prospect_contact->comment |h %> |
+% }
+
+ |
%}
@@ -40,7 +47,7 @@
% #but only one, for now
% foreach my $cust_location (@cust_location) {
- Address |
+ Address
|
<% $cust_location->location_label(
'join_string' => ' ',
@@ -49,6 +56,20 @@
)
%>
|
+
+% 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 ) {
+
+ Tax status
+ |
+ <% $tax_status->taxstatus %>: <% $tax_status->description %>
+ |
% }
@@ -56,29 +77,25 @@
+<& /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,
+ '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
% }
-<% ntable("#cccccc") %>
-
-
- Tickets |
-
-
-
+%# XXX display prospect tickets
<%init>
@@ -104,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";
+}
%init>