From: ivan Date: Thu, 15 Jun 2000 12:38:09 +0000 (+0000) Subject: fix for ncancelled_pkgs - when called in scalar context, was only returning X-Git-Tag: freeside_1_3_0~133 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ffe6f2fa392b5b8b190304e699c2a8fdc82476ed fix for ncancelled_pkgs - when called in scalar context, was only returning second item --- diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 26883d554..34d601d67 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -450,15 +450,16 @@ Returns all non-cancelled packages (see L) for this customer. sub ncancelled_pkgs { my $self = shift; - qsearch( 'cust_pkg', { - 'custnum' => $self->custnum, - 'cancel' => '', - }), - qsearch( 'cust_pkg', { - 'custnum' => $self->custnum, - 'cancel' => 0, - }), - ; + @{ [ # force list context + qsearch( 'cust_pkg', { + 'custnum' => $self->custnum, + 'cancel' => '', + }), + qsearch( 'cust_pkg', { + 'custnum' => $self->custnum, + 'cancel' => 0, + }), + ] }; } =item bill OPTIONS @@ -993,7 +994,7 @@ sub check_invoicing_list { =head1 VERSION -$Id: cust_main.pm,v 1.4 2000-02-02 20:22:18 ivan Exp $ +$Id: cust_main.pm,v 1.5 2000-06-15 12:38:09 ivan Exp $ =head1 BUGS