X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FClientAPI%2FMyAccount.pm;h=ac3ebdfc596a765862940dea3c37d68198e14164;hp=6e56d782d937de891bf6555420e7c4fa99c03fd0;hb=687d99781b3a8c555534e0a4f7fd826e59e4cf2f;hpb=0252d7f4d44ef775659353341ebd7d371631f58a diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 6e56d782d..ac3ebdfc5 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -1560,6 +1560,7 @@ 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'; @@ -1584,9 +1585,17 @@ sub process_acct_forward { my $error; if ( $old ) { $new->svcnum($old->svcnum); + my $cust_svc = $old->cust_svc; + $new->svcpart($old->svcpart); + $new->pkgnuym($old->pkgnum); $error = $new->replace($old); } else { + my $conf = new FS::Conf; + $new->svcpart($conf->config('selfservice-svc_forward_svcpart')); + $new->pkgnum($old->cust_svc->pkgnum); + warn Dumper($new); $error = $new->insert; + warn $error; } return { 'error' => $error };