[freeside-commits] branch master updated. ef2bc5dcb69e67077ce45a624c107894765e3907

Mark Wells mark at 420.am
Mon Aug 17 12:18:24 PDT 2015


The branch, master has been updated
       via  ef2bc5dcb69e67077ce45a624c107894765e3907 (commit)
       via  45b87d63b047f23626a3ad9301a0dc0fd8797cae (commit)
      from  e5c7f9c125f212b867541b7768f15a9cf7418734 (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 ef2bc5dcb69e67077ce45a624c107894765e3907
Author: Mark Wells <mark at freeside.biz>
Date:   Mon Aug 17 12:13:14 2015 -0700

    but still show credited amount on line item report, #18676 fixes

diff --git a/httemplate/search/cust_bill_pkg.cgi b/httemplate/search/cust_bill_pkg.cgi
index ac686ea..4fb9b66 100644
--- a/httemplate/search/cust_bill_pkg.cgi
+++ b/httemplate/search/cust_bill_pkg.cgi
@@ -44,8 +44,8 @@
                    @currency,
                    'invnum',
                    '_date',
-                   '', #'pay_amount',
-                   '', #'credit_amount',
+                   'pay_amount',
+                   'credit_amount',
                    FS::UI::Web::cust_sort_fields(),
                  ],
                  'links'       => [
@@ -461,15 +461,6 @@ if ( $cgi->param('nottax') ) {
 
     }
 
-    # This is the only place we should attempt to show credits on here:
-    # the total of credit applications to the line item.
-
-    my $credit_sub = 'SELECT SUM(amount) AS credit_amount, billpkgnum
-    FROM cust_credit_bill_pkg GROUP BY billpkgnum';
-
-    $join_pkg .= " LEFT JOIN ($credit_sub) AS item_credit
-    ON (cust_bill_pkg.billpkgnum = item_credit.billpkgnum)";
-   
     if ( @tax_where or $cgi->param('taxable') ) {
       # process tax restrictions
       unshift @tax_where,
@@ -704,7 +695,15 @@ my $pay_sub = "SELECT SUM(cust_bill_pay_pkg.amount)
               ";
 push @select, "($pay_sub) AS pay_amount";
 
+#total credits
+my $credit_sub = 'SELECT SUM(amount) AS credit_amount, billpkgnum
+                  FROM cust_credit_bill_pkg GROUP BY billpkgnum';
+
+$join_pkg .= " LEFT JOIN ($credit_sub) AS item_credit
+  ON (cust_bill_pkg.billpkgnum = item_credit.billpkgnum)";
+push @select, 'credit_amount';
 
+# standard customer fields
 push @select, 'cust_main.custnum', FS::UI::Web::cust_sql_fields();
 
 #salesnum

commit 45b87d63b047f23626a3ad9301a0dc0fd8797cae
Author: Mark Wells <mark at freeside.biz>
Date:   Sun Aug 16 15:34:47 2015 -0700

    debug

diff --git a/httemplate/elements/tr-select-months.html b/httemplate/elements/tr-select-months.html
index 3ff28f9..b90ce1e 100644
--- a/httemplate/elements/tr-select-months.html
+++ b/httemplate/elements/tr-select-months.html
@@ -7,6 +7,5 @@ $opt{labels} = { '' => '',
                  map { $_ => emt('[quant,_1,month]', $_) } 1 .. $max
                };
 
-warn Dumper(\%opt);
 </%init>
 <& tr-select.html, %opt &>

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

Summary of changes:
 httemplate/elements/tr-select-months.html |    1 -
 httemplate/search/cust_bill_pkg.cgi       |   21 ++++++++++-----------
 2 files changed, 10 insertions(+), 12 deletions(-)




More information about the freeside-commits mailing list