Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / view / quotation.html
index 81c7cdd..67609a1 100755 (executable)
@@ -17,9 +17,15 @@ function areyousure(href, message) {
            'actionlabel' => emt('Add package'),
            map { $_ => $quotation->$_ } qw( quotationnum custnum prospectnum )
       &>
-      <BR><BR>
 %   }
 
+%   if ( $curuser->access_right('One-time charge') ) {
+      | <& /elements/one_time_charge_link.html,
+             map { $_ => $quotation->$_ } qw( quotationnum custnum prospectnum )
+        &>
+%   }
+      <BR><BR>
+
 %   if ( 1 ) { #if ( $curuser->access_right('Send quotations') )
 
       <& /elements/popup_link.html,
@@ -66,6 +72,9 @@ function areyousure(href, message) {
   <BR><BR>
 % }
 
+% if ( $error ) {
+<DIV CLASS="error"><% emt('Error calculating quotation: [_1]', $error) %></DIV>
+% }
 
 % if ( $conf->exists('quotation_html') ) { 
     <% join('', $quotation->print_html( preref_callback=>$preref_callback )) %>
@@ -101,6 +110,8 @@ my $quotation = qsearchs({
 });
 die "Quotation #$quotationnum not found!" unless $quotation;
 
+my $error = $quotation->estimate;
+
 my $menubar = menubar( $quotation->cust_or_prospect_label_link($p) );
 
 my $link = "quotationnum=$quotationnum";