X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_location.pm;h=0dec065e6a8863f63bf20633c7f64b8a35de1376;hb=5c1f29673647a123c6ccb0e999676f286ce0b9f6;hp=3588cee97bb31074b02862ea657536cf1479d5ce;hpb=9e069687732191fedeaed8ade62e4db2886429c0;p=freeside.git diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm index 3588cee97..0dec065e6 100644 --- a/FS/FS/cust_location.pm +++ b/FS/FS/cust_location.pm @@ -381,10 +381,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 @@ -728,7 +730,7 @@ sub label_prefix { $prefix; } -=item county_state_county +=item county_state_country Returns a string consisting of just the county, state and country.