[freeside-commits] branch FREESIDE_4_BRANCH updated. 84c4fc3031832fa54473cc938c6254b045d8a78c

Ivan ivan at 420.am
Tue Aug 29 11:33:17 PDT 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  84c4fc3031832fa54473cc938c6254b045d8a78c (commit)
      from  3815278f7a84ea2a9672a0356d685a2ed57667ee (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 84c4fc3031832fa54473cc938c6254b045d8a78c
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Aug 29 11:33:16 2017 -0700

    quick script to add armed forces USPS "state" abbrivations, RT#77312

diff --git a/bin/add-usps-af b/bin/add-usps-af
new file mode 100755
index 0000000..5aec110
--- /dev/null
+++ b/bin/add-usps-af
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use FS::UID qw( adminsuidsetup );
+use FS::Setup;
+
+adminsuidsetup(shift) or die "usage: add-usps-af username\n";
+
+  my %addl = (
+    'US' => {
+#      'FM' => 'Federated States of Micronesia',
+#      'MH' => 'Marshall Islands',
+#      'PW' => 'Palau',
+      'AA' => "Armed Forces Americas (except Canada)",
+      'AE' => "Armed Forces Europe / Canada / Middle East / Africa",
+      'AP' => "Armed Forces Pacific",
+    },
+  );
+
+  foreach my $country ( keys %addl ) {
+    foreach my $state ( keys %{ $addl{$country} } ) {
+      # $longname = $addl{$country}{$state};
+      FS::Setup::_add_locale( 'country'=>$country, 'state'=>$state);
+    }
+  }
+
+1;
+

-----------------------------------------------------------------------

Summary of changes:
 bin/add-usps-af |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100755 bin/add-usps-af




More information about the freeside-commits mailing list