[freeside-commits] freeside/httemplate/elements tr-select-cust_location.html, 1.7, 1.8

Ivan,,, ivan at wavetail.420.am
Fri Mar 12 13:29:06 PST 2010


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv17695/httemplate/elements

Modified Files:
	tr-select-cust_location.html 
Log Message:
finishing e911/svc_phone location, RT#7047

Index: tr-select-cust_location.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-select-cust_location.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- tr-select-cust_location.html	12 Mar 2010 03:36:36 -0000	1.7
+++ tr-select-cust_location.html	12 Mar 2010 21:29:04 -0000	1.8
@@ -187,6 +187,7 @@
 
 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 @@
   $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;
   }



More information about the freeside-commits mailing list