projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
648c304
)
add forward and spam setting to inter.net portal, RT#13656
author
ivan
<ivan>
Tue, 29 Nov 2011 21:57:37 +0000
(21:57 +0000)
committer
ivan
<ivan>
Tue, 29 Nov 2011 21:57:37 +0000
(21:57 +0000)
FS/FS/ClientAPI/MyAccount.pm
patch
|
blob
|
history
diff --git
a/FS/FS/ClientAPI/MyAccount.pm
b/FS/FS/ClientAPI/MyAccount.pm
index
6a21da8
..
ffdc772
100644
(file)
--- 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;
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';
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',
);
{ 'srcsvc' => $p->{'svcnum'} },
'svc_forward',
);
- warn $old;
if ( $p->{'dst'} eq '' ) {
if ( $old ) {
if ( $p->{'dst'} eq '' ) {
if ( $old ) {
@@
-1585,20
+1582,21
@@
sub process_acct_forward {
my $error;
if ( $old ) {
my $error;
if ( $old ) {
- warn "old: $old\n";
$new->svcnum($old->svcnum);
my $cust_svc = $old->cust_svc;
$new->svcpart($old->svcpart);
$new->pkgnuym($old->pkgnum);
$error = $new->replace($old);
} else {
$new->svcnum($old->svcnum);
my $cust_svc = $old->cust_svc;
$new->svcpart($old->svcpart);
$new->pkgnuym($old->pkgnum);
$error = $new->replace($old);
} else {
- warn "new: $new\n";
my $conf = new FS::Conf;
$new->svcpart($conf->config('selfservice-svc_forward_svcpart'));
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;
$error = $new->insert;
- warn $error;
}
return { 'error' => $error };
}
return { 'error' => $error };