X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_location.pm;h=b25163f36d814b66054a00da439a03b992f06ef6;hb=821f900c5a594cdf3cff082e5d527eade23f2e18;hp=1521960d4a18082ebbc5074eb4af51f91c130b09;hpb=468c9e660eb0edb2033f0f8dbb4458f20280082c;p=freeside.git diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm index 1521960d4..b25163f36 100644 --- a/FS/FS/cust_location.pm +++ b/FS/FS/cust_location.pm @@ -324,6 +324,9 @@ sub move_to { my $dbh = dbh; my $error = ''; + # prevent this from failing because of pkg_svc quantity limits + local( $FS::cust_svc::ignore_quantity ) = 1; + if ( !$new->locationnum ) { $error = $new->insert; if ( $error ) { @@ -476,6 +479,20 @@ sub location_label { $prefix . $self->SUPER::location_label(%opt); } +=item county_state_county + +Returns a string consisting of just the county, state and country. + +=cut + +sub county_state_country { + my $self = shift; + my $label = $self->country; + $label = $self->state.", $label" if $self->state; + $label = $self->county." County, $label" if $self->county; + $label; +} + =back =head1 CLASS METHODS