X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_Common.pm;h=afd5db64f19733ada2dae3a09670187eb82073f1;hb=e2ee874843b19f6c5221f5ce0af90979dba34e57;hp=4fd2d0b634e1937029799e098d83e36a1b042b46;hpb=19c77bd46e3d0155b9f2a1afb7a3c488bc050f65;p=freeside.git diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm index 4fd2d0b63..afd5db64f 100644 --- a/FS/FS/svc_Common.pm +++ b/FS/FS/svc_Common.pm @@ -122,6 +122,15 @@ sub virtual_fields { =item label +Returns a label to identify a record of this service. +Label may be displayed on freeside screens, and within customer bills. + +For example, $obj->label may return: + + - A provisioned phone number for svc_phone + - The mailing list name and e-mail address for svc_mailinglist + - The address of a rental property svc_realestate + svc_Common provides a fallback label subroutine that just returns the svcnum. =cut @@ -719,6 +728,8 @@ sub setx { sub part_svc { my $self = shift; + cluck 'svc_X->part_svc called' if $DEBUG; + #get part_svc my $svcpart; if ( $self->get('svcpart') ) { @@ -1479,8 +1490,12 @@ sub search { } #svcnum - if ( $params->{'svcnum'} =~ /^(\d+)$/ ) { - push @where, "svcnum = $1"; + if ( $params->{'svcnum'} ) { + my @svcnum = ref( $params->{'svcnum'} ) + ? @{ $params->{'svcnum'} } + : $params->{'svcnum'}; + @svcnum = grep /^\d+$/, @svcnum; + push @where, 'svcnum IN ('. join(',', @svcnum) . ')' if @svcnum; } # svcpart @@ -1580,4 +1595,3 @@ from the base documentation. =cut 1; -