X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_ApplicationCommon.pm;fp=FS%2FFS%2Fcust_bill_ApplicationCommon.pm;h=ec694ca583959252c32a6ce962fef499a19ad4e3;hb=4396080ed2829ae0595f1fd777f39d090c9bcd7c;hp=af7e0879e9c01d11a10242132fa05666e512beb3;hpb=50f5d60aef5ee82be33c978db6424372bfd7995b;p=freeside.git diff --git a/FS/FS/cust_bill_ApplicationCommon.pm b/FS/FS/cust_bill_ApplicationCommon.pm index af7e0879e..ec694ca58 100644 --- a/FS/FS/cust_bill_ApplicationCommon.pm +++ b/FS/FS/cust_bill_ApplicationCommon.pm @@ -115,6 +115,8 @@ sub apply_to_lineitems { my @apply = (); + my $conf = new FS::Conf; + local $SIG{HUP} = 'IGNORE'; local $SIG{INT} = 'IGNORE'; local $SIG{QUIT} = 'IGNORE'; @@ -127,6 +129,8 @@ sub apply_to_lineitems { my $dbh = dbh; my @open = $self->cust_bill->open_cust_bill_pkg; #FOR UPDATE...? + @open = grep { $_->pkgnum == $self->pkgnum } @open + if $conf->exists('pkg-balances') && $self->pkgnum; warn "$me ". scalar(@open). " open line items for invoice ". $self->cust_bill->invnum. ": ". join(', ', @open). "\n" if $DEBUG;