[freeside-commits] freeside/FS/FS cust_pkg.pm,1.161,1.162
Mark Wells
mark at wavetail.420.am
Wed Apr 7 18:15:27 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv3406/FS/FS
Modified Files:
cust_pkg.pm
Log Message:
RT#1382: beginning of package cost report
Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -w -d -r1.161 -r1.162
--- cust_pkg.pm 29 Mar 2010 00:23:07 -0000 1.161
+++ cust_pkg.pm 8 Apr 2010 01:15:25 -0000 1.162
@@ -2733,6 +2733,16 @@
'' => {},
);
+ if( exists($params->{'active'} ) ) {
+ # This overrides all the other date-related fields
+ my($beginning, $ending) = @{$params->{'active'}};
+ push @where,
+ "cust_pkg.setup IS NOT NULL",
+ "cust_pkg.setup <= $ending",
+ "(cust_pkg.cancel IS NULL OR cust_pkg.cancel >= $beginning )",
+ "NOT (".FS::cust_pkg->onetime_sql . ")";
+ }
+ else {
foreach my $field (qw( setup last_bill bill adjourn susp expire cancel )) {
next unless exists($params->{$field});
@@ -2749,6 +2759,7 @@
$orderby ||= "ORDER BY cust_pkg.$field";
}
+ }
$orderby ||= 'ORDER BY bill';
More information about the freeside-commits
mailing list