diff options
Diffstat (limited to 'httemplate/view/prospect_main.html')
-rw-r--r-- | httemplate/view/prospect_main.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html index 9e85348af..6c4595dbe 100644 --- a/httemplate/view/prospect_main.html +++ b/httemplate/view/prospect_main.html @@ -64,6 +64,38 @@ <BR> +% if ( $curuser->access_right('Generate quotation') ) { + <FONT CLASS="fsinnerbox-title"><% mt( 'Quotations' ) |h %></FONT> + <A HREF="<%$p%>edit/quotation.html?prospectnum=<% $prospectnum %>">New quotation</A> +% my @quotations = $prospect_main->quotation; +% if ( @quotations ) { + <& /elements/table-grid.html &> +% my $bgcolor1 = '#eeeeee'; +% my $bgcolor2 = '#ffffff'; +% my $bgcolor = ''; + <TR> + <TH CLASS="grid" BGCOLOR="#cccccc">#</TH> + <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Date') |h %></TH> + </TR> +% foreach my $quotation (@quotations) { +% if ( $bgcolor eq $bgcolor1 ) { +% $bgcolor = $bgcolor2; +% } else { +% $bgcolor = $bgcolor1; +% } +% my $a = qq(<A HREF="$p/view/quotation.html?quotationnum=). #" +% $quotation->quotationnum. '">'; + <TR> + <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% $quotation->quotationnum %></A></TD> + <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $a %><% time2str($date_format, $quotation->_date) |h %></A></TD> + </TR> +% } + </TABLE> +% } + <BR><BR> +% } + + % if ( $curuser->access_right('Qualify service') ) { <% include( '/elements/popup_link-prospect_main.html', 'action' => $p. 'misc/qual.html', @@ -80,6 +112,7 @@ <BR><BR> % } +<!-- <% ntable("#cccccc") %> <TR> @@ -87,6 +120,7 @@ </TR> </TABLE> +--> <%init> @@ -95,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; |