X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=08be4e4e05fc5b48e34e6c1079b077a705834114;hb=b90f8cdac9371c219a72dda16f8deecc7c44fc28;hp=c31340d2f0bf0e90a00d8eeab8c79e41b7a3647c;hpb=6cd87c0d3b5280446301c647fa5f1ec5a593fa3f;p=freeside.git diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index c31340d2f..08be4e4e0 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -8,6 +8,7 @@ use FS::cust_svc; use FS::part_pkg; use FS::cust_main; use FS::type_pkgs; +use FS::pkg_svc; # need to 'use' these instead of 'require' in sub { cancel, suspend, unsuspend, # setup } @@ -15,6 +16,7 @@ use FS::type_pkgs; use FS::svc_acct; use FS::svc_acct_sm; use FS::svc_domain; +use FS::svc_www; @ISA = qw( FS::Record ); @@ -351,7 +353,7 @@ sub unsuspend { =item part_pkg Returns the definition for this billing item, as an FS::part_pkg object (see -L). =cut @@ -428,16 +430,15 @@ sub order { push @cust_svc, [ map { ( $svcnum{$_} && @{ $svcnum{$_} } ) ? shift @{ $svcnum{$_} } : (); - } (split(/,/, - qsearchs('part_pkg',{'pkgpart'=>$pkgpart})->getfield('services') - )) + } map { $_->svcpart } qsearch('pkg_svc', { 'pkgpart' => $pkgpart }) ]; } #check for leftover services foreach (keys %svcnum) { next unless @{ $svcnum{$_} }; - return "Leftover services!"; + return "Leftover services, svcpart $_: svcnum ". + join(', ', map { $_->svcnum } @{ $svcnum{$_} } ); } #no leftover services, let's make changes. @@ -490,7 +491,7 @@ sub order { =head1 VERSION -$Id: cust_pkg.pm,v 1.1 1999-08-04 09:03:53 ivan Exp $ +$Id: cust_pkg.pm,v 1.4 2000-02-03 05:16:52 ivan Exp $ =head1 BUGS