X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fcontacts.html;h=3d4043aff1d7b37b0e50f25eecd5d86169305a22;hb=8cbe016ac2c28cd209c48f053f361573368e7988;hp=22594c5e271ba217f2d86181eb12faf179ceba22;hpb=51bf0e9b404cd6e4ae84435230447619269f77c0;p=freeside.git diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index 22594c5e2..3d4043aff 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -1,76 +1,110 @@ % my %which = ( -% '' => 'Billing', -% 'ship_' => 'Service', +% '' => emt('Billing'), +% 'ship_' => emt('Service'), % ); % foreach my $which ( '', 'ship_' ) { % my $pre = $cust_main->get("${which}last") ? $which : ''; -<% $which{$which} %> address +<% $which{$which} %> <% mt('address') |h %> <% ntable("#cccccc") %><% ntable("#cccccc",2) %> - Contact name + <% mt('Contact name') |h %> - <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") %> + <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %> % if ( $which eq '' && $conf->exists('show_ss') ) { - SS# + <% mt('SS#') |h %> <% $cust_main->masked('ss') || ' ' %> % } +% if ( $conf->exists('cust-email-high-visibility') && $which eq '') { - Company - <% $cust_main->get("${pre}company") %> + <% mt('Email invoices') |h %> + + <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %> + +% } - Address - <% $cust_main->get("${pre}address1") %> + <% mt('Company') |h %> + <% $cust_main->get("${pre}company") |h %> -% if ( $cust_main->get("${pre}address2") ) { - -   - <% $cust_main->get("${pre}address2") %> + <% mt('Address') |h %> + <% $cust_main->get("${pre}address1") |h %> + +% if ( $cust_main->get("${pre}address2") ) { +% my $address2_label = +% ( $conf->exists('cust_main-require_address2') +% && ! ( $pre xor $cust_main->has_ship_address ) +% ) +% ? emt('Unit #') +% : ' '; + + + <% $address2_label %> + <% $cust_main->get("${pre}address2") |h %> + + % } - City - <% $cust_main->get("${pre}city") %> + <% mt('City') |h %> + <% $cust_main->get("${pre}city") |h %> % if ( $cust_main->get("${pre}county") ) { - County - <% $cust_main->get("${pre}county") %> + <% mt('County') |h %> + <% $cust_main->get("${pre}county") |h %> % } - State - <% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) %> - Zip + <% mt('State') |h %> + <% state_label( $cust_main->get("${pre}state"), $cust_main->get("${pre}country") ) |h %> + <% mt('Zip') |h %> <% $cust_main->get("${pre}zip") %> - Country + <% mt('Country') |h %> <% code2country( $cust_main->get("${pre}country") ) %> + +% if ( $cust_main->get($pre.'latitude') && $cust_main->get($pre.'longitude') ) { + <& /elements/tr-coords.html, $cust_main->get($pre.'latitude'), + $cust_main->get($pre.'longitude'), + $cust_main->name_short, + &> +% } + <% $daytime_label %> - <% include('/elements/phonenumber.html', + <& /elements/phonenumber.html, $cust_main->get("${pre}daytime"), - 'callable'=>1 - ) - %> + 'callable'=>1, + 'calling_list_exempt'=>$cust_main->calling_list_exempt, + &> <% $night_label %> - <% include('/elements/phonenumber.html', + <& /elements/phonenumber.html, $cust_main->get("${pre}night"), - 'callable'=>1 - ) - %> + 'callable'=>1, + 'calling_list_exempt'=>$cust_main->calling_list_exempt, + &> - Fax + <% $mobile_label %> + + <& /elements/phonenumber.html, + $cust_main->get("${pre}mobile"), + 'callable'=>1, + 'calling_list_exempt'=>$cust_main->calling_list_exempt, + &> + + + + <% mt('Fax') |h %> <% $cust_main->get("${pre}fax") || ' ' %> @@ -88,15 +122,19 @@
% } % } - +<& contacts_new.html, $cust_main &> <%once> my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/ ? 'Day Phone' : FS::Msgcat::_gettext('daytime'); -my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/ +my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/ ? 'Night Phone' : FS::Msgcat::_gettext('night'); +my $mobile_label = FS::Msgcat::_gettext('mobile') =~ /^(mobile)?$/ + ? 'Mobile Phone' + : FS::Msgcat::_gettext('Mobile'); + my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/ ? 'Driver’s License' : FS::Msgcat::_gettext('stateid'); @@ -109,6 +147,8 @@ my $stateid_state_label = FS::Msgcat::_gettext('stateid_state') =~ /^(stateid_st my( $cust_main ) = @_; my $conf = new FS::Conf; +my @invoicing_list = $cust_main->invoicing_list; +my $no = emt('no');