X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=b851ac7188fc0d9f22100ec9b258122397f72602;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=fea693e8223ef12d28444d6cef49827e14ed8087;hpb=2b96da0344fe5f46caf80257890312de444d935b;p=freeside.git diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index fea693e82..b851ac718 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -2,7 +2,7 @@ package FS::cust_pkg; use strict; use base qw( FS::otaker_Mixin FS::cust_main_Mixin FS::location_Mixin - FS::m2m_Common FS::option_Common ); + FS::m2m_Common FS::option_Common FS::Record ); use vars qw($disable_agentcheck $DEBUG $me); use Carp qw(cluck); use Scalar::Util qw( blessed ); @@ -1765,16 +1765,6 @@ sub status { return 'active'; } -=item ucfirst_status - -Returns the status with the first character capitalized. - -=cut - -sub ucfirst_status { - ucfirst(shift->status); -} - =item statuses Class method that returns the list of possible status strings for packages @@ -2436,25 +2426,14 @@ sub onetime_sql { " where cust_pkg.pkgpart = part_pkg.pkgpart ) "; } -=item ordered_sql - -Returns an SQL expression identifying ordered packages (recurring packages not -yet billed). - -=cut - -sub ordered_sql { - $_[0]->recurring_sql. " AND ". $_[0]->not_yet_billed_sql; -} - =item active_sql Returns an SQL expression identifying active packages. =cut -sub active_sql { - $_[0]->recurring_sql. " +sub active_sql { " + ". $_[0]->recurring_sql(). " AND cust_pkg.setup IS NOT NULL AND cust_pkg.setup != 0 AND ( cust_pkg.cancel IS NULL OR cust_pkg.cancel = 0 ) AND ( cust_pkg.susp IS NULL OR cust_pkg.susp = 0 )