X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fprospect_main.html;h=8c93d6c02acb9b4174b642e3c67e0a76af17880f;hb=e215fc213a1eb9a3365cecf5ce82f1a58f154cd6;hp=6c4595dbe1b0c75586e8e401a140e5664cc01c7f;hpb=8f89376bceb710bceb8d2d3b9dd7fe24e7d47cf3;p=freeside.git
diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html
index 6c4595dbe..8c93d6c02 100644
--- a/httemplate/view/prospect_main.html
+++ b/httemplate/view/prospect_main.html
@@ -1,38 +1,30 @@
-<% 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 %> |
%}
% if ( $prospect_main->company ) {
- 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_classname %> Contact |
+ <% $prospect_contact->contact_classname %> Contact
| <% $contact->line %> |
%}
@@ -42,7 +34,7 @@
% #but only one, for now
% foreach my $cust_location (@cust_location) {
- Address |
+ Address
|
<% $cust_location->location_label(
'join_string' => ' ',
@@ -59,42 +51,20 @@
&>
% }
% }
+% 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 %> |
-
-% 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 %> |
-
-% }
-
-% }
-
-% }
-
+<& /elements/quotations.html, prospect_main=>$prospect_main &>
% if ( $curuser->access_right('Qualify service') ) {
<% include( '/elements/popup_link-prospect_main.html',
@@ -112,15 +82,7 @@
% }
-
+%# XXX display prospect tickets
<%init>
@@ -129,10 +91,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;
@@ -150,6 +108,14 @@ my $prospect_main = qsearchs( {
});
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";
+}
%init>