diff options
author | ivan <ivan> | 2001-08-13 23:10:34 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-08-13 23:10:34 +0000 |
commit | 092cdf2ba5fbd1c94305688dd7f7821d4dbf06d3 (patch) | |
tree | c4a5cb81e544cd3af92ef0ea5f1ed88604e1029e /httemplate/edit/process | |
parent | 1d758388ce3b17b8de1ae1d3a8ec39c1026baefc (diff) |
properly massage ship_state & work okay when no initial pkg is selected
Diffstat (limited to 'httemplate/edit/process')
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 1b916b00b..86e6abef6 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -1,5 +1,5 @@ <% -# $Id: cust_main.cgi,v 1.2 2001-08-12 00:07:55 ivan Exp $ +# $Id: cust_main.cgi,v 1.3 2001-08-13 23:10:34 ivan Exp $ use strict; use vars qw( $cgi $payby @invoicing_list $new $custnum $error ); @@ -30,6 +30,12 @@ $cgi->param('state', $1); $cgi->param('county', $3 || ''); $cgi->param('country', $4); +$cgi->param('ship_state') =~ /^(\w*)( \(([\w ]+)\))? ?\/ ?(\w+)$/ + or die "Oops, illegal \"ship_state\" param: ". $cgi->param('ship_state'); +$cgi->param('ship_state', $1); +$cgi->param('ship_county', $3 || ''); +$cgi->param('ship_country', $4); + if ( $payby = $cgi->param('payby') ) { $cgi->param('payinfo', $cgi->param( $payby. '_payinfo' ) ); $cgi->param('paydate', @@ -123,7 +129,7 @@ if ( $new->custnum eq '' ) { use Tie::RefHash; tie my %hash, 'Tie::RefHash'; - %hash = ( $cust_pkg => [ $svc_acct ] ); + %hash = ( $cust_pkg => [ $svc_acct ] ) if $cust_pkg; $error ||= $new->insert( \%hash, \@invoicing_list ); } else { #create old record object my $old = qsearchs( 'cust_main', { 'custnum' => $new->custnum } ); |