<% include('/elements/header-popup.html', 'Tax adjustment' ) %> <% include('/elements/error.html') %>
Tax
Amount $
Comment

param('error') ? '' :' DISABLED' %>>
<%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Add customer tax adjustment'); my $sql = 'SELECT DISTINCT(taxname) FROM cust_main_county'; my $sth = dbh->prepare($sql) or die dbh->errstr; $sth->execute() or die $sth->errstr; my @taxname = map { $_->[0] || 'Tax' } @{ $sth->fetchall_arrayref([]) }; my $conf = new FS::Conf; $cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum'; my $custnum = $1; my $amount = ''; if ( $cgi->param('amount') =~ /^\s*\$?\s*(\d+(\.\d{1,2})?)\s*$/ ) { $amount = $1; } $cgi->param('comment') =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]]*)$/ or die 'illegal description'; my $comment = $1;