summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/svc_Common.pm6
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;