X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_location.pm;h=cbb4565b7f518abdd56b2cec6dafb079056ec242;hp=818838e58f81bfab18f9debbe595d707b009b9e1;hb=0bdda5e655c5c9464c912b4f72b1b173c3878d72;hpb=e3ceac324435da66323d6e58b46ed86cf2bf0b90

diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm
index 818838e58..cbb4565b7 100644
--- a/FS/FS/cust_location.pm
+++ b/FS/FS/cust_location.pm
@@ -375,10 +375,12 @@ sub check {
     $self->censustract("$1.$2");
   }
 
-  if ( $conf->exists('cust_main-require_address2') and 
-       !$self->ship_address2 =~ /\S/ ) {
-    return "Unit # is required";
-  }
+  #yikes... this is ancient, pre-dates cust_location and will be harder to
+  # implement now... how do we know this location is a service location from
+  # here and not a billing? we can't just check locationnums, we might be new :/
+  return "Unit # is required"
+    if $conf->exists('cust_main-require_address2')
+    && ! $self->address2 =~ /\S/;
 
   # tricky...we have to allow for the customer to not be inserted yet
   return "No prospect or customer!" unless $self->prospectnum