X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FClientAPI%2FMyAccount.pm;h=ffdc772bd80b5c6bb000f1cbc0eb2affb67cd9e0;hb=46a8cddeb5dcbb5e858389896a5d4598c4c57df3;hp=abb93e8ecffab4ff0640a5157079760ac7edfcc6;hpb=ee7abaf6cf68da08a8183e8d6aadb2e211f7be7d;p=freeside.git diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index abb93e8ec..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 ) { @@ -1593,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 };