From 25d9baac5e5ef0be9801b54f8365fc40b639a546 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Mon, 5 Nov 2012 14:09:50 -0800 Subject: [PATCH] fix ICS invoice spooling when service records are missing, #17620 --- FS/FS/cust_bill.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index dad54348e..128aaf7e0 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2248,11 +2248,13 @@ sub print_csv { $part_svc_class->classname : ''; } - + + my $svc_x = $cust_svc->svc_x or + warn "missing svc_x record for svc#".$cust_svc->svcnum."\n"; push @details, sprintf('01%-9s%-20s%-47s', $cust_svc->svcnum, $svc_class{$svcpart}, - $cust_svc->svc_x->label, + ($svc_x ? $svc_x->label : ''), ); } #foreach $cust_svc } #if $cust_pkg -- 2.11.0