X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fquotation.html;h=ae9c4aa8cc86bbd94751d7ae3ec43b9d2f334d78;hb=d7ae630be5b8ee3aa3b8d15b26ea29876fcd43cb;hp=2c2c6b7ca14edde1e248721703654ff3e6ef0719;hpb=85e677b86fc37c54e6de2b06340351a28f5a5916;p=freeside.git
diff --git a/httemplate/view/quotation.html b/httemplate/view/quotation.html
index 2c2c6b7ca..ae9c4aa8c 100755
--- a/httemplate/view/quotation.html
+++ b/httemplate/view/quotation.html
@@ -1,5 +1,12 @@
<& /elements/header.html, mt('Quotation View'), $menubar &>
+
+
%#XXX link to order...
<%doc>
@@ -22,23 +29,27 @@ XXX resending quotations
% }
-XXX view typset quotation
+%doc>
-% if ( $conf->exists('invoice_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 )
+ &>
+% }
- <% mt('View typeset invoice PDF') |h %>
+% if ( $conf->exists('quotation_latex') ) {
+ | <% mt('View typeset quotation PDF') |h %>
% }
-XXX actually show the quotation
-
-% if ( $conf->exists('invoice_html') ) {
- <% join('', $cust_bill->print_html(\%opt) ) %>
+% if ( $conf->exists('quotation_html') ) {
+ <% join('', $quotation->print_html( preref_callback=>$preref_callback )) %>
% } else {
-
<% join('', $cust_bill->print_text(\%opt) ) %>-% } - -%doc> +% die "quotation_html config missing"; +% } +% #plaintext quotations?
<% join('', $quotation->print_text() ) %><& /elements/footer.html &> <%init> @@ -56,7 +67,7 @@ if ( $query =~ /^(\d+)$/ ) { $quotationnum = $cgi->param('quotationnum'); } -#my $conf = new FS::Conf; +my $conf = new FS::Conf; my $quotation = qsearchs({ 'select' => 'quotation.*', @@ -67,6 +78,7 @@ my $quotation = qsearchs({ }); die "Quotation #$quotationnum not found!" unless $quotation; +my $menubar; if ( my $custnum = $quotation->custnum ) { my $display_custnum = $quotation->cust_main->display_custnum; $menubar = menubar( @@ -78,4 +90,21 @@ if ( my $custnum = $quotation->custnum ) { ); } +my $link = "quotationnum=$quotationnum"; +#$link .= ';template='. uri_escape($template) if $template; +#$link .= ';notice_name='. $notice_name if $notice_name; + +my $preref_callback = sub { + areyousure_link("${p}misc/delete-quotation_pkg.html?". shift->quotationpkgnum, + emt('Are you sure you want to remove this package from the quotation?'), + emt('Remove this package'), #tooltip + qq(), #link + ); +}; + +sub areyousure_link { + my ($url,$msg,$title,$label) = (shift,shift,shift,shift); + ''.$label.''; +} + %init>