summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/prospect_main.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-06-29 00:41:18 -0700
committerMark Wells <mark@freeside.biz>2016-06-29 00:41:18 -0700
commit84bc64eeaa9650333fbbb79ecb03a1aff4a347fd (patch)
tree933c7f206461d1c50f4a81746e8b0eabeb415c27 /httemplate/edit/process/prospect_main.html
parent539daa850d829061bb0901c2851ec6ddf685030e (diff)
make customer tax status a required field when the vendor requires it, #39639
Diffstat (limited to 'httemplate/edit/process/prospect_main.html')
-rw-r--r--httemplate/edit/process/prospect_main.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/httemplate/edit/process/prospect_main.html b/httemplate/edit/process/prospect_main.html
index 7c8cc276e..b2ae88eba 100644
--- a/httemplate/edit/process/prospect_main.html
+++ b/httemplate/edit/process/prospect_main.html
@@ -1,5 +1,6 @@
<% include('elements/process.html',
'table' => 'prospect_main',
+ 'precheck_callback' => $precheck,
'args_callback' => $args_callback,
'agent_virt' => 1,
'process_o2m' => {
@@ -11,6 +12,16 @@
%>
<%init>
+my $precheck = sub {
+ my $cgi = shift;
+ my $vendor = FS::Conf->new->config('tax_data_vendor');
+ if ( $vendor eq 'avalara' or $vendor eq 'suretax' ) {
+ if ( ! $cgi->param('taxstatusnum') ) {
+ return 'Tax status required';
+ }
+ }
+};
+
my $args_callback = sub {
my( $cgi, $object ) = @_;