excel number format fix, #17971
[freeside.git] / fs_selfservice / FS-SelfService / cgi / make_payment.html
index e454647..bec37ca 100644 (file)
   <TH ALIGN="right">Payment&nbsp;amount</TH>
   <TD COLSPAN=7>
     <TABLE><TR><TD BGCOLOR="#ffffff">
-      $<INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<%=sprintf("%.2f",$balance)%>">
+<%=
+    $amt = '';
+    if ( $balance > 0 ) {
+        $amt = $balance;
+        $amt += $amt * $credit_card_surcharge_percentage/100
+                                    if $credit_card_surcharge_percentage > 0;
+        $amt = sprintf("%.2f",$amt);
+    }
+    '';
+%>
+      $<INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<%=$amt%>">
     </TD></TR></TABLE>
   </TD>
-</TR><TR>
+</TR>
+<%= include('discount_term') %>
+<TR>
   <TH ALIGN="right">Card&nbsp;type</TH>
   <TD COLSPAN=7>
     <SELECT NAME="card_type"><OPTION></OPTION>