From: ivan Date: Tue, 27 Dec 2011 00:37:38 +0000 (+0000) Subject: fix cancellations of cust_svc records without corresponding svc_* records X-Git-Tag: freeside_2_3_1~51 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=19f52165d9862b245b177fc2112835cdcf9c001b fix cancellations of cust_svc records without corresponding svc_* records --- diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index aecb894d7..b49ed6c5f 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -775,7 +775,7 @@ sub cancel { #schwartz map { $_->[0] } sort { $a->[1] <=> $b->[1] } - map { [ $_, $_->svc_x->table_info->{'cancel_weight'} ]; } + map { [ $_, $_->svc_x ? $_->svc_x->table_info->{'cancel_weight'} : -1 ]; } qsearch( 'cust_svc', { 'pkgnum' => $self->pkgnum } ) ) { my $part_svc = $cust_svc->part_svc;