price plans web gui 1st pass, oh my
[freeside.git] / FS / FS / part_pkg.pm
index 863e962..d84b9c5 100644 (file)
@@ -46,11 +46,15 @@ inherits from FS::Record.  The following fields are currently supported:
 
 =item comment - Text name of this billing item definition (non-customer-viewable)
 
-=item setup - Setup fee
+=item setup - Setup fee expression
 
 =item freq - Frequency of recurring fee
 
-=item recur - Recurring fee
+=item recur - Recurring fee expression
+
+=item plan - Price plan
+
+=item plandata - Price plan data
 
 =back
 
@@ -128,19 +132,21 @@ sub check {
     || $self->ut_anything('setup')
     || $self->ut_number('freq')
     || $self->ut_anything('recur')
+    || $self->ut_alphan('plan')
+    || $self->ut_anything('plandata')
   ;
 }
 
 =item pkg_svc
 
 Returns all FS::pkg_svc objects (see L<FS::pkg_svc>) for this package
-definition.
+definition (with non-zero quantity).
 
 =cut
 
 sub pkg_svc {
   my $self = shift;
-  qsearch( 'pkg_svc', { 'pkgpart' => $self->pkgpart } );
+  grep { $_->quantity } qsearch( 'pkg_svc', { 'pkgpart' => $self->pkgpart } );
 }
 
 =item svcpart [ SVCDB ]
@@ -166,7 +172,7 @@ sub svcpart {
 
 =head1 VERSION
 
-$Id: part_pkg.pm,v 1.1 1999-08-04 09:03:53 ivan Exp $
+$Id: part_pkg.pm,v 1.3 2001-10-15 10:42:28 ivan Exp $
 
 =head1 BUGS