From 56e92333570e8b1bb6afb7374e9624b76946c749 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Mon, 3 Sep 2012 15:39:51 -0700 Subject: [PATCH] display service address when it's the same as billing, #18949 / #940 --- httemplate/view/cust_main/contacts.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index 9c6069182..d65af669a 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -1,13 +1,18 @@ % my %addr_label = ('bill' => 'Billing address', 'ship' => 'Service address'); %# Locations (possibly break this out) -% my @which = ('bill'); -% push @which, 'ship' if $cust_main->has_ship_address; +% my @which = ('bill', 'ship'); % while (@which) { % my $this = shift @which; % my $method = $this.'_location'; % my $location = $cust_main->$method; -<% mt( $addr_label{$this} ) |h %> +<% mt( $addr_label{$this} ) |h %> +% if ( $this eq 'ship' and +% $cust_main->bill_locationnum == $cust_main->ship_locationnum ) +% { + (<% mt('same as billing') %>) +% } + % if ( $this eq 'bill' ) { -- 2.11.0