[freeside-commits] freeside/httemplate/elements tr-select-cust_location.html, 1.4.4.1, 1.4.4.2

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


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

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	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.4.4.1
retrieving revision 1.4.4.2
diff -u -w -d -r1.4.4.1 -r1.4.4.2
--- tr-select-cust_location.html	12 Mar 2010 03:36:47 -0000	1.4.4.1
+++ tr-select-cust_location.html	12 Mar 2010 21:29:16 -0000	1.4.4.2
@@ -157,6 +157,7 @@
 
 my %opt = @_;
 my $cgi       = $opt{'cgi'};
+my $cust_pkg  = $opt{'cust_pkg'};
 my $cust_main = $opt{'cust_main'};
 
 my $prefix = length($cust_main->ship_last) ? 'ship_' : '';
@@ -171,6 +172,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;
   } else {
     $cust_location->$_( $cust_main->get($prefix.$_) ) foreach @location_fields;
   }



More information about the freeside-commits mailing list