[freeside-commits] branch FREESIDE_3_BRANCH updated. 0bdda5e655c5c9464c912b4f72b1b173c3878d72
Ivan
ivan at 420.am
Mon Apr 25 17:42:02 PDT 2016
The branch, FREESIDE_3_BRANCH has been updated
via 0bdda5e655c5c9464c912b4f72b1b173c3878d72 (commit)
from e3ceac324435da66323d6e58b46ed86cf2bf0b90 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0bdda5e655c5c9464c912b4f72b1b173c3878d72
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Apr 25 17:42:01 2016 -0700
fix cust_main-require_address2 vs cust_location, RT#41184
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 6042cae..1097ef4 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -3498,7 +3498,7 @@ and customer address. Include units.',
{
'key' => 'cust_main-require_address2',
'section' => 'UI',
- 'description' => 'Second address field is required (on service address only, if billing and service addresses differ). Also enables "Unit" labeling of address2 on customer view and edit pages. Useful for multi-tenant applications. See also: address2-search',
+ 'description' => 'Second address field is required. Also enables "Unit" labeling of address2 on customer view and edit pages. Useful for multi-tenant applications. See also: address2-search', # service address only part not working in the modern world, see #41184 (on service address only, if billing and service addresses differ)
'type' => 'checkbox',
},
diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm
index 818838e..cbb4565 100644
--- a/FS/FS/cust_location.pm
+++ b/FS/FS/cust_location.pm
@@ -375,10 +375,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
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Conf.pm | 2 +-
FS/FS/cust_location.pm | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list