diff options
author | Mark Wells <mark@freeside.biz> | 2016-06-29 00:41:18 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-06-29 00:41:18 -0700 |
commit | 84bc64eeaa9650333fbbb79ecb03a1aff4a347fd (patch) | |
tree | 933c7f206461d1c50f4a81746e8b0eabeb415c27 /httemplate/edit/process/cust_main.cgi | |
parent | 539daa850d829061bb0901c2851ec6ddf685030e (diff) |
make customer tax status a required field when the vendor requires it, #39639
Diffstat (limited to 'httemplate/edit/process/cust_main.cgi')
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 99c7f90b8..04516e984 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -188,6 +188,15 @@ if ( $cgi->param('residential_commercial') eq 'Residential' ) { } +# kind of a hack, but some tax data vendors require a status and others +# don't. +my $vendor = $conf->config('tax_data_vendor'); +if ( $vendor eq 'avalara' or $vendor eq 'suretax' ) { + if ( ! $cgi->param('taxstatusnum') ) { + $error ||= 'Tax status required'; + } +} + #perhaps this stuff should go to cust_main.pm if ( $new->custnum eq '' or $duplicate_of ) { |