diff options
author | ivan <ivan> | 2009-12-28 19:20:25 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-12-28 19:20:25 +0000 |
commit | 03ceab71dad1e5eb366865d304e5e459cc905ce4 (patch) | |
tree | 18b4532289a0237ae694b1ad5c033b25f448bd7c /httemplate/view | |
parent | 5950a980cef4968ac59ca8041d2204e6d98e7a3d (diff) |
beginning of prospect/CRM/contact work
Diffstat (limited to 'httemplate/view')
-rw-r--r-- | httemplate/view/cust_main/packages/location.html | 6 | ||||
-rw-r--r-- | httemplate/view/prospect_main.html | 92 |
2 files changed, 97 insertions, 1 deletions
diff --git a/httemplate/view/cust_main/packages/location.html b/httemplate/view/cust_main/packages/location.html index 9f348e5d3..41155cbae 100644 --- a/httemplate/view/cust_main/packages/location.html +++ b/httemplate/view/cust_main/packages/location.html @@ -4,12 +4,16 @@ <I><FONT SIZE=-1>(default service address)</FONT><BR> % } - <% $loc->location_label( 'join_string' => '<BR>', + <% $loc->location_label( 'join_string' => '<BR>', + 'double_space' => ' ', 'escape_function' => \&encode_entities, + 'countrydefault' => $countrydefault, ) %> +% unless ( $cust_pkg->locationnum ) { </I> +% } % if ( ! $cust_pkg->get('cancel') % && $FS::CurrentUser::CurrentUser->access_right('Change customer package') diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html new file mode 100644 index 000000000..de446a9fb --- /dev/null +++ b/httemplate/view/prospect_main.html @@ -0,0 +1,92 @@ +<% include('/elements/header.html', + 'Prospect View: '. $prospect_main->company + ) +%> + +% if ( $curuser->access_right('Edit prospect') ) { + <A HREF="<% $p %>edit/prospect_main.html?<% $prospectnum %>">Edit this prospect</A> +% } + +<% ntable("#cccccc",2) %> + +<TR> + <TD ALIGN="right">Prospect #</TD> + <TD BGCOLOR="#FFFFFF"><B><% $prospectnum %></B></TD> +</TR> + +%unless ( scalar(@agentnums) == 1 ) { +% my $agent = qsearchs('agent',{ 'agentnum' => $prospect_main->agentnum } ); + <TR> + <TD ALIGN="right">Agent</TD> + <TD BGCOLOR="#ffffff"><% $agent->agentnum %>: <% $agent->agent %></TD> + </TR> +%} + +<TR> + <TD ALIGN="right">Company</TD> + <TD BGCOLOR="#FFFFFF"><B><% $prospect_main->company |h %></B></TD> +</TR> + +% foreach my $contact ( $prospect_main->contact ) { + <TR> + <TD ALIGN="right">Contact</TD> + <TD BGCOLOR="#FFFFFF"><% $contact->line %></TD> + </TR> +%} + +% my @cust_location = +% qsearch('cust_location', { 'prospectnum' => $prospectnum } ); +% #but only one, for now +% foreach my $cust_location (@cust_location) { + <TR> + <TD ALIGN="right">Address</TD> + <TD BGCOLOR="#FFFFFF"> + <% $cust_location->location_label( + 'join_string' => '<BR>', + 'double_space' => ' ', + 'escape_function' => \&encode_entities, + ) + %> + </TD> + </TR> +% } + +</TABLE> + +<BR> + +<% ntable("#cccccc") %> + +<TR> + <TH BGCOLOR="#e8e8e8" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Tickets</FONT></TH> +</TR> + +</TABLE> + +<%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 @agentnums = $curuser->agentnums; + +</%init> |