summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-07-04 18:49:00 -0700
committerIvan Kohler <ivan@freeside.biz>2012-07-04 18:49:00 -0700
commit8f89376bceb710bceb8d2d3b9dd7fe24e7d47cf3 (patch)
tree0bd4bc41720409ceb4dd153acfe5f442508fdb33 /httemplate/view
parente185be2238bfd1fb2ca6f36b80c9ad93281fe635 (diff)
quotations, RT#16996
Diffstat (limited to 'httemplate/view')
-rw-r--r--httemplate/view/cust_main/order_pkg_link.html22
-rwxr-xr-xhttemplate/view/cust_main/packages.html2
-rw-r--r--httemplate/view/prospect_main.html11
-rw-r--r--httemplate/view/qual.cgi6
-rwxr-xr-xhttemplate/view/quotation.html11
5 files changed, 23 insertions, 29 deletions
diff --git a/httemplate/view/cust_main/order_pkg_link.html b/httemplate/view/cust_main/order_pkg_link.html
deleted file mode 100644
index 7bc5eef31..000000000
--- a/httemplate/view/cust_main/order_pkg_link.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<& /elements/popup_link-cust_main.html,
- 'action' => $p. 'misc/order_pkg.html',
- 'label' => $opt{'label'} || emt('Order new package'),
- 'actionlabel' => emt('Order new package'),
- 'color' => '#333399',
- 'cust_main' => $cust_main,
- 'closetext' => emt('Close'),
- 'width' => 960, #763,
- 'height' => $height,
- %optional,
-&>
-<%init>
-
-my($cust_main, %opt) = @_;
-
-my %optional = map { $_ => $opt{$_} }
- grep $opt{$_},
- qw( lock_pkgpart lock_locationnum qualnum svcpart );
-
-my $height = $opt{'lock_locationnum'} ? 336 : 576;
-
-</%init>
diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html
index e16b2c1d4..7d7930634 100755
--- a/httemplate/view/cust_main/packages.html
+++ b/httemplate/view/cust_main/packages.html
@@ -7,7 +7,7 @@
% if ( $curuser->access_right('Order customer package') ) {
<% $s++ ? ' | ' : '' %>
- <& order_pkg_link.html, $cust_main &>
+ <& /elements/order_pkg_link.html, 'cust_main'=>$cust_main &>
% }
% if ( $curuser->access_right('One-time charge')
diff --git a/httemplate/view/prospect_main.html b/httemplate/view/prospect_main.html
index 801d64bda..6c4595dbe 100644
--- a/httemplate/view/prospect_main.html
+++ b/httemplate/view/prospect_main.html
@@ -78,9 +78,16 @@
<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="#cccccc"><% $quotation->quotationnum %></TD>
- <TD CLASS="grid" BGCOLOR="#cccccc"><% time2str($date_format, $quotation->_date) |h %></TD>
+ <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>
diff --git a/httemplate/view/qual.cgi b/httemplate/view/qual.cgi
index 5c15ec0c3..56c2b61df 100644
--- a/httemplate/view/qual.cgi
+++ b/httemplate/view/qual.cgi
@@ -59,8 +59,10 @@
% $opt{'svcpart'} = $pkg_svc->svcpart if $pkg_svc;
% }
- <% include('/view/cust_main/order_pkg_link.html',
- $cust_or_prospect, %opt) %>
+ <& /elements/order_pkg_link.html,
+ 'cust_main' => $cust_or_prospect,
+ %opt
+ &>
% } elsif ($cust_or_prospect->prospectnum) {
diff --git a/httemplate/view/quotation.html b/httemplate/view/quotation.html
index 866ade2c2..461b5dfb6 100755
--- a/httemplate/view/quotation.html
+++ b/httemplate/view/quotation.html
@@ -24,9 +24,16 @@ XXX resending quotations
</%doc>
-% if ( $conf->exists('quotation_latex') ) {
+% if ( $curuser->access_right('Order customer package') ) {
+ <& /elements/order_pkg_link.html,
+ 'label' => emt('Add package'),
+ 'actionlabel' => emt('Add package'),
+ map { $_ => $quotation->$_ } qw( quotationnum custnum prospectnum )
+ &>
+% }
- <A HREF="<% $p %>view/quotation-pdf.cgi?<% $link %>"><% mt('View typeset quotation PDF') |h %></A>
+% if ( $conf->exists('quotation_latex') ) {
+ | <A HREF="<% $p %>view/quotation-pdf.cgi?<% $link %>"><% mt('View typeset quotation PDF') |h %></A>
<BR><BR>
% }