X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fedit%2Fprocess%2Fprospect_main.html;h=b2ae88eba9973a777c643bc60608d18b55832d2f;hb=84bc64eeaa9650333fbbb79ecb03a1aff4a347fd;hp=ca4dfabfe617738b46820f6ed09c7e1d4e1d99c0;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/httemplate/edit/process/prospect_main.html b/httemplate/edit/process/prospect_main.html index ca4dfabfe..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 ) = @_; @@ -22,7 +33,10 @@ my $args_callback = sub { my $cust_location = new FS::cust_location { map { $_ => scalar($cgi->param($_)) } - qw( address1 address2 city county state zip country ) + qw( address1 address2 city county state zip country + latitude longitude + location_kind location_type location_number + ) }; $cust_location->locationnum($locationnum) unless $locationnum == -1; @@ -31,7 +45,7 @@ my $args_callback = sub { }; -my @contact_fields = qw( first last title comment emailaddress ); +my @contact_fields = qw( classnum first last title comment emailaddress ); foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) { push @contact_fields, 'phonetypenum'.$phone_type->phonetypenum; }