X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fcust_main.cgi;h=74f8f2382db57f93d1d7994280d8a6efab560267;hp=99c7f90b82a4aded77d8008b0980531818e6d753;hb=ecf1c9cc0a20be6e489657e005ea771977b9f69c;hpb=dbc85ed7e7020bd91f63cdb58039731e2abe44ca diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 99c7f90b8..74f8f2382 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -1,5 +1,15 @@ % if ( $error ) { % $cgi->param('error', $error); +% # workaround for create_uri_query's mangling of unicode characters, +% # false laziness with FS::Record::ut_coord +% use charnames ':full'; +% for my $pre (qw(bill ship)) { +% foreach (qw( latitude longitude)) { +% my $coord = $cgi->param($pre.'_'.$_); +% $coord =~ s/\N{DEGREE SIGN}\s*$//; +% $cgi->param($pre.'_'.$_, $coord); +% } +% } % my $query = $m->scomp('/elements/create_uri_query', 'secure'=>1); <% $cgi->redirect(popurl(2). "cust_main.cgi?$query" ) %> % @@ -188,6 +198,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 ) {