projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c14a267
)
better ordering of state selection on new customer screen
author
ivan
<ivan>
Tue, 30 Oct 2001 15:39:27 +0000
(15:39 +0000)
committer
ivan
<ivan>
Tue, 30 Oct 2001 15:39:27 +0000
(15:39 +0000)
httemplate/edit/cust_main.cgi
patch
|
blob
|
history
diff --git
a/httemplate/edit/cust_main.cgi
b/httemplate/edit/cust_main.cgi
index
d8191c7
..
cc692dd
100755
(executable)
--- a/
httemplate/edit/cust_main.cgi
+++ b/
httemplate/edit/cust_main.cgi
@@
-1,5
+1,5
@@
<%
<%
-#<!-- $Id: cust_main.cgi,v 1.
9 2001-10-30 14:54:0
7 ivan Exp $ -->
+#<!-- $Id: cust_main.cgi,v 1.
10 2001-10-30 15:39:2
7 ivan Exp $ -->
use vars qw( $cgi $custnum $action $cust_main $p1 @agents $agentnum
$last $first $ss $company $address1 $address2 $city $zip
use vars qw( $cgi $custnum $action $cust_main $p1 @agents $agentnum
$last $first $ss $company $address1 $address2 $city $zip
@@
-178,11
+178,16
@@
print <<END;
<TR><TH ALIGN="right">${r}City</TH><TD><INPUT TYPE="text" NAME="city" VALUE="$city"></TD><TH ALIGN="right">${r}State/Country</TH><TD><SELECT NAME="state" SIZE="1">
END
<TR><TH ALIGN="right">${r}City</TH><TD><INPUT TYPE="text" NAME="city" VALUE="$city"></TD><TH ALIGN="right">${r}State/Country</TH><TD><SELECT NAME="state" SIZE="1">
END
-$cust_main->country( $conf->config('countrydefault') || 'US' )
-
unless $cust_main->country;
+my $countrydefault = $conf->config('countrydefault') || 'US';
+
$cust_main->country( $countrydefault )
unless $cust_main->country;
$cust_main->state( $conf->config('statedefault') || 'CA' )
unless $cust_main->state || $cust_main->country ne 'US';
$cust_main->state( $conf->config('statedefault') || 'CA' )
unless $cust_main->state || $cust_main->country ne 'US';
-foreach ( qsearch('cust_main_county',{}) ) {
+foreach ( sort {
+ $a->country eq $countrydefault <=> $b->country eq $countrydefault
+ or $a->country cmp $b->country
+ or $a->state cmp $b->state
+ or $a->county cmp $b->county
+} qsearch('cust_main_county',{}) ) {
print "<OPTION";
print " SELECTED" if ( $cust_main->state eq $_->state
&& $cust_main->county eq $_->county
print "<OPTION";
print " SELECTED" if ( $cust_main->state eq $_->state
&& $cust_main->county eq $_->county