summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorivan <ivan>2004-02-25 10:39:35 +0000
committerivan <ivan>2004-02-25 10:39:35 +0000
commit64421a63575733bd52a4cb9b897f6847b4e14965 (patch)
treeda431eae4f2fbbc04784209b3c089e7b366965b1 /FS/FS
parent40e1e3e6e0e56d299067cd5a09bb4ab6179012ee (diff)
fix up forward editing for new svc_forward.src field
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/cust_svc.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm
index e27b273b4..1be5fa068 100644
--- a/FS/FS/cust_svc.pm
+++ b/FS/FS/cust_svc.pm
@@ -286,10 +286,15 @@ sub label {
my $domain = $svc_domain->domain;
$tag = "$domuser\@$domain";
} elsif ( $svcdb eq 'svc_forward' ) {
- my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $svc_x->srcsvc } );
- $tag = $svc_acct->email. '->';
+ if ( $svc_x->srcsvc ) {
+ my $svc_acct = $svc_x->srcsvc_acct;
+ $tag = $svc_acct->email;
+ } else {
+ $tag = $svc_x->src;
+ }
+ $tag .= '->';
if ( $svc_x->dstsvc ) {
- $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $svc_x->dstsvc } );
+ my $svc_acct = $svc_x->dstsvc_acct;
$tag .= $svc_acct->email;
} else {
$tag .= $svc_x->dst;