add cust_main.mobile and ship_mobile to support uniserve portal, RT#13656
[freeside.git] / httemplate / view / cust_main / contacts.html
index 0b754d0..14cd918 100644 (file)
@@ -1,6 +1,6 @@
 % my %which = (
-%   ''      => mt('Billing'),
-%   'ship_' => mt('Service'),
+%   ''      => emt('Billing'),
+%   'ship_' => emt('Service'),
 % );
 % foreach my $which ( '', 'ship_' ) {
 %   my $pre = $cust_main->get("${which}last") ? $which : '';
     <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") |h %>
   </TD>
 % if ( $which eq '' && $conf->exists('show_ss') ) { 
-    <TD ALIGN="right">SS#</TD>
+    <TD ALIGN="right"><% mt('SS#') |h %></TD>
     <TD BGCOLOR="#ffffff"><% $cust_main->masked('ss') || '&nbsp' %></TD>
 % } 
 </TR>
+% if ( $conf->exists('cust-email-high-visibility') && $which eq '') {
+<TR>
+  <TD ALIGN="right"><% mt('Email invoices') |h %></TD>
+  <TD BGCOLOR="#ffff00">
+    <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %>
+  </TD>
+</TR>
+% }
 <TR>
   <TD ALIGN="right"><% mt('Company') |h %></TD>
   <TD COLSPAN=7 BGCOLOR="#ffffff"><% $cust_main->get("${pre}company") |h %></TD>
@@ -31,7 +39,7 @@
 %     ( $conf->exists('cust_main-require_address2')
 %       && ! ( $pre xor $cust_main->has_ship_address )
 %     )
-%       ? mt('Unit #')
+%       ? emt('Unit #')
 %       : ' ';
 
   <TR>
   </TD>
 </TR>
 <TR>
+  <TD ALIGN="right"><% $mobile_label %></TD>
+  <TD COLSPAN=3 BGCOLOR="#ffffff">
+    <& /elements/phonenumber.html,
+                  $cust_main->get("${pre}mobile"),
+                  'callable'=>1
+    &>
+  </TD>
+</TR>
+<TR>
   <TD ALIGN="right"><% mt('Fax') |h %></TD>
   <TD COLSPAN=3 BGCOLOR="#ffffff">
     <% $cust_main->get("${pre}fax") || '&nbsp' %>
 my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
                       ? 'Day&nbsp;Phone'
                       : FS::Msgcat::_gettext('daytime');
-my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
+my $night_label   = FS::Msgcat::_gettext('night') =~ /^(night)?$/
                       ? 'Night&nbsp;Phone'
                       : FS::Msgcat::_gettext('night');
+my $mobile_label = FS::Msgcat::_gettext('mobile') =~ /^(mobile)?$/
+                      ? 'Mobile&nbsp;Phone'
+                      : FS::Msgcat::_gettext('Mobile');
+
 my $stateid_label = FS::Msgcat::_gettext('stateid') =~ /^(stateid)?$/
                       ? 'Driver&rsquo;s&nbsp;License'
                       : FS::Msgcat::_gettext('stateid');
@@ -115,6 +136,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');
 
 </%init>