[freeside-commits] branch master updated. 38539c1c58d0907beee56c4d16f39bdebc6b03ad

Ivan ivan at 420.am
Tue May 30 14:59:15 PDT 2017


The branch, master has been updated
       via  38539c1c58d0907beee56c4d16f39bdebc6b03ad (commit)
      from  43ae6a5c70c3efdf51cebb259e1c37c3111ff0c0 (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 38539c1c58d0907beee56c4d16f39bdebc6b03ad
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue May 30 14:59:14 2017 -0700

    check AU postal codes, RT#75998

diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index c3d3973..92e0baa 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -3062,6 +3062,13 @@ sub ut_zip {
                 $self->getfield($field);
     $self->setfield($field, "$1 $2");
 
+  } elsif ( $country eq 'AU' ) {
+
+    $self->getfield($field) =~ /^\s*(\d{4})\s*$/
+      or return gettext('illegal_zip'). " $field for country $country: ".
+                $self->getfield($field);
+    $self->setfield($field, $1);
+
   } else {
 
     if ( $self->getfield($field) =~ /^\s*$/

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

Summary of changes:
 FS/FS/Record.pm |    7 +++++++
 1 file changed, 7 insertions(+)




More information about the freeside-commits mailing list