[freeside-commits] freeside/httemplate/view/cust_main/packages location.html, 1.4, 1.5

Ivan,,, ivan at wavetail.420.am
Sun Jan 18 22:36:27 PST 2009


Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages
In directory wavetail.420.am:/tmp/cvs-serv25806/httemplate/view/cust_main/packages

Modified Files:
	location.html 
Log Message:
default service location is cust_main ship_ address when present!  RT#4499

Index: location.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages/location.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- location.html	18 Jan 2009 23:43:40 -0000	1.4
+++ location.html	19 Jan 2009 06:36:25 -0000	1.5
@@ -4,17 +4,17 @@
   <I><FONT SIZE=-1>(default service address)</FONT><BR>
 % }
 
-  <% $loc->address1 |h %><BR>
+  <% $loc->get($prefix.'address1') |h %><BR>
 
-% if ( $loc->address2 !~ /^\s*$/ ) {
-    <% $loc->address2 |h %><BR>
+% if ( $loc->get($prefix.'address2') !~ /^\s*$/ ) {
+    <% $loc->get($prefix.'address2') |h %><BR>
 % }
 
-  <% $loc->city |h %><% $loc->county ? ' ('.$loc->county.' county)' : '' |h %>,
-  <% $loc->state |h %> &nbsp; <% $loc->zip |h %><BR>
+  <% $loc->get($prefix.'city') |h %><% $loc->get($prefix.'county') ? ' ('.$loc->get($prefix.'county').' county)' : '' |h %>,
+  <% $loc->get($prefix.'state') |h %> &nbsp; <% $loc->get($prefix.'zip') |h %><BR>
 
-% if ( $loc->country ne $countrydefault ) {
-  <% code2country( $loc->country ) %>
+% if ( $loc->get($prefix.'country') ne $countrydefault ) {
+  <% code2country( $loc->get($prefix.'country') ) %>
 % }
 
   </I>
@@ -44,6 +44,8 @@
                      || ($countrydefault eq 'US' ? 'CA' : '');
 
 my $loc = $cust_pkg->cust_location_or_main;
+my $prefix =
+  ( $loc->table eq 'cust_main' && length($loc->ship_last) ) ? 'ship_' : ''; #doh
 
 sub pkg_change_location_link {
   my $cust_pkg = shift;



More information about the freeside-commits mailing list