Will things ever be the same again?
[freeside.git] / httemplate / view / cust_main / quick-charge.html
index 9e4fb8c..be8b9d8 100644 (file)
@@ -1,49 +1,19 @@
-<%
-  my( $cust_main ) = @_;
-  my $conf = new FS::Conf;
-%>
+%
+%  my( $cust_main ) = @_;
+%
 
-<FORM ACTION="<%=$p%>edit/process/quick-charge.cgi" METHOD="POST">
-<INPUT TYPE="hidden" NAME="custnum" VALUE="<%= $cust_main->custnum %>">
-Description:<INPUT TYPE="text" NAME="pkg">
-Amount:<INPUT TYPE="text" NAME="amount" SIZE=6>
-<% #false laziness w/ edit/part_pkg.cgi %>
-<% if ( $conf->exists('enable_taxclasses') ) { %>
-
-    <SELECT NAME="taxclass">
-
-      <% if ( $conf->exists('require_taxclasses') ) { %>
-
-        <OPTION VALUE="(select)">Select tax class
 
-      <% } else { %>
+<FORM ACTION="<%$p%>edit/process/quick-charge.cgi" METHOD="POST">
 
-        <OPTION VALUE="">
+<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $cust_main->custnum %>">
 
-      <% } %>
-
-      <%
-        my $sth = dbh->prepare('SELECT DISTINCT taxclass FROM cust_main_county')
-          or die dbh->errstr;
-        $sth->execute or die $sth->errstr;
-        my %taxclasses = map { $_->[0] => 1 } @{$sth->fetchall_arrayref};
-        my @taxclasses = grep $_, keys %taxclasses;
-      %>
-  
-      <% foreach my $taxclass ( @taxclasses ) { %>
-  
-          <OPTION VALUE="<%= $taxclass %>"<%= 0 ? ' SELECTED' : '' %>><%= $taxclass %>
-  
-      <% } %>
+Description:<INPUT TYPE="text" NAME="pkg">
 
-    </SELECT>
+Amount:<INPUT TYPE="text" NAME="amount" SIZE=6>
 
-<% } else { %>
+<% include('/elements/select-taxclass.html') %>
 
-  <INPUT TYPE="hidden" NAME="taxclass" VALUE="">';
-  
-<% } %>
-  
 <INPUT TYPE="submit" VALUE="One-time charge">
+
 </FORM>