[freeside-commits] branch master updated. 65acf1fd9746f1dd98e061044657c185367f7903

Ivan ivan at 420.am
Mon Dec 17 13:44:42 PST 2012


The branch, master has been updated
       via  65acf1fd9746f1dd98e061044657c185367f7903 (commit)
      from  74b63c87c33cdd97f7b9239e626d34bded497e20 (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 65acf1fd9746f1dd98e061044657c185367f7903
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Dec 17 13:44:39 2012 -0800

    add line item report, RT#18676

diff --git a/httemplate/search/cust_bill_pkg.cgi b/httemplate/search/cust_bill_pkg.cgi
index ed34440..0c5fbd2 100644
--- a/httemplate/search/cust_bill_pkg.cgi
+++ b/httemplate/search/cust_bill_pkg.cgi
@@ -205,27 +205,27 @@ if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
   push @where, "cust_main.custnum = $1";
 }
 
+# then we want the package and its definition
+$join_pkg = 
+' LEFT JOIN cust_pkg      USING (pkgnum) 
+  LEFT JOIN part_pkg      USING (pkgpart)';
+
+my $part_pkg = 'part_pkg';
+if ( $cgi->param('use_override') ) {
+  # still need the real part_pkg for tax applicability, 
+  # so alias this one
+  $join_pkg .= " LEFT JOIN part_pkg AS override ON (
+  COALESCE(cust_bill_pkg.pkgpart_override, cust_pkg.pkgpart, 0) = part_pkg.pkgpart
+  )";
+  $part_pkg = 'override';
+}
+push @select, 'part_pkg.pkg'; # or should this use override?
+
 # the non-tax case
 if ( $cgi->param('nottax') ) {
 
   push @where, 'cust_bill_pkg.pkgnum > 0';
 
-  # then we want the package and its definition
-  $join_pkg = 
-' LEFT JOIN cust_pkg      USING (pkgnum) 
-  LEFT JOIN part_pkg      USING (pkgpart)';
-
-  my $part_pkg = 'part_pkg';
-  if ( $cgi->param('use_override') ) {
-    # still need the real part_pkg for tax applicability, 
-    # so alias this one
-    $join_pkg .= " LEFT JOIN part_pkg AS override ON (
-    COALESCE(cust_bill_pkg.pkgpart_override, cust_pkg.pkgpart, 0) = part_pkg.pkgpart
-    )";
-    $part_pkg = 'override';
-  }
-  push @select, 'part_pkg.pkg'; # or should this use override?
-
   my @tax_where; # will go into a subquery
   my @exempt_where; # will also go into a subquery
 

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

Summary of changes:
 httemplate/search/cust_bill_pkg.cgi |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)




More information about the freeside-commits mailing list