X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main.cgi;h=b6f6b0dea92464759802e01455adeac59d1c8291;hb=7e02bdd1d34068129b9f63970f59e9f6562a105a;hp=353ae1799bac99e5b35353e0d6b5ed82b34fd624;hpb=d353c1f9bbfee93e96219851af27a78f56837c50;p=freeside.git
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index 353ae1799..b6f6b0dea 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -1,8 +1,4 @@
-<& /elements/header.html,
- $title,
- '',
- ' onUnload="myclose()"' #hmm, in billing.html
-&>
+<& /elements/header.html, $title, &>
<& /elements/error.html &>
@@ -60,7 +56,7 @@
-
|
+ |
<% mt('Service address') |h %>
@@ -82,6 +78,19 @@
enable_district => 1,
enable_coords => 1,
&>
+% unless ($conf->exists('invoice-ship_address')) { #it's always on, so hide per-cust config
+ |
+ |
+
+ <% include('/elements/checkbox.html',
+ 'field' => 'invoice_ship_address',
+ 'value' => 'Y',
+ 'curr_value' => $cust_main->invoice_ship_address,
+ 'postfix' => emt('included on invoices'),
+ ) %>
+ |
+
+% }
@@ -105,16 +114,13 @@ function samechanged(what) {
-<& cust_main/contacts_new.html,
- 'cust_main' => $cust_main,
-&>
+<& cust_main/contacts_new.html, 'cust_main'=>$cust_main, &>
%# billing info
<& cust_main/billing.html, $cust_main,
'payinfo' => $payinfo,
'invoicing_list' => \@invoicing_list,
&>
-
% my $ro_comments = $conf->exists('cust_main-use_comments')?'':'readonly';
% if (!$ro_comments || $cust_main->comments) {
@@ -156,18 +162,6 @@ function samechanged(what) {
-%# cust_main/bottomfixup.js
-% foreach my $hidden (
-% 'payauto', 'billday',
-% 'payinfo', 'payinfo1', 'payinfo2', 'payinfo3', 'paytype',
-% 'payname', 'paystate', 'exp_month', 'exp_year', 'paycvv',
-% 'paystart_month', 'paystart_year', 'payissue',
-% 'payip',
-% 'paid',
-% ) {
-
-% }
-
<& cust_main/bottomfixup.html, 'custnum' => $custnum &>
@@ -325,8 +319,8 @@ if ( $cgi->param('error') ) {
$cust_main->company( $prospect_main->company );
#first contact? -> name
- my @contacts = $prospect_main->contact;
- my $contact = $contacts[0];
+ my @prospect_contacts = $prospect_main->prospect_contact;
+ my $contact = $prospect_contacts[0]->contact;
$cust_main->first( $contact->first );
$cust_main->set( 'last', $contact->get('last') );
#contact phone numbers?
@@ -375,9 +369,6 @@ if ( $cgi->param('error') ) {
}
-my %keep = map { $_=>1 } qw( error tagnum lock_agentnum lock_pkgpart );
-$cgi->delete( grep { !$keep{$_} && $_ !~ /^tax_/ } $cgi->param );
-
my $title = $custnum ? 'Edit Customer' : 'Add Customer';
$title = mt($title);
$title .= ": ". $cust_main->name if $custnum;