diff options
author | ivan <ivan> | 2004-07-30 07:12:07 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-07-30 07:12:07 +0000 |
commit | 101cc49024f693a837e2ff74a89a300b7ecb8976 (patch) | |
tree | c33e9ca35af7ec8241edc65216c7454f6b047662 | |
parent | 918bbc9ce36a3dc5943f521e26751ea94a5a5539 (diff) |
set fixed values from an explicitly specified svcpart on replace too
-rw-r--r-- | FS/FS/svc_Common.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm index 38e656cd4..10ff3f916 100644 --- a/FS/FS/svc_Common.pm +++ b/FS/FS/svc_Common.pm @@ -394,12 +394,12 @@ sub setx { #get part_svc my $svcpart; - if ( $self->svcnum && qsearchs('cust_svc', {'svcnum'=>$self->svcnum}) ) { + if ( $self->get('svcpart') ) { + $svcpart = $self->get('svcpart'); + } elsif ( $self->svcnum && qsearchs('cust_svc', {'svcnum'=>$self->svcnum}) ) { my $cust_svc = $self->cust_svc; return "Unknown svcnum" unless $cust_svc; $svcpart = $cust_svc->svcpart; - } else { - $svcpart = $self->getfield('svcpart'); } my $part_svc = qsearchs( 'part_svc', { 'svcpart' => $svcpart } ); return "Unkonwn svcpart" unless $part_svc; |