X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main.cgi;h=d4129a37cd7cee2bd5ba5f0ec34fdeb4ecfd755c;hb=0f57e99bd0af253afa16e20f1141afee851b8d5a;hp=38b351381e72fda2dd8ee21300552542eef48b54;hpb=70bffe41ccf43a9d25c2b54679f1e9310f50c1c4;p=freeside.git diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 38b351381..d4129a37c 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 &> @@ -17,134 +13,105 @@ % if ( $custnum ) { <% mt('Customer #') |h %><% $cust_main->display_custnum %> - - <% ucfirst($cust_main->status) %> + <% $cust_main->status_label %>

% } %# agent, agent_custid, refnum (advertising source), referral_custnum -<& cust_main/top_misc.html, $cust_main, 'custnum' => $custnum &> +%# better section title for this? +<% mt('Basics') |h %> +<& cust_main/basics.html, $cust_main, 'custnum' => $custnum &> %# birthdate -% if ( $conf->exists('cust_main-enable_birthdate') ) { +% if ( $conf->config('national_id-country') +% || $conf->exists('cust_main-enable_birthdate') +% || $conf->exists('cust_main-enable_anniversary_date') +% ) +% {
<& cust_main/birthdate.html, $cust_main &> % } - -%# latitude and longitude -% if ( $conf->exists('cust_main-require_censustract') ) { -% my ($latitude, $longitude) = $cust_main->service_coordinates; -% $latitude ||= $conf->config('company_latitude') || ''; -% $longitude ||= $conf->config('company_longitude') || ''; - - +% my $has_ship_address = ''; +% if ( $cgi->param('error') ) { +% $has_ship_address = !$same; +% } elsif ( $cust_main->custnum ) { +% $has_ship_address = $cust_main->has_ship_address; % } - -%# contact info - -% my $same_checked = ''; -% my $ship_disabled = ''; -% my @ship_style = (); -% unless ( $cust_main->ship_last && $same ne 'Y' ) { -% $same_checked = 'CHECKED'; -% $ship_disabled = 'DISABLED'; -% push @ship_style, 'background-color:#dddddd'; -% foreach ( -% qw( last first company address1 address2 city county state zip country -% daytime night fax mobile ) -% ) { -% $cust_main->set("ship_$_", $cust_main->get($_) ); -% } -% } -
-<% mt('Billing address') |h %> - -<& cust_main/contact.html, - 'cust_main' => $cust_main, - 'pre' => '', - 'onchange' => 'bill_changed(this)', - 'disabled' => '', - 'ss' => $ss, - 'stateid' => $stateid, - 'same_checked' => $same_checked, #for address2 "Unit #" labeling -&> + + + + + + +
+%#; padding-right:2px; vertical-align:top"> + <% mt('Billing address') |h %> + + <& cust_main/before_bill_location.html, $cust_main &> + <& /elements/location.html, + object => $cust_main->bill_location, + prefix => 'bill_', + enable_censustract => 1, + enable_district => 1, + enable_coords => 1, + &> + <& cust_main/after_bill_location.html, $cust_main &> +
+
+ <% mt('Service address') |h %> + + ><% mt('same as billing address') |h %> +
+ + <& cust_main/before_ship_location.html, $cust_main &> + <& /elements/location.html, + object => $cust_main->ship_location, + prefix => 'ship_', + enable_censustract => 1, + 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('Include service address on invoices'), + ) %> +
+
+

-<% mt('Service address') |h %> - -(><% mt('same as billing address') |h %>) -<& cust_main/contact.html, - 'cust_main' => $cust_main, - 'pre' => 'ship_', - 'onchange' => '', - 'disabled' => $ship_disabled, - 'style' => \@ship_style -&> + +<& cust_main/contacts_new.html, 'cust_main'=>$cust_main, &> %# billing info <& cust_main/billing.html, $cust_main, @@ -155,8 +122,9 @@ function samechanged(what) { % my $ro_comments = $conf->exists('cust_main-use_comments')?'':'readonly'; % if (!$ro_comments || $cust_main->comments) { -
<% mt('Comments') |h %> - <% &ntable("#cccccc") %> +
+ <% mt('Comments') |h %> +