X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main.cgi;h=4a8f70540ed12702a4536f4b87f452d2f46cf03f;hb=8fa7d60799d6d49bfe054e07b7b982c33772fb83;hp=1909b5438918f1ef011cb93cef183a17ca1e5253;hpb=f63c0e821610c885f9f49d301eeccf804e1ca6d3;p=freeside.git diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 1909b5438..4a8f70540 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -71,7 +71,7 @@ print header("Customer $action", '', ' onUnload="myclose()"'); print qq!Error: !, $error, "" if $error; -print qq!
!, +print qq!!, qq!!, qq!Customer # !, ( $custnum ? "$custnum" : " (NEW)" ), @@ -191,8 +191,10 @@ END 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'; +my $statedefault = $conf->config('statedefault') + || ($countrydefault eq 'US' ? 'CA' : ''); +$cust_main->state( $statedefault ) + unless $cust_main->state || $cust_main->country ne $countrydefault; my($county_html, $state_html, $country_html) = FS::cust_main_county::regionselector( $cust_main->county, @@ -289,8 +291,9 @@ END #false laziness with regular state $cust_main->ship_country( $countrydefault ) unless $cust_main->ship_country; - $cust_main->ship_state( $conf->config('statedefault') || 'CA' ) - unless $cust_main->ship_state || $cust_main->ship_country ne 'US'; + $cust_main->ship_state( $statedefault ) + unless $cust_main->ship_state + || $cust_main->ship_country ne $countrydefault; my($ship_county_html, $ship_state_html, $ship_country_html) = FS::cust_main_county::regionselector( $cust_main->ship_county, @@ -343,7 +346,9 @@ sub expselect { $return .= ">$_"; } $return .= qq!/!; print "Billing type", - "", '', + var achwindow = -1; + function achopen(filename,windowname,properties) { + achclose(); + achwindow = window.open(filename,windowname,properties); + } + function achclose() { + if ( achwindow != -1 ) + achwindow.close(); + achwindow = -1; + } + ', &table("#cccccc"), ""; my($payinfo, $payname)=( @@ -429,8 +443,8 @@ if ( $payby_default eq 'HIDE' ) { my %payby = ( 'CARD' => qq!Credit card (automatic)
${r}
${r}Exp !. expselect("CARD"). qq!
${r}Name on card
!, 'DCRD' => qq!Credit card (on-demand)
${r}
${r}Exp !. expselect("DCRD"). qq!
${r}Name on card
!, - 'CHEK' => qq!Electronic check (automatic)
${r}Account number
${r}ABA/Routing code
${r}Bank name !, - 'DCHK' => qq!Electronic check (on-demand)
${r}Account number
${r}ABA/Routing code
${r}Bank name !, + 'CHEK' => qq!Electronic check (automatic)
${r}Account number
${r}ABA/Routing number (help)
${r}Bank name !, + 'DCHK' => qq!Electronic check (on-demand)
${r}Account number
${r}ABA/Routing number (help)
${r}Bank name !, 'LECB' => qq!Phone bill billing
${r}Phone number !, 'BILL' => qq!Billing
P.O.
Attention
!, 'COMP' => qq!Complimentary
${r}Approved by
${r}Exp !. expselect("COMP"), @@ -447,8 +461,8 @@ if ( $payby_default eq 'HIDE' ) { my %paybychecked = ( 'CARD' => qq!Credit card (automatic)
${r}
${r}Exp !. expselect("CARD", $cust_main->paydate). qq!
${r}Name on card
!, 'DCRD' => qq!Credit card (on-demand)
${r}
${r}Exp !. expselect("DCRD", $cust_main->paydate). qq!
${r}Name on card
!, - 'CHEK' => qq!Electronic check (automatic)
${r}Account number
${r}ABA/Routing code
${r}Bank name !, - 'DCHK' => qq!Electronic check (on-demand)
${r}Account number
${r}ABA/Routing code
${r}Bank name !, + 'CHEK' => qq!Electronic check (automatic)
${r}Account number
${r}ABA/Routing number (help)
${r}Bank name !, + 'DCHK' => qq!Electronic check (on-demand)
${r}Account number
${r}ABA/Routing number (help)
${r}Bank name !, 'LECB' => qq!Phone bill billing
${r}Phone number !, 'BILL' => qq!Billing
P.O.
Attention
!, 'COMP' => qq!Complimentary
${r}Approved by
${r}Exp !. expselect("COMP", $cust_main->paydate), @@ -550,7 +564,7 @@ END my $otaker = $cust_main->otaker; print qq!!, - qq!
!, "
", ;