new zealand toll-free, RT#29638
authorIvan Kohler <ivan@freeside.biz>
Sun, 29 Jun 2014 06:40:26 +0000 (23:40 -0700)
committerIvan Kohler <ivan@freeside.biz>
Sun, 29 Jun 2014 06:40:26 +0000 (23:40 -0700)
FS/FS/Conf.pm
FS/FS/cdr.pm

index 54a9ca3..fba20fa 100644 (file)
@@ -5755,6 +5755,7 @@ and customer address. Include units.',
     'type'        => 'select',
     'select_hash' => [ ''   => 'NANPA (US/Canada)',
                        'AU' => 'Australia',
+                       'NZ' => 'New Zealand',
                      ],
   },
 
index cced0eb..cd14165 100644 (file)
@@ -370,6 +370,8 @@ sub is_tollfree {
   my $field = scalar(@_) ? shift : 'dst';
   my $country = $conf->config('tollfree-country');
   if ( $country eq 'AU' ) { 
+    ( $self->$field() =~ /^(\+?61)?1800/ ) ? 1 : 0;
+  } elsif ( $country eq 'NZ' ) { 
     ( $self->$field() =~ /^(\+?64)?(800|508)/ ) ? 1 : 0;
   } else { #NANPA (US/Canaada)
     ( $self->$field() =~ /^(\+?1)?8(8|([02-7])\3)/ ) ? 1 : 0;