X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fquick-charge.cgi;h=c1e7fc159c77c9799e64f9c02f3e1493c2197d64;hb=5cda22da9d0771878b5256895e1655d75f3ea1f6;hp=c130a550fc8964998de225b63b43fe3a63214807;hpb=1553b7eca477f52824b6b352a0e87df68622411b;p=freeside.git diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index c130a550f..c1e7fc159 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -67,6 +67,18 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge my $start_date = $cgi->param('start_date') ? parse_datetime($cgi->param('start_date')) : time; + + $param->{'tax_override'} =~ /^\s*([,\d]*)\s*$/ + or $error .= "Illegal tax override " . $param->{"tax_override"} . " "; + my $override = $1; + + if ( $param->{'taxclass'} eq '(select)' ) { + $error .= "Must select a tax class. " + unless ($conf->exists('enable_taxproducts') && + ( $override || $param->{taxproductnum} ) + ); + $cgi->param('taxclass', ''); + } $error = $cust_pkg->modify_charge( 'pkg' => scalar($cgi->param('pkg')), @@ -75,8 +87,13 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge 'adjust_commission' => ($cgi->param('adjust_commission') ? 1 : 0), 'amount' => $amount, 'setup_cost' => $setup_cost, + 'setuptax' => scalar($cgi->param('setuptax')), + 'taxclass' => scalar($cgi->param('taxclass')), + 'taxproductnum' => scalar($cgi->param('taxproductnum')), + 'tax_override' => $override, 'quantity' => $quantity, 'start_date' => $start_date, + 'separate_bill' => scalar($cgi->param('separate_bill')), ); } else { # the usual case: new one-time charge @@ -122,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')),