projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
363d253
)
allow invalid locations to be disabled anyway, #23446
author
Mark Wells
<mark@freeside.biz>
Thu, 13 Jun 2013 17:48:38 +0000
(10:48 -0700)
committer
Mark Wells
<mark@freeside.biz>
Thu, 13 Jun 2013 17:48:38 +0000
(10:48 -0700)
FS/FS/cust_location.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_location.pm
b/FS/FS/cust_location.pm
index
a834859
..
b98ade1
100644
(file)
--- a/
FS/FS/cust_location.pm
+++ b/
FS/FS/cust_location.pm
@@
-257,12
+257,12
@@
and replace methods.
=cut
=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;
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')
my $error =
$self->ut_numbern('locationnum')
|| $self->ut_foreign_keyn('prospectnum', 'prospect_main', 'prospectnum')