summaryrefslogtreecommitdiff
path: root/FS/FS/Report/Table
diff options
context:
space:
mode:
authorivan <ivan>2004-03-12 08:56:50 +0000
committerivan <ivan>2004-03-12 08:56:50 +0000
commit5b27fba78299a534d6d75a7322f26cf6af402b19 (patch)
treec94d34ffbbe43ece6fdaed1e8a69017a8add1b04 /FS/FS/Report/Table
parent7dac99feb4d0e8ca4ced4a5af113112679affaf8 (diff)
don't run my local expenses kludge by default; horrible performance
Diffstat (limited to 'FS/FS/Report/Table')
-rw-r--r--FS/FS/Report/Table/Monthly.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/FS/FS/Report/Table/Monthly.pm b/FS/FS/Report/Table/Monthly.pm
index 9aebeee..3bbf01f 100644
--- a/FS/FS/Report/Table/Monthly.pm
+++ b/FS/FS/Report/Table/Monthly.pm
@@ -1,13 +1,15 @@
package FS::Report::Table::Monthly;
use strict;
-use vars qw( @ISA );
+use vars qw( @ISA $expenses_kludge );
use Time::Local;
use FS::UID qw( dbh );
use FS::Report::Table;
@ISA = qw( FS::Report::Table );
+$expenses_kludge = 0;
+
=head1 NAME
FS::Report::Table::Monthly - Tables of report data, indexed monthly
@@ -83,7 +85,7 @@ sub netsales { #net sales
);
#horrible local kludge
- my $expenses = $self->scalar_sql("
+ my $expenses = !$expenses_kludge ? 0 : $self->scalar_sql("
SELECT SUM(cust_bill_pkg.setup)
FROM cust_bill_pkg, cust_bill, cust_pkg, part_pkg
WHERE cust_bill.invnum = cust_bill_pkg.invnum
@@ -113,7 +115,7 @@ sub receipts { #cashflow
);
#horrible local kludge that doesn't even really work right
- my $expenses = $self->scalar_sql("
+ my $expenses = !$expenses_kludge ? 0 : $self->scalar_sql("
SELECT SUM(cust_bill_pay.amount)
FROM cust_bill_pay, cust_bill
WHERE cust_bill_pay.invnum = cust_bill.invnum