import rt 2.0.14
[freeside.git] / httemplate / view / cust_main.cgi
index 98b6331..421bd98 100755 (executable)
@@ -271,13 +271,31 @@ print '<BR>'.
   qq!<FORM ACTION="${p}edit/process/quick-charge.cgi" METHOD="POST">!.
   qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!.
   qq!Description:<INPUT TYPE="text" NAME="pkg">!.
-  qq! Amount:<INPUT TYPE="text" NAME="amount" SIZE=6>!.
-  qq!&nbsp;<INPUT TYPE="submit" VALUE="One-time charge"></FORM><BR>!;
+  qq!&nbsp;Amount:<INPUT TYPE="text" NAME="amount" SIZE=6>!.
+  qq!&nbsp;!;
+
+#false laziness w/ edit/part_pkg.cgi
+if ( $conf->exists('enable_taxclasses') ) {
+  print '<SELECT NAME="taxclass">';
+  my $sth = dbh->prepare('SELECT DISTINCT taxclass FROM cust_main_county')
+    or die dbh->errstr;
+  $sth->execute or die $sth->errstr;
+  foreach my $taxclass ( map $_->[0], @{$sth->fetchall_arrayref} ) {
+    print qq!<OPTION VALUE="$taxclass"!;
+    #print ' SELECTED' if $taxclass eq $hashref->{taxclass};
+    print qq!>$taxclass</OPTION>!;
+  }
+  print '</SELECT>';
+} else {
+  print '<INPUT TYPE="hidden" NAME="taxclass" VALUE="">';
+}
+
+print qq!<INPUT TYPE="submit" VALUE="One-time charge"></FORM><BR>!;
 
 print <<END;
 <SCRIPT>
 function cust_pkg_areyousure(href) {
-    if (confirm("Permanantly delete included services and cancel this package?") == true)
+    if (confirm("Permanently delete included services and cancel this package?") == true)
         window.location.href = href;
 }
 </SCRIPT>