X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_location.pm;h=90400984ce43e8aa683083971124650f7bb0a466;hb=c22d84e565ab16db142395dce2e8621624eff140;hp=f38e8efcd01db75d7d23d7479c3d443af3e5f0ce;hpb=46fe3dbcb3ca97d1f3c70d49351846cf0ab6461d;p=freeside.git diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm index f38e8efcd..90400984c 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 @@ -720,9 +722,12 @@ sub label_prefix { } elsif ( $label_prefix eq '_location' && $self->locationname ) { $prefix = $self->locationname; - } elsif ( ( $opt{'cust_main'} || $self->custnum ) - && $self->locationnum == $cust_or_prospect->ship_locationnum ) { - $prefix = 'Default service location'; + #} elsif ( ( $opt{'cust_main'} || $self->custnum ) + # && $self->locationnum == $cust_or_prospect->ship_locationnum ) { + # $prefix = 'Default service location'; + #} + } else { + $prefix = ''; } $prefix;