From f144c3a14169d99fd93f265da690d9ce38dbae68 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 17 Dec 2007 00:59:02 +0000 Subject: add cust_main-require_address2 config, reimplement address2-search config ("Unit #" search in searchbar), visual indication of require_invoicing_list_email, closes: RT#2926 --- httemplate/edit/cust_main.cgi | 85 +++++++++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 32 deletions(-) (limited to 'httemplate/edit/cust_main.cgi') diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 579d6cfe3..be9dd1bfb 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -207,13 +207,31 @@ +% my $same_checked = ''; +% my $ship_disabled = ''; +% unless ( $cust_main->ship_last && $same ne 'Y' ) { +% $same_checked = 'CHECKED'; +% $ship_disabled = 'DISABLED STYLE="background-color: #dddddd"'; +% foreach ( +% qw( last first company address1 address2 city county state zip country +% daytime night fax ) +% ) { +% $cust_main->set("ship_$_", $cust_main->get($_) ); +% } +% } +

Billing address -<% include('cust_main/contact.html', $cust_main, '', 'bill_changed(this)', '', 'ss' => $ss, 'stateid' => $stateid ) %> - - -% if ( defined $cust_main->dbdef_table->column('ship_last') ) { - +<% include('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 + ) +%> -% -% my $checked = ''; -% my $disabled = ''; -% my $disabledselect = ''; -% unless ( $cust_main->ship_last && $same ne 'Y' ) { -% $checked = 'CHECKED'; -% $disabled = 'DISABLED STYLE="background-color: #dddddd"'; -% foreach ( -% qw( last first company address1 address2 city county state zip country -% daytime night fax ) -% ) { -% $cust_main->set("ship_$_", $cust_main->get($_) ); -% } -% } -% -
Service address -(>same as billing address) -<% include('cust_main/contact.html', $cust_main, 'ship_', '', $disabled ) %> -% } +(>same as billing address) +<% include('cust_main/contact.html', + 'cust_main' => $cust_main, + 'pre' => 'ship_', + 'onchange' => '', + 'disabled' => $ship_disabled, + ) +%> -- cgit v1.2.1