diff options
author | ivan <ivan> | 2010-10-11 09:03:14 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-10-11 09:03:14 +0000 |
commit | 4fab78e146503fb8f0b5678bc3910fb86cd0c07b (patch) | |
tree | 45be67334bc0c483fa89c56db43b0aff2e67cc35 /httemplate/edit/cust_main.cgi | |
parent | 6b88e6c5617d52ab4a58677f6a92413ed4509714 (diff) |
add lock_agentnum and lock_pkgpart parameters to new customer page, RT#9782
Diffstat (limited to 'httemplate/edit/cust_main.cgi')
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 57dc3597a..07629dcff 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -179,6 +179,8 @@ function samechanged(what) { <% include('cust_main/first_pkg.html', $cust_main, 'pkgpart_svcpart' => $pkgpart_svcpart, + 'disable_empty' => + scalar( $cgi->param('lock_pkgpart') =~ /^(\d+)$/ ), #svc_acct 'username' => $username, 'password' => $password, @@ -307,11 +309,18 @@ if ( $cgi->param('error') ) { $stateid = ''; $payinfo = ''; + if ( $cgi->param('lock_pkgpart') =~ /^(\d+)$/ ) { + my $pkgpart = $1; + my $part_pkg = qsearchs('part_pkg', { 'pkgpart' => $pkgpart } ) + or die "unknown pkgpart $pkgpart"; + my $svcpart = $part_pkg->svcpart; + $pkgpart_svcpart = $pkgpart.'_'.$svcpart; + } + } -my $error = $cgi->param('error'); -$cgi->delete_all(); -$cgi->param('error', $error); +my %keep = map { $_=>1 } qw( error tagnum lock_agentnum lock_pkgpart ); +$cgi->delete( grep !$keep{$_}, $cgi->param ); my $title = $custnum ? 'Edit Customer' : 'Add Customer'; $title .= ": ". $cust_main->name if $custnum; |