[freeside-commits] freeside/httemplate/view/cust_main
quick-charge.html, 1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Fri Oct 7 17:47:22 PDT 2005
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail:/tmp/cvs-serv2080/httemplate/view/cust_main
Modified Files:
quick-charge.html
Log Message:
fix tax class selection in package add/edit too
Index: quick-charge.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/quick-charge.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- quick-charge.html 7 Oct 2005 02:25:41 -0000 1.3
+++ quick-charge.html 8 Oct 2005 00:47:20 -0000 1.4
@@ -1,49 +1,18 @@
<%
my( $cust_main ) = @_;
- my $conf = new FS::Conf;
%>
<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 { %>
-
- <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>
More information about the freeside-commits
mailing list