X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pkg.pm;h=8d79ed587b6b04f8bb15d781fb89480fc972629b;hp=2c157150db20c9a2189d63d4350ad4e6e62328b7;hb=395cc72629d31c8dcd138acf423e66d2d73d89d2;hpb=dafdfc24616b04a5ff594da31e2cdd03f58634b6 diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index 2c157150d..8d79ed587 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -470,7 +470,7 @@ sub details { my $sql = "SELECT detail FROM cust_bill_pkg_detail ". " WHERE billpkgnum = ". $self->billpkgnum. - " AND ( format IS NULL OR format != 'C' ". + " AND ( format IS NULL OR format != 'C' ) ". " ORDER BY detailnum"; my $sth = dbh->prepare($sql) or die dbh->errstr; $sth->execute or die $sth->errstr; @@ -531,7 +531,7 @@ sub details { #avoid the fetchall_arrayref and loop for less memory usage? - map { $_->[0] eq 'C' + map { (defined($_->[0]) && $_->[0] eq 'C') ? &{$format_sub}( $_->[1] ) : &{$escape_function}( $_->[1] ); } @@ -916,9 +916,9 @@ sub usage_classes { my %seen = (); foreach my $detail ( grep { ref($_) } @{$self->get('details')} ) { - $seen{ ref($detail) eq 'HASH' + $seen{ (ref($detail) eq 'HASH' ? $detail->{'classnum'} - : $detail->[3] + : $detail->[3]) || '' } = 1; } keys %seen;