RT# 79737 - Added ability to us a cc surcharge of a flat fee.
[freeside.git] / httemplate / elements / tr-amount_fee.html
index 1248852..9e6d9e9 100644 (file)
@@ -1,4 +1,4 @@
-  <TR>
+  <TR ID="payment_amount_row" <% $opt{'row_style'} %>>
     <TH ALIGN="right"><% mt('Payment amount') |h %></TH>
     <TD COLSPAN=7>
       <TABLE><TR><TD BGCOLOR="#ffffff">
@@ -15,7 +15,7 @@
                                   onKeyPress = "amount_changed(this)"
 %                               }
                          >
-      </TD><TD BGCOLOR="#cccccc">
+      </TD><TD BGCOLOR="<% length($fee) ? '#cccccc' : '#ffffff' %>">
 %        if ( $fee ) {
            <INPUT TYPE="hidden" NAME="fee_pkgpart" VALUE="<% $fee_pkg->pkgpart %>">
            <INPUT TYPE="hidden" NAME="fee" VALUE="<% $fee_display eq 'add' ? $fee : '' %>">
@@ -94,6 +94,9 @@ if ( $amount > 0 ) {
   $amount += $amount * $opt{'surcharge_percentage'}/100
     if $opt{'surcharge_percentage'} > 0;
 
+  $amount += $opt{'surcharge_flatfee'}
+    if $opt{'surcharge_flatfee'} > 0;
+
   $amount = sprintf("%.2f", $amount);
 }