X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbasics.html;h=a30d7f88cbadf674ca2aa9d6a95c89f8ce09d80e;hb=64aec88c35418b8c630811cdf5afb19b2a1c4299;hp=e484c732d7bae365a189169c3924aa27baeffbf0;hpb=9bee11036c3bf8e7905bbebf77a77792660186ac;p=freeside.git diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html index e484c732d..a30d7f88c 100644 --- a/httemplate/edit/cust_main/basics.html +++ b/httemplate/edit/cust_main/basics.html @@ -31,6 +31,8 @@ $('#spouse_label').slideUp(); $('#spouse_last_input').slideUp(); $('#spouse_first_input').slideUp(); + $('#invoice_email_label').slideUp(); + $('#invoice_email_input').slideUp(); } else { if ( document.getElementById('company').value.length == 0 ) { $('#company_label').slideUp(); @@ -40,13 +42,15 @@ $('#spouse_label').slideDown(); $('#spouse_last_input').slideDown(); $('#spouse_first_input').slideDown(); + $('#invoice_email_label').slideDown(); + $('#invoice_email_input').slideDown(); } } var ship_locked_agents = <% encode_json(\%ship_locked_agents) %>; var ship_fields = [ - 'locationname', 'address1', 'city', 'state', 'zip', 'country', + 'locationname', 'address1',<% $conf->exists('cust_main-no_city_in_address') ? '' : q( 'city',) %> 'state', 'zip', 'country', 'latitude', 'longitude', 'district' ]; @@ -56,6 +60,7 @@ % # unlock/lock service location var f = what.form; + var was_same = f['same'].checked; if ( ship_locked_agents[agentnum] ) { % # For this agent, the service location (except address2) % # should be locked to the agent's location. @@ -72,16 +77,25 @@ % # disabled, then they contain some agent's address, which is % # no longer meaningful. So set them back to the customer's % # current location. + var is_same = true; for(var i=0; i rescom_changed(document.getElementById('residential_commercial_Residential')); agent_changed(document.getElementById('agentnum')); - samechanged(document.getElementById('same')); + + if ( $('#same').prop('checked') ) { + $('#div_ship_location').hide(); + } else { + $('#div_ship_location').show(); + } + @@ -103,6 +123,7 @@ %# tags <& /elements/tr-select-cust_tag.html, 'custnum' => $custnum, + 'default' => { map { $_=>1 } FS::part_tag->default_tags }, 'cgi' => $cgi, &> @@ -291,7 +312,10 @@ foreach (qsearch('agent',{})) { my $agent_ship_location = $cust_main->ship_location; $ship_locked_agents{$agentnum} = +{ map { $_ => $agent_ship_location->$_ } - qw(locationname address1 city state zip country latitude longitude district) + ( + qw(locationname address1 state zip country latitude longitude district), + ($conf->exists('cust_main-no_city_in_address') ? () : 'city') + ) }; }