From: ivan Date: Wed, 25 Feb 2009 20:05:42 +0000 (+0000) Subject: adding quick tool to change the "states" for japan X-Git-Tag: root_of_webpay_support~11 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=dae72a4ab1dc0a1afaf8d4f2debb509ade36233c adding quick tool to change the "states" for japan --- diff --git a/bin/japan.pl b/bin/japan.pl new file mode 100755 index 000000000..14e44e4ec --- /dev/null +++ b/bin/japan.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +use FS::UID qw( adminsuidsetup ); +use FS::Record qw( qsearch ); +use FS::cust_main_county; + +adminsuidsetup shift; + +my $country = 'JP'; + +foreach my $cust_main_county ( + qsearch('cust_main_county', { 'country' => $country } ) +) { + + if ( $cust_main_county->state =~ /\[([\w ]+)\]\s*$/ ) { + $cust_main_county->state($1); + my $error = $cust_main_county->replace; + die $error if $error; + } + +} + + +#use Locale::SubCountry; +# +##my $state = 'Tôkyô [Tokyo]'; +#my $state = 'Tottori'; +# +#my $lsc = new Locale::SubCountry 'JP'; +# +#print $lsc->code($state)."\n"; +