[freeside-commits] branch master updated. 65bead8e2353121c19cc55f9483f2662c9f3bb23
Ivan
ivan at 420.am
Wed Mar 13 15:56:38 PDT 2013
The branch, master has been updated
via 65bead8e2353121c19cc55f9483f2662c9f3bb23 (commit)
from c44e4e574c9268eae9213f95abc08471c45b48d0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 65bead8e2353121c19cc55f9483f2662c9f3bb23
Author: Ivan Kohler <ivan at freeside.biz>
Date: Wed Mar 13 15:56:35 2013 -0700
optimize line item detail "Credited" column inefficiency sometimes causing load issues for big installs, RT#21933
diff --git a/httemplate/search/cust_bill_pkg.cgi b/httemplate/search/cust_bill_pkg.cgi
index 70b460d..0f51d94 100644
--- a/httemplate/search/cust_bill_pkg.cgi
+++ b/httemplate/search/cust_bill_pkg.cgi
@@ -629,13 +629,12 @@ if ( $cgi->param('credit') ) {
#still want a credit total column
- my $credit_sub = "SELECT SUM(cust_credit_bill_pkg.amount) AS credit_amount,
- billpkgnum
- FROM cust_credit_bill_pkg
- GROUP BY billpkgnum";
- $join_pkg .= " LEFT JOIN ($credit_sub) AS item_credit USING (billpkgnum)";
-
- push @select, 'item_credit.credit_amount';
+ my $credit_sub = "
+ SELECT SUM(cust_credit_bill_pkg.amount)
+ FROM cust_credit_bill_pkg
+ WHERE cust_bill_pkg.billpkgnum = cust_credit_bill_pkg.billpkgnum
+ ";
+ push @select, "($credit_sub) AS credit_amount";
}
-----------------------------------------------------------------------
Summary of changes:
httemplate/search/cust_bill_pkg.cgi | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
More information about the freeside-commits
mailing list