X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fh_cust_svc.pm;h=af0bf6064d877b9814c8d5965a0c13f49992ceeb;hb=4e35589e637aa3a3615a780d4086085c5ecb1782;hp=dbb16a292d9ec3176749400746f1fbd55e804891;hpb=60e238561db85ef177934640caab3c02694afb3f;p=freeside.git diff --git a/FS/FS/h_cust_svc.pm b/FS/FS/h_cust_svc.pm index dbb16a292..af0bf6064 100644 --- a/FS/FS/h_cust_svc.pm +++ b/FS/FS/h_cust_svc.pm @@ -9,7 +9,7 @@ use FS::cust_svc; @ISA = qw( FS::h_Common FS::cust_svc ); -$DEBUG = 1; +$DEBUG = 0; sub table { 'h_cust_svc'; } @@ -80,13 +80,15 @@ sub h_svc_x { "h_$svcdb", { 'svcnum' => $self->svcnum, }, "FS::h_$svcdb"->sql_h_searchs(@_), - ) || $self->SUPER::svc_x - or die "no history ${svcdb}.svcnum for cust_svc.svcnum ". $self->svcnum; + ) || $self->SUPER::svc_x; - carp "Using $svcdb in place of missing h_${svcdb} record." - if ($svc_x->isa('FS::' . $svcdb) and $DEBUG); - - return $svc_x; + if ($svc_x) { + carp "Using $svcdb in place of missing h_${svcdb} record." + if ($svc_x->isa('FS::' . $svcdb) and $DEBUG); + return $svc_x; + } else { + return ''; + } }