X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Flocations.html;h=0a2e5ec2c72c351e9dd7f374ccba3013418f9b03;hb=58cdf1b78c0cd419eacf7db8661564af050e0f12;hp=689c9a390f6ede2e93d6a0c168c88b5ee5fb9a7a;hpb=1daf1a670d3cdfb307271fb7c7c98c83fb1fb464;p=freeside.git diff --git a/httemplate/view/cust_main/locations.html b/httemplate/view/cust_main/locations.html index 689c9a390..0a2e5ec2c 100755 --- a/httemplate/view/cust_main/locations.html +++ b/httemplate/view/cust_main/locations.html @@ -1,42 +1,66 @@ % foreach my $locationnum (@sorted) { % my $packages = $packages_in{$locationnum}; % my $loc = $locations{$locationnum}; % next if $loc->disabled and scalar(@$packages) == 0; - + + % if (@$packages) { -<& packages/section.html, 'packages' => $packages, 'cust_main' => $cust_main &> +% my %sopt = %opt; +% $sopt{'packages'} = $packages; + <& packages/section.html, %sopt &> % }
- -% if ( $loc->disabled ) { - +
+
+<% $loc->location_label %> +% if ( $loc->country eq 'US' ) { # only U.S. census tracts for now +% if ( $loc->censustract ) { +
+ + <% $loc->censustract %> (<% $loc->censusyear %> census) + +% } elsif ( $conf->exists('cust_main-require_censustract') ) { +
+ + <% emt('Census tract unknown') %> + +% } % } -<% $loc->location_label %> - -% if ( $locationnum and !$loc->disabled ) { +
+
+% if ( $locationnum && !$loc->disabled && ! $opt{no_links} ) { <% edit_location_link($locationnum) %> % } -% if ( $locationnum and !$loc->disabled and !$active{$locationnum} ) { +% if ( $locationnum && !$loc->disabled && !$active{$locationnum} && ! $opt{no_links} ) {  <% disable_location_link($locationnum) %> % } -

% } #foreach $locationnum @@ -44,6 +68,7 @@ STYLE="padding-bottom: 0px; my %opt = @_; my $cust_main = $opt{'cust_main'}; my $all_packages = $opt{'packages'}; +my $conf = FS::Conf->new; my %locations = map { $_->locationnum => $_ } qsearch({ 'table' => 'cust_location',