diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-04-25 17:41:59 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-04-25 17:41:59 -0700 |
commit | 2c8cfec03cf66102f7a182d0bb6bd04e2628dc6d (patch) | |
tree | cd41060ec6d2769082589f1b52884c0788c50491 /FS/FS/cust_location.pm | |
parent | 5c756345550e03e47740545c46fb93a2aad1d631 (diff) |
fix cust_main-require_address2 vs cust_location, RT#41184
Diffstat (limited to 'FS/FS/cust_location.pm')
-rw-r--r-- | FS/FS/cust_location.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm index f38e8ef..0dec065 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 |