-% if ( $error ) {
-% $cgi->param('error', $error );
-<% $cgi->redirect($p.'quick-charge.html?'. $cgi->query_string) %>
-% } else {
-<% header(emt($message)) %>
- <SCRIPT TYPE="text/javascript">
- window.top.location.reload();
- </SCRIPT>
- </BODY></HTML>
-% }
+<% $cgi->redirect($redirect) %>
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
if ( $param->{'taxclass'} eq '(select)' ) {
$error .= "Must select a tax class. "
- unless ($conf->exists('enable_taxproducts') &&
+ unless ($conf->config('tax_data_vendor') &&
( $override || $param->{taxproductnum} )
);
$cgi->param('taxclass', '');
if ( $param->{'taxclass'} eq '(select)' ) {
$error .= "Must select a tax class. "
- unless ($conf->exists('enable_taxproducts') &&
+ unless ($conf->config('tax_data_vendor') &&
( $override || $param->{taxproductnum} )
);
$cgi->param('taxclass', '');
}
+my $redirect;
+if ( $error ) {
+ $cgi->param('error', $error );
+ $redirect = $p.'quick-charge.html?'. $cgi->query_string;
+} elsif ( $quotation ) {
+ $redirect = $fsurl.'view/quotation.html?' . $quotation->quotationnum;
+} else {
+ $redirect = $fsurl.'view/cust_main.cgi?custnum=' . $cust_main->custnum . ';show=last';
+}
+
</%init>