X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FClientAPI%2FMyAccount.pm;h=ffdc772bd80b5c6bb000f1cbc0eb2affb67cd9e0;hb=b00a82f7b3d0c7f1a2377fb22351a274c042f52f;hp=d76891d126ccd774252987f67c8721fd1a02d1cb;hpb=28963ff9feca2f3ca76b3bf7ad6977d00a1d051c;p=freeside.git diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index d76891d12..ffdc772bd 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -1560,8 +1560,6 @@ sub acct_forward_info { sub process_acct_forward { my $p = shift; - warn Dumper($p); - my($context, $session, $custnum) = _custoragent_session_custnum($p); return { 'error' => $session } if $context eq 'error'; @@ -1569,7 +1567,6 @@ sub process_acct_forward { { 'srcsvc' => $p->{'svcnum'} }, 'svc_forward', ); - warn $old; if ( $p->{'dst'} eq '' ) { if ( $old ) { @@ -1583,8 +1580,6 @@ sub process_acct_forward { 'dst' => $p->{'dst'}, }; - warn $new; - my $error; if ( $old ) { $new->svcnum($old->svcnum); @@ -1595,10 +1590,13 @@ sub process_acct_forward { } else { my $conf = new FS::Conf; $new->svcpart($conf->config('selfservice-svc_forward_svcpart')); - $new->pkgnum($old->cust_svc->pkgnum); - warn Dumper($new); + + my $svc_acct = _customer_svc_x( $custnum, $p->{'svcnum'}, 'svc_acct' ) + or return { 'error' => 'No service' }; #how would we even get here? + + $new->pkgnum( $svc_acct->cust_svc->pkgnum ); + $error = $new->insert; - warn $error; } return { 'error' => $error };