[freeside-commits] branch FREESIDE_4_BRANCH updated. 226974d51b200d3881ef8718c87f2faad2c10c97

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


The branch, FREESIDE_4_BRANCH has been updated
       via  226974d51b200d3881ef8718c87f2faad2c10c97 (commit)
      from  4f010c8c1b354eee79db1ff628eb2a1ef9274d2e (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 226974d51b200d3881ef8718c87f2faad2c10c97
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue May 30 14:59:16 2017 -0700

    check AU postal codes, RT#75998

diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index cea3285..dd26ea9 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -3058,6 +3058,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