[freeside-commits] branch master updated. 22ee75c6f67806c9b4c366eea4510d4410dfe8df

Mark Wells mark at 420.am
Fri Oct 9 00:06:39 PDT 2015


The branch, master has been updated
       via  22ee75c6f67806c9b4c366eea4510d4410dfe8df (commit)
      from  37b0f7bbb5737d02444dca82da5c3234be069f20 (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 22ee75c6f67806c9b4c366eea4510d4410dfe8df
Author: Mark Wells <mark at freeside.biz>
Date:   Fri Oct 9 00:05:25 2015 -0700

    make credit date filtering work, #37088

diff --git a/httemplate/search/cust_bill_pkg.cgi b/httemplate/search/cust_bill_pkg.cgi
index 4dc300d..ab5aad7 100644
--- a/httemplate/search/cust_bill_pkg.cgi
+++ b/httemplate/search/cust_bill_pkg.cgi
@@ -713,8 +713,11 @@ if ( $cgi->param('credit_begin') or $cgi->param('credit_end') ) {
                   "AND cust_credit_bill._date <= $cr_end";
 }
 
-my $credit_sub = "SELECT SUM(amount) AS credit_amount, billpkgnum
-                  FROM cust_credit_bill_pkg $credit_where GROUP BY billpkgnum";
+my $credit_sub = "SELECT SUM(cust_credit_bill_pkg.amount) AS credit_amount, billpkgnum
+                  FROM cust_credit_bill_pkg
+                  JOIN cust_credit_bill USING (creditbillnum)
+                  $credit_where
+                  GROUP BY billpkgnum";
 
 $join_pkg .= " LEFT JOIN ($credit_sub) AS item_credit
   ON (cust_bill_pkg.billpkgnum = item_credit.billpkgnum)";
diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi
index 04bdf12..9e625c8 100644
--- a/httemplate/search/report_tax.cgi
+++ b/httemplate/search/report_tax.cgi
@@ -319,6 +319,7 @@ my $salescreditlink = $p. "search/cust_bill_pkg.cgi?$dateagentlink;nottax=1;cred
 if ( $params{'credit_date'} eq 'cust_credit_bill' ) {
   $salescreditlink =~ s/begin/credit_begin/;
   $salescreditlink =~ s/end/credit_end/;
+  $saleslink .= ";credit_begin=$beginning;credit_end=$ending";
 }
 #my $creditlink = $p. "search/cust_bill_pkg.cgi?$dateagentlink;credit=1;istax=1";
 #if ( $params{'credit_date'} eq 'cust_credit_bill' ) {

-----------------------------------------------------------------------

Summary of changes:
 httemplate/search/cust_bill_pkg.cgi |    7 +++++--
 httemplate/search/report_tax.cgi    |    1 +
 2 files changed, 6 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list