From ad18fd616d98b80945b455ca170ba02089723873 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 6 Aug 2006 20:07:13 +0000 Subject: this should fix the barfing about default radius groups on the new customer screen... --- httemplate/edit/process/cust_main.cgi | 2 -- 1 file changed, 2 deletions(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 09a42544c..4ba30c435 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -103,8 +103,6 @@ if ( $new->custnum eq '' ) { 'popnum' => $cgi->param('popnum'), } ); - my $y = $svc_acct->setdefault; # arguably should be in new method - $error ||= $y unless ref($y); #and just in case you were silly $svc_acct->svcpart($svcpart); $svc_acct->username($cgi->param('username')); -- cgit v1.2.1 From 3ce7691203a7737406bf2d4442f7fd84b81f847e Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 23 Aug 2006 22:25:39 +0000 Subject: Will things ever be the same again? It's the final masonize --- httemplate/edit/process/cust_main.cgi | 305 +++++++++++++++++----------------- 1 file changed, 153 insertions(+), 152 deletions(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 4ba30c435..2d698c7b0 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -1,153 +1,154 @@ -<% +% +% +%my $error = ''; +% +%#unmunge stuff +% +%$cgi->param('tax','') unless defined $cgi->param('tax'); +% +%$cgi->param('refnum', (split(/:/, ($cgi->param('refnum'))[0] ))[0] ); +% +%#my $payby = $cgi->param('payby'); +%my $payby = $cgi->param('select'); # XXX key +% +%my %noauto = ( +% 'CARD' => 'DCRD', +% 'CHEK' => 'DCHK', +%); +%$payby = $noauto{$payby} +% if ! $cgi->param('payauto') && exists $noauto{$payby}; +% +%$cgi->param('payby', $payby); +% +%if ( $payby ) { +% if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) { +% $cgi->param('payinfo', +% $cgi->param('payinfo1'). '@'. $cgi->param('payinfo2') ); +% } +% $cgi->param('paydate', +% $cgi->param( 'exp_month' ). '-'. $cgi->param( 'exp_year' ) ); +%} +% +%my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') ); +%push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST'); +%push @invoicing_list, 'FAX' if $cgi->param('invoicing_list_FAX'); +%$cgi->param('invoicing_list', join(',', @invoicing_list) ); +% +% +%#create new record object +% +%my $new = new FS::cust_main ( { +% map { +% $_, scalar($cgi->param($_)) +%# } qw(custnum agentnum last first ss company address1 address2 city county +%# state zip daytime night fax payby payinfo paydate payname tax +%# otaker refnum) +% } fields('cust_main') +%} ); +% +%if ( defined($cgi->param('same')) && $cgi->param('same') eq "Y" ) { +% $new->setfield("ship_$_", '') foreach qw( +% last first company address1 address2 city county state zip +% country daytime night fax +% ); +%} +% +%$new->setfield('paid', $cgi->param('paid') ) +% if $cgi->param('paid'); +% +%#perhaps this stuff should go to cust_main.pm +%my $cust_pkg = ''; +%my $svc_acct = ''; +%if ( $new->custnum eq '' ) { +% +% if ( $cgi->param('pkgpart_svcpart') ) { +% my $x = $cgi->param('pkgpart_svcpart'); +% $x =~ /^(\d+)_(\d+)$/ or die "illegal pkgpart_svcpart $x\n"; +% my($pkgpart, $svcpart) = ($1, $2); +% #false laziness: copied from FS::cust_pkg::order (which should become a +% #FS::cust_main method) +% my(%part_pkg); +% # generate %part_pkg +% # $part_pkg{$pkgpart} is true iff $custnum may purchase $pkgpart +% my $agent = qsearchs('agent',{'agentnum'=> $new->agentnum }); +% #my($type_pkgs); +% #foreach $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { +% # my($pkgpart)=$type_pkgs->pkgpart; +% # $part_pkg{$pkgpart}++; +% #} +% # $pkgpart_href->{PKGPART} is true iff $custnum may purchase $pkgpart +% my $pkgpart_href = $agent->pkgpart_hashref; +% #eslaf +% +% # this should wind up in FS::cust_pkg! +% $error ||= "Agent ". $new->agentnum. " (type ". $agent->typenum. ") can't ". +% "purchase pkgpart ". $pkgpart +% #unless $part_pkg{ $pkgpart }; +% unless $pkgpart_href->{ $pkgpart }; +% +% $cust_pkg = new FS::cust_pkg ( { +% #later 'custnum' => $custnum, +% 'pkgpart' => $pkgpart, +% } ); +% #$error ||= $cust_pkg->check; +% +% #$cust_svc = new FS::cust_svc ( { 'svcpart' => $svcpart } ); +% +% #$error ||= $cust_svc->check; +% +% $svc_acct = new FS::svc_acct ( { +% 'svcpart' => $svcpart, +% 'username' => $cgi->param('username'), +% '_password' => $cgi->param('_password'), +% 'popnum' => $cgi->param('popnum'), +% } ); +% +% #and just in case you were silly +% $svc_acct->svcpart($svcpart); +% $svc_acct->username($cgi->param('username')); +% $svc_acct->_password($cgi->param('_password')); +% $svc_acct->popnum($cgi->param('popnum')); +% +% #$error ||= $svc_acct->check; +% +% } elsif ( $cgi->param('username') ) { #good thing to catch +% $error = "Can't assign username without a package!"; +% } +% +% use Tie::RefHash; +% tie my %hash, 'Tie::RefHash'; +% %hash = ( $cust_pkg => [ $svc_acct ] ) if $cust_pkg; +% $error ||= $new->insert( \%hash, \@invoicing_list ); +% +% my $conf = new FS::Conf; +% if ( $conf->exists('backend-realtime') && ! $error ) { +% +% my $berror = $new->bill; +% $new->apply_payments; +% $new->apply_credits; +% $berror ||= $new->collect; +% warn "Warning, error billing during backend-realtime: $berror" if $berror; +% +% } +% +%} else { #create old record object +% +% my $old = qsearchs( 'cust_main', { 'custnum' => $new->custnum } ); +% $error ||= "Old record not found!" unless $old; +% if ( defined dbdef->table('cust_main')->column('paycvv') +% && length($old->paycvv) +% && $new->paycvv =~ /^\s*\*+\s*$/ ) { +% $new->paycvv($old->paycvv); +% } +% $error ||= $new->replace($old, \@invoicing_list); +% +%} +% +%if ( $error ) { +% $cgi->param('error', $error); +% print $cgi->redirect(popurl(2). "cust_main.cgi?". $cgi->query_string ); +%} else { +% print $cgi->redirect(popurl(3). "view/cust_main.cgi?". $new->custnum); +%} +% -my $error = ''; - -#unmunge stuff - -$cgi->param('tax','') unless defined $cgi->param('tax'); - -$cgi->param('refnum', (split(/:/, ($cgi->param('refnum'))[0] ))[0] ); - -#my $payby = $cgi->param('payby'); -my $payby = $cgi->param('select'); # XXX key - -my %noauto = ( - 'CARD' => 'DCRD', - 'CHEK' => 'DCHK', -); -$payby = $noauto{$payby} - if ! $cgi->param('payauto') && exists $noauto{$payby}; - -$cgi->param('payby', $payby); - -if ( $payby ) { - if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) { - $cgi->param('payinfo', - $cgi->param('payinfo1'). '@'. $cgi->param('payinfo2') ); - } - $cgi->param('paydate', - $cgi->param( 'exp_month' ). '-'. $cgi->param( 'exp_year' ) ); -} - -my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') ); -push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST'); -push @invoicing_list, 'FAX' if $cgi->param('invoicing_list_FAX'); -$cgi->param('invoicing_list', join(',', @invoicing_list) ); - - -#create new record object - -my $new = new FS::cust_main ( { - map { - $_, scalar($cgi->param($_)) -# } qw(custnum agentnum last first ss company address1 address2 city county -# state zip daytime night fax payby payinfo paydate payname tax -# otaker refnum) - } fields('cust_main') -} ); - -if ( defined($cgi->param('same')) && $cgi->param('same') eq "Y" ) { - $new->setfield("ship_$_", '') foreach qw( - last first company address1 address2 city county state zip - country daytime night fax - ); -} - -$new->setfield('paid', $cgi->param('paid') ) - if $cgi->param('paid'); - -#perhaps this stuff should go to cust_main.pm -my $cust_pkg = ''; -my $svc_acct = ''; -if ( $new->custnum eq '' ) { - - if ( $cgi->param('pkgpart_svcpart') ) { - my $x = $cgi->param('pkgpart_svcpart'); - $x =~ /^(\d+)_(\d+)$/ or die "illegal pkgpart_svcpart $x\n"; - my($pkgpart, $svcpart) = ($1, $2); - #false laziness: copied from FS::cust_pkg::order (which should become a - #FS::cust_main method) - my(%part_pkg); - # generate %part_pkg - # $part_pkg{$pkgpart} is true iff $custnum may purchase $pkgpart - my $agent = qsearchs('agent',{'agentnum'=> $new->agentnum }); - #my($type_pkgs); - #foreach $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { - # my($pkgpart)=$type_pkgs->pkgpart; - # $part_pkg{$pkgpart}++; - #} - # $pkgpart_href->{PKGPART} is true iff $custnum may purchase $pkgpart - my $pkgpart_href = $agent->pkgpart_hashref; - #eslaf - - # this should wind up in FS::cust_pkg! - $error ||= "Agent ". $new->agentnum. " (type ". $agent->typenum. ") can't ". - "purchase pkgpart ". $pkgpart - #unless $part_pkg{ $pkgpart }; - unless $pkgpart_href->{ $pkgpart }; - - $cust_pkg = new FS::cust_pkg ( { - #later 'custnum' => $custnum, - 'pkgpart' => $pkgpart, - } ); - #$error ||= $cust_pkg->check; - - #$cust_svc = new FS::cust_svc ( { 'svcpart' => $svcpart } ); - - #$error ||= $cust_svc->check; - - $svc_acct = new FS::svc_acct ( { - 'svcpart' => $svcpart, - 'username' => $cgi->param('username'), - '_password' => $cgi->param('_password'), - 'popnum' => $cgi->param('popnum'), - } ); - - #and just in case you were silly - $svc_acct->svcpart($svcpart); - $svc_acct->username($cgi->param('username')); - $svc_acct->_password($cgi->param('_password')); - $svc_acct->popnum($cgi->param('popnum')); - - #$error ||= $svc_acct->check; - - } elsif ( $cgi->param('username') ) { #good thing to catch - $error = "Can't assign username without a package!"; - } - - use Tie::RefHash; - tie my %hash, 'Tie::RefHash'; - %hash = ( $cust_pkg => [ $svc_acct ] ) if $cust_pkg; - $error ||= $new->insert( \%hash, \@invoicing_list ); - - my $conf = new FS::Conf; - if ( $conf->exists('backend-realtime') && ! $error ) { - - my $berror = $new->bill; - $new->apply_payments; - $new->apply_credits; - $berror ||= $new->collect; - warn "Warning, error billing during backend-realtime: $berror" if $berror; - - } - -} else { #create old record object - - my $old = qsearchs( 'cust_main', { 'custnum' => $new->custnum } ); - $error ||= "Old record not found!" unless $old; - if ( defined dbdef->table('cust_main')->column('paycvv') - && length($old->paycvv) - && $new->paycvv =~ /^\s*\*+\s*$/ ) { - $new->paycvv($old->paycvv); - } - $error ||= $new->replace($old, \@invoicing_list); - -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_main.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?". $new->custnum); -} -%> -- cgit v1.2.1 From 6af1b1bfa25e5ececef5e0dcd38b55917121cee2 Mon Sep 17 00:00:00 2001 From: jeff Date: Sat, 26 Aug 2006 23:15:14 +0000 Subject: batch refactor continued --- httemplate/edit/process/cust_main.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 2d698c7b0..20c051b92 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -126,7 +126,7 @@ % my $berror = $new->bill; % $new->apply_payments; % $new->apply_credits; -% $berror ||= $new->collect; +% $berror ||= $new->collect 'realtime' => 1; % warn "Warning, error billing during backend-realtime: $berror" if $berror; % % } @@ -152,3 +152,4 @@ %} % + -- cgit v1.2.1 From b3b8c2e07e661046fe940ac083488d57a32f2c20 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 28 Aug 2006 13:52:31 +0000 Subject: parameters to method calls require ( ), arrgh --- httemplate/edit/process/cust_main.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 20c051b92..1aaed2890 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -126,7 +126,7 @@ % my $berror = $new->bill; % $new->apply_payments; % $new->apply_credits; -% $berror ||= $new->collect 'realtime' => 1; +% $berror ||= $new->collect( 'realtime' => 1 ); % warn "Warning, error billing during backend-realtime: $berror" if $berror; % % } -- cgit v1.2.1 From 64de1cc0535da3e6c31866c9ed046b43d1da01d3 Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 9 Oct 2006 04:27:17 +0000 Subject: more BoD --- httemplate/edit/process/cust_main.cgi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 1aaed2890..33f7bb895 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -53,6 +53,10 @@ % ); %} % +%if ( $cgi->param('birthdate') && $cgi->param('birthdate') =~ /^([ 0-9\-\/]{0,10})$/ ) { +% $new->setfield('birthdate', str2time($1)); +%} +% %$new->setfield('paid', $cgi->param('paid') ) % if $cgi->param('paid'); % -- cgit v1.2.1 From 7c1d5f4ce778b4ab56301a042076e7c1dce46152 Mon Sep 17 00:00:00 2001 From: jeff Date: Thu, 16 Nov 2006 06:20:38 +0000 Subject: switch birthdate to DateTime --- httemplate/edit/process/cust_main.cgi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 33f7bb895..d5d127b2d 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -54,7 +54,14 @@ %} % %if ( $cgi->param('birthdate') && $cgi->param('birthdate') =~ /^([ 0-9\-\/]{0,10})$/ ) { -% $new->setfield('birthdate', str2time($1)); +% eval "use DateTime::Format::Strptime;"; +% die $@ if $@; +% my $conf = new FS::Conf; +% my $format = $conf->config('date_format') || "%m/%d/%Y"; +% my $parser = DateTime::Format::Strptime->new(pattern => $format, +% time_zone => 'floating', +% ); +% $new->setfield('birthdate', $parser->parse_datetime($1)->epoch); %} % %$new->setfield('paid', $cgi->param('paid') ) -- cgit v1.2.1 From dcdf657e77ec7b46dc69e19a849a9c133123db7c Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 14 Dec 2006 06:00:46 +0000 Subject: encryption fixes from huntsberg & jayce --- httemplate/edit/process/cust_main.cgi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index d5d127b2d..789f29522 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -46,6 +46,9 @@ % } fields('cust_main') %} ); % +% delete( $new->hashref->{'agent_custid'} ) +% unless $new->hashref->{'agent_custid'}; +% %if ( defined($cgi->param('same')) && $cgi->param('same') eq "Y" ) { % $new->setfield("ship_$_", '') foreach qw( % last first company address1 address2 city county state zip @@ -151,6 +154,9 @@ % && $new->paycvv =~ /^\s*\*+\s*$/ ) { % $new->paycvv($old->paycvv); % } +% if ($new->payby =~ /CARD|DCRD|CHEK|DCHK/ && $new->payinfo =~ /xx/) { +% $new->payinfo($old->payinfo); +% } % $error ||= $new->replace($old, \@invoicing_list); % %} -- cgit v1.2.1 From ba1f19e48ec2f2ac293b07a41042de59e744db1e Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 15 Dec 2006 00:56:12 +0000 Subject: add DateTime as a proper rather than hidden dependency --- httemplate/edit/process/cust_main.cgi | 2 -- 1 file changed, 2 deletions(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 789f29522..752bc9502 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -57,8 +57,6 @@ %} % %if ( $cgi->param('birthdate') && $cgi->param('birthdate') =~ /^([ 0-9\-\/]{0,10})$/ ) { -% eval "use DateTime::Format::Strptime;"; -% die $@ if $@; % my $conf = new FS::Conf; % my $format = $conf->config('date_format') || "%m/%d/%Y"; % my $parser = DateTime::Format::Strptime->new(pattern => $format, -- cgit v1.2.1 From 02b9c53fb85b0a87d959e140dc30ae21cccb0902 Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 15 Dec 2006 05:29:48 +0000 Subject: move use statements to handler.pl, do not show 1/1/70 for new birthdates, and improve error handling --- httemplate/edit/process/cust_main.cgi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 752bc9502..38821c36a 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -56,13 +56,21 @@ % ); %} % -%if ( $cgi->param('birthdate') && $cgi->param('birthdate') =~ /^([ 0-9\-\/]{0,10})$/ ) { +%if ( $cgi->param('birthdate') && $cgi->param('birthdate') =~ /^([ 0-9\-\/]{0,10})$/) { % my $conf = new FS::Conf; % my $format = $conf->config('date_format') || "%m/%d/%Y"; % my $parser = DateTime::Format::Strptime->new(pattern => $format, % time_zone => 'floating', % ); -% $new->setfield('birthdate', $parser->parse_datetime($1)->epoch); +% my $dt = $parser->parse_datetime($1); +% if ($dt) { +% $new->setfield('birthdate', $dt->epoch); +% $cgi->param('birthdate', $dt->epoch); +% } else { +%# $error ||= $cgi->param('birthdate') . " is an invalid birthdate:" . $parser->errmsg; +% $error ||= "Invalid birthdate: " . $cgi->param('birthdate') . "."; +% $cgi->param('birthdate', ''); +% } %} % %$new->setfield('paid', $cgi->param('paid') ) -- cgit v1.2.1 From 6cb5c702b17b98be46adea4539e15d5f312e5be1 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 29 Dec 2006 08:41:21 +0000 Subject: slight pedanticism --- httemplate/edit/process/cust_main.cgi | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 38821c36a..505973dc7 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -1,5 +1,3 @@ -% -% %my $error = ''; % %#unmunge stuff @@ -160,7 +158,7 @@ % && $new->paycvv =~ /^\s*\*+\s*$/ ) { % $new->paycvv($old->paycvv); % } -% if ($new->payby =~ /CARD|DCRD|CHEK|DCHK/ && $new->payinfo =~ /xx/) { +% if ($new->payby =~ /^(CARD|DCRD|CHEK|DCHK)$/ && $new->payinfo =~ /xx/) { % $new->payinfo($old->payinfo); % } % $error ||= $new->replace($old, \@invoicing_list); @@ -173,6 +171,3 @@ %} else { % print $cgi->redirect(popurl(3). "view/cust_main.cgi?". $new->custnum); %} -% - - -- cgit v1.2.1 From 05686487551e26418c9b2d6b92ea0d89bb100082 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 21 Jan 2007 21:45:29 +0000 Subject: Have lineitem-specific applications happen in all cases; add weightsto control --- httemplate/edit/process/cust_main.cgi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 505973dc7..26d6debcd 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -142,8 +142,7 @@ % if ( $conf->exists('backend-realtime') && ! $error ) { % % my $berror = $new->bill; -% $new->apply_payments; -% $new->apply_credits; +% $new->apply_payments_and_credits; % $berror ||= $new->collect( 'realtime' => 1 ); % warn "Warning, error billing during backend-realtime: $berror" if $berror; % -- cgit v1.2.1 From 43131261a1aa72d2a42b778f7fa0180bdef6d685 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 13 Feb 2007 22:08:35 +0000 Subject: use a domsvc when passed in, patch from Sean Hanson/S1 --- httemplate/edit/process/cust_main.cgi | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'httemplate/edit/process/cust_main.cgi') diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 26d6debcd..a4a70ca22 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -114,12 +114,16 @@ % % #$error ||= $cust_svc->check; % -% $svc_acct = new FS::svc_acct ( { -% 'svcpart' => $svcpart, -% 'username' => $cgi->param('username'), -% '_password' => $cgi->param('_password'), -% 'popnum' => $cgi->param('popnum'), -% } ); +% my %svc_acct = ( +% 'svcpart' => $svcpart, +% 'username' => $cgi->param('username'), +% '_password' => $cgi->param('_password'), +% 'popnum' => $cgi->param('popnum'), +% ); +% $svc_acct{'domsvc'} = $cgi->param('domsvc') +% if $cgi->param('domsvc'); +% +% $svc_acct = new FS::svc_acct \%svc_acct; % % #and just in case you were silly % $svc_acct->svcpart($svcpart); -- cgit v1.2.1