X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_location.pm;h=a3d5bcb3ecf0376ed5f96e2d2ec78c56f3f8244f;hp=7ffa5ed411263e353c19b993d92498212b55e68c;hb=aed8ec35ccb9cdeb7ea0cb6ff2946f9d83d582f6;hpb=3dfc446d8a4d241787c47ff7e2db72483d62ab7a diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm index 7ffa5ed41..a3d5bcb3e 100644 --- a/FS/FS/cust_location.pm +++ b/FS/FS/cust_location.pm @@ -135,6 +135,9 @@ sub check { || $self->ut_textn('state') || $self->ut_country('country') || $self->ut_zip('zip', $self->country) + || $self->ut_coordn('latitude') + || $self->ut_coordn('longitude') + || $self->ut_enum('coord_auto', [ '', 'Y' ]) || $self->ut_alphan('location_type') || $self->ut_textn('location_number') || $self->ut_enum('location_kind', [ '', 'R', 'B' ] ) @@ -142,6 +145,9 @@ sub check { ; return $error if $error; + $self->set_coord + unless $self->latitude && $self->longitude; + return "No prospect or customer!" unless $self->prospectnum || $self->custnum; return "Prospect and customer!" if $self->prospectnum && $self->custnum;