summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-select-cust_location.html
diff options
context:
space:
mode:
authorivan <ivan>2010-03-12 21:29:04 +0000
committerivan <ivan>2010-03-12 21:29:04 +0000
commitf433b4f187e484e8c40bdcebbeb5a5d51b3ae38e (patch)
tree6597ace03fadaa451eaceca9c986e40ebfe6bcc8 /httemplate/elements/tr-select-cust_location.html
parent02348fb69ac302f117ca8b510b68871eff25d4c6 (diff)
finishing e911/svc_phone location, RT#7047
Diffstat (limited to 'httemplate/elements/tr-select-cust_location.html')
-rw-r--r--httemplate/elements/tr-select-cust_location.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/httemplate/elements/tr-select-cust_location.html b/httemplate/elements/tr-select-cust_location.html
index f26649763..f06ea0ffe 100644
--- a/httemplate/elements/tr-select-cust_location.html
+++ b/httemplate/elements/tr-select-cust_location.html
@@ -187,6 +187,7 @@ my $statedefault = $conf->config('statedefault')
my %opt = @_;
my $cgi = $opt{'cgi'};
+my $cust_pkg = $opt{'cust_pkg'};
my $cust_main = $opt{'cust_main'};
my $prospect_main = $opt{'prospect_main'};
@@ -213,6 +214,10 @@ if ( $locationnum && $locationnum != -1 ) {
$cust_location = new FS::cust_location;
if ( $locationnum == -1 ) {
$cust_location->$_( $cgi->param($_) ) foreach @location_fields;
+ } elsif ( $cust_pkg && $cust_pkg->locationnum ) {
+ my $pkg_location = $cust_pkg->cust_location;
+ $cust_location->$_( $pkg_location->$_ ) foreach @location_fields;
+ $opt{'empty_label'} ||= 'package address: '.$pkg_location->line;
} elsif ( $cust_main ) {
$cust_location->$_( $cust_main->get($prefix.$_) ) foreach @location_fields;
}