% 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" ) %>
%
my %locations;
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 %hash;
foreach ( FS::cust_main->location_fields ) {
$hash{$_} = scalar($cgi->param($pre.'_'.$_));
$new->setfield('credit_limit', '');
}
-$new->tagnum( [ $cgi->param('tagnum') ] );
+#$new->tagnum( [ $cgi->param('tagnum') ] );
+my $params = $cgi->Vars;
+$new->tagnum( [
+ map { /^tagnum(\d+)/ && $1 }
+ grep { /^tagnum(\d+)/ && $cgi->param($_) } keys %$params
+] );
$error ||= $new->set_national_id_from_cgi( $cgi );