X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fquick-charge.cgi;h=00d17c8b1c5b633c3ac4e3c85e86f0eb93dfdf49;hb=1aecd5bf33146bf3f374341a3814960ae1d419e8;hp=aa6010ef9f60968609d7d50ffb01746e513c570c;hpb=64514e0541c94b23a096acb265cb47e9ca6e6f85;p=freeside.git diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index aa6010ef9..00d17c8b1 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -1,10 +1,10 @@ % if ( $error ) { % $cgi->param('error', $error ); -<% $cgi->redirect($p.'quick-charge.html?'. $cgi->query_string) %> +<% $cgi->redirect($redirect) %> % } else { <% header(emt($message)) %> % } @@ -74,7 +74,7 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge 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', ''); @@ -93,6 +93,7 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge 'tax_override' => $override, 'quantity' => $quantity, 'start_date' => $start_date, + 'separate_bill' => scalar($cgi->param('separate_bill')), ); } else { # the usual case: new one-time charge @@ -121,7 +122,7 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge 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', ''); @@ -138,6 +139,7 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge : '' ), 'no_auto' => scalar($cgi->param('no_auto')), + 'separate_bill' => scalar($cgi->param('separate_bill')), 'pkg' => scalar($cgi->param('pkg')), 'setuptax' => scalar($cgi->param('setuptax')), 'taxclass' => scalar($cgi->param('taxclass')), @@ -155,4 +157,14 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge } +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'; +} +