summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/cust_main.cgi
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-05-08 15:34:25 -0700
committerIvan Kohler <ivan@freeside.biz>2012-05-08 15:34:25 -0700
commita68564e6856a7ea63763eeaf7962a5cb2df649af (patch)
tree45022b1dc0208ac6c3fdc5f413e25598c815dab7 /httemplate/edit/process/cust_main.cgi
parent52cf6949df47667d9864f5807549aa68789ef2fa (diff)
separate tax exemption numbers for individual exemptions w/tax-cust_exempt-groups, RT#17658
Diffstat (limited to 'httemplate/edit/process/cust_main.cgi')
-rwxr-xr-xhttemplate/edit/process/cust_main.cgi5
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi
index 793426cc3..1cf7a3eb4 100755
--- a/httemplate/edit/process/cust_main.cgi
+++ b/httemplate/edit/process/cust_main.cgi
@@ -132,6 +132,7 @@ $new->setfield('paid', $cgi->param('paid') )
my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups');
my @tax_exempt = grep { $cgi->param("tax_$_") eq 'Y' } @exempt_groups;
+my %tax_exempt = map { $_ => scalar($cgi->param("tax_$_".'_num')) } @tax_exempt;
#perhaps this stuff should go to cust_main.pm
if ( $new->custnum eq '' or $duplicate_of ) {
@@ -239,7 +240,7 @@ if ( $new->custnum eq '' or $duplicate_of ) {
else {
# create the customer
$error ||= $new->insert( \%hash, \@invoicing_list,
- 'tax_exemption'=> \@tax_exempt,
+ 'tax_exemption'=> \%tax_exempt,
'prospectnum' => scalar($cgi->param('prospectnum')),
);
@@ -297,7 +298,7 @@ if ( $new->custnum eq '' or $duplicate_of ) {
local($FS::Record::DEBUG) = $DEBUG if $DEBUG;
$error ||= $new->replace( $old, \@invoicing_list,
- 'tax_exemption' => \@tax_exempt,
+ 'tax_exemption' => \%tax_exempt,
);
warn "$me returned from replace" if $DEBUG;