From: Mark Wells Date: Thu, 13 Jun 2013 17:49:10 +0000 (-0700) Subject: allow invalid locations to be disabled anyway, #23446 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=e5002a24fee7e476cbb3d8d916c8d87ddfc12093 allow invalid locations to be disabled anyway, #23446 --- diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm index a834859ba..b98ade157 100644 --- a/FS/FS/cust_location.pm +++ b/FS/FS/cust_location.pm @@ -257,12 +257,12 @@ and replace methods. =cut -#some false laziness w/cust_main, but since it should eventually lose these -#fields anyway... sub check { my $self = shift; my $conf = new FS::Conf; + return '' if $self->disabled; # so that disabling locations never fails + my $error = $self->ut_numbern('locationnum') || $self->ut_foreign_keyn('prospectnum', 'prospect_main', 'prospectnum')