[freeside-commits] freeside/FS/FS cust_pkg.pm,1.123,1.124
Ivan,,,
ivan at wavetail.420.am
Sun Mar 29 22:08:55 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv21018/FS/FS
Modified Files:
cust_pkg.pm
Log Message:
and hopefully actually using the count will finally do it, RT#5083
Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- cust_pkg.pm 30 Mar 2009 04:50:13 -0000 1.123
+++ cust_pkg.pm 30 Mar 2009 05:08:53 -0000 1.124
@@ -1415,14 +1415,14 @@
sub cust_svc {
my $self = shift;
+ return () unless $self->num_cust_svc(@_);
+
if ( @_ ) {
return qsearch( 'cust_svc', { 'pkgnum' => $self->pkgnum,
'svcpart' => shift, } );
}
- return () unless $self->num_cust_svc;
-
- cluck "cust_pkg->cust_svc called" if $DEBUG > 1;
+ cluck "cust_pkg->cust_svc called" if $DEBUG > 2;
#if ( $self->{'_svcnum'} ) {
# values %{ $self->{'_svcnum'}->cache };
@@ -1496,8 +1496,9 @@
my $self = shift;
return $self->{'_num_cust_svc'}
- if !@_ && exists($self->{'_num_cust_svc'})
- && $self->{'_num_cust_svc'} =~ /\d/;
+ if !scalar(@_)
+ && exists($self->{'_num_cust_svc'})
+ && $self->{'_num_cust_svc'} =~ /\d/;
my $sql = 'SELECT COUNT(*) FROM cust_svc WHERE pkgnum = ?';
$sql .= ' AND svcpart = ?' if @_;
More information about the freeside-commits
mailing list