diff options
author | ivan <ivan> | 2003-08-08 02:02:41 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-08-08 02:02:41 +0000 |
commit | ef7bb336cc67f127fb1d77532ad3da1369c0ae36 (patch) | |
tree | c2497e7638806744c54097d2ecd017d4423dfd2e /httemplate/graph/money_time-graph.cgi | |
parent | 69ecd0e15d3de36b56ad133d5ae57dcddc53c63e (diff) |
- fix Mason profiling to pass-through images (for graph/)
- fix graph/money-time.cgi use of $m interfering with Mason
- fix graph/money-time-graph.cgi to set content-type in a Mason/ASP-independant
fashion
- (beginning of) includes!
- (beginning of) moving SQL search to including generic elements/search.html
- fix global.asa typo
- fix masonize to not prepend an extraneous blank line (breaking
graph/money-time-graph.cgi)
Diffstat (limited to 'httemplate/graph/money_time-graph.cgi')
-rwxr-xr-x | httemplate/graph/money_time-graph.cgi | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/httemplate/graph/money_time-graph.cgi b/httemplate/graph/money_time-graph.cgi index 944019a7a..76f1bd7bd 100755 --- a/httemplate/graph/money_time-graph.cgi +++ b/httemplate/graph/money_time-graph.cgi @@ -62,14 +62,14 @@ while ( $syear < $eyear || ( $syear == $eyear && $smonth < $emonth ) ) { my $refunded = $refunded_sth->fetchrow_arrayref->[0] || 0; #horrible local kludge that doesn't even really work right - my $expenses_sql = "SELECT SUM(cust_bill_pay.amount) FROM cust_bill_pay, cust_bill WHERE cust_bill_pay.invnum = cust_bill.invnum AND cust_bill_pay._date >= $speriod AND cust_bill_pay._date < $eperiod AND 0 < ( select count(*) from cust_bill_pkg, cust_pkg, part_pkg WHERE cust_bill.invnum = cust_bill_pkg.invnum AND cust_pkg.pkgnum = cust_bill_pkg.pkgnum AND cust_pkg.pkgpart = part_pkg.pkgpart AND LOWER(part_pkg.pkg) LIKE 'expense _%' )"; + my $expenses_sql2 = "SELECT SUM(cust_bill_pay.amount) FROM cust_bill_pay, cust_bill WHERE cust_bill_pay.invnum = cust_bill.invnum AND cust_bill_pay._date >= $speriod AND cust_bill_pay._date < $eperiod AND 0 < ( select count(*) from cust_bill_pkg, cust_pkg, part_pkg WHERE cust_bill.invnum = cust_bill_pkg.invnum AND cust_pkg.pkgnum = cust_bill_pkg.pkgnum AND cust_pkg.pkgpart = part_pkg.pkgpart AND LOWER(part_pkg.pkg) LIKE 'expense _%' )"; -# my $expenses_sql = "SELECT SUM(cust_bill_pay.amount) FROM cust_bill_pay, cust_bill_pkg, cust_bill, cust_pkg, part_pkg WHERE cust_bill_pay.invnum = cust_bill.invnum AND cust_bill.invnum = cust_bill_pkg.invnum AND cust_bill_pay._date >= $speriod AND cust_bill_pay._date < $eperiod AND cust_pkg.pkgnum = cust_bill_pkg.pkgnum AND cust_pkg.pkgpart = part_pkg.pkgpart AND LOWER(part_pkg.pkg) LIKE 'expense _%'"; - my $expenses_sth = dbh->prepare($expenses_sql) or die dbh->errstr; - $expenses_sth->execute or die $expenses_sth->errstr; - my $expenses = $expenses_sth->fetchrow_arrayref->[0] || 0; +# my $expenses_sql2 = "SELECT SUM(cust_bill_pay.amount) FROM cust_bill_pay, cust_bill_pkg, cust_bill, cust_pkg, part_pkg WHERE cust_bill_pay.invnum = cust_bill.invnum AND cust_bill.invnum = cust_bill_pkg.invnum AND cust_bill_pay._date >= $speriod AND cust_bill_pay._date < $eperiod AND cust_pkg.pkgnum = cust_bill_pkg.pkgnum AND cust_pkg.pkgpart = part_pkg.pkgpart AND LOWER(part_pkg.pkg) LIKE 'expense _%'"; + my $expenses_sth2 = dbh->prepare($expenses_sql2) or die dbh->errstr; + $expenses_sth2->execute or die $expenses_sth2->errstr; + my $expenses2 = $expenses_sth2->fetchrow_arrayref->[0] || 0; - push @{$data{cash}}, $paid-$refunded-$expenses; + push @{$data{cash}}, $paid-$refunded-$expenses2; } @@ -101,7 +101,7 @@ my @data = ( \@labels, #$chart->cgi_png(\@data); http_header('Content-Type' => 'image/png' ); -$Response->{ContentType} = 'image/png'; +#$Response->{ContentType} = 'image/png'; $chart->_set_colors(); |