Merge branch 'master' of ssh://git.freeside.biz/home/git/freeside
[freeside.git] / httemplate / misc / detach_pkg.html
index 64b3e6e..dc23291 100755 (executable)
@@ -1,7 +1,5 @@
 <& /elements/header-popup.html, mt("Detach Package to New Customer") &>
 
-<SCRIPT TYPE="text/javascript" SRC="../elements/order_pkg.js"></SCRIPT>
-
 <& /elements/error.html &>
 
 <FORM NAME="OrderPkgForm" ACTION="<% $p %>edit/process/detach-cust_pkg.html" METHOD=POST>
@@ -30,7 +28,7 @@
     <INPUT TYPE="hidden" NAME="last"  VALUE="<% $cust_contact->get('last')  |h %>">
 
     <TR>
-      <TH ALIGN="right"><% mt('Name') %></TH>
+      <TH ALIGN="right"><% emt('Name') %></TH>
       <TD COLSPAN=7 BGCOLOR="#dddddd">
         <% $cust_pkg->contact_obj->line |h %>
       </TD>
@@ -38,7 +36,7 @@
 % #}
 
   <TR>
-    <TH ALIGN="right" VALIGN="top"><% mt('Address') %></TH>
+    <TH ALIGN="right" VALIGN="top"><% emt('Address') %></TH>
     <TD COLSPAN=7 BGCOLOR="#dddddd">
 
       <% $loc->location_label( 'join_string'     => '<BR>',
     </TD>
   </TR>
 
+%  if ( $conf->config_bool('cust_main-require_phone') ) {
+%    #XXX should be sticky on errors
+%    my $ph_cust_main = FS::cust_main->new({});
+%    foreach my $contact_phone ( $cust_contact->contact_phone ) {
+%      my $t = $contact_phone->typename;
+%      #countrycodes?  interface doesn't parse/take em yet
+%      $ph_cust_main->daytime( $contact_phone->phonenum ) if $t eq 'Work';
+%      $ph_cust_main->night(   $contact_phone->phonenum ) if $t eq 'Home';
+%      $ph_cust_main->mobile(  $contact_phone->phonenum ) if $t eq 'Mobile';
+%      $ph_cust_main->fax(     $contact_phone->phonenum ) if $t eq 'Fax';
+%    }
+
+     <& /elements/tr-cust_main-phones.html,
+          'cust_main'    => $ph_cust_main,
+     &>
+%  }
+
 </TABLE>
 
-%#XXX payment info
+%#payment info
 %#XXX should be sticky on errors...
 <& /edit/cust_main/billing.html, FS::cust_main->new({}),
                                  invoicing_list => [],