diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-05-08 15:34:37 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-05-08 15:34:37 -0700 |
| commit | faadb1bcccbbdfee91afffded23dfebb89ebafe0 (patch) | |
| tree | 357322b1fc04d0949f67e41d8a5d50d446a137f3 /httemplate/edit/process | |
| parent | b5aceddf3c5720330e1027d46fea36f4ab06b55a (diff) | |
separate tax exemption numbers for individual exemptions w/tax-cust_exempt-groups, RT#17658
Diffstat (limited to 'httemplate/edit/process')
| -rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 4b2ad1324..295e99187 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; |
