diff options
author | ivan <ivan> | 2011-12-13 05:09:32 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-12-13 05:09:32 +0000 |
commit | 8cbe016ac2c28cd209c48f053f361573368e7988 (patch) | |
tree | 5a39513e71f4e9528f71fa298c2abf8b8dbd07db /FS/FS/cust_location.pm | |
parent | ea1b65c11b8781160b5a76a77e1ee8108e528048 (diff) |
add latitude/longitude to prospects, customers and package locations, RT#15539
Diffstat (limited to 'FS/FS/cust_location.pm')
-rw-r--r-- | FS/FS/cust_location.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm index 7ffa5ed..a3d5bcb 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; |