[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 27b6c1f10411eb95abec60d6e14a8a63b279cabd

Mark Wells mark at 420.am
Wed May 16 15:47:18 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  27b6c1f10411eb95abec60d6e14a8a63b279cabd (commit)
      from  1f119bfc22ca45df1e3714444f41851fce503fb5 (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 27b6c1f10411eb95abec60d6e14a8a63b279cabd
Author: Mark Wells <mark at freeside.biz>
Date:   Wed May 16 15:45:10 2012 -0700

    fix prepaid income report SQL, #13289

diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm
index 9b31108..4e8201e 100644
--- a/FS/FS/cust_bill_pkg.pm
+++ b/FS/FS/cust_bill_pkg.pm
@@ -1075,9 +1075,9 @@ and 'setuprecur' (set to "setup" or "recur" to limit to one or the other).
 sub owed_sql {
   my ($class, $start, $end, %opt) = @_;
   my $charged = 
-    $opt{setuprecur} =~ /^s/ ? 'setup' :
-    $opt{setuprecur} =~ /^r/ ? 'recur' :
-    'setup + recur';
+    $opt{setuprecur} =~ /^s/ ? 'cust_bill_pkg.setup' :
+    $opt{setuprecur} =~ /^r/ ? 'cust_bill_pkg.recur' :
+    'cust_bill_pkg.setup + cust_bill_pkg.recur';
 
   if ( $opt{no_usage} ) {
     $charged .= ' - ' . $class->usage_sql;
diff --git a/httemplate/search/cust_bill_pkg.cgi b/httemplate/search/cust_bill_pkg.cgi
index fd21596..a84f981 100644
--- a/httemplate/search/cust_bill_pkg.cgi
+++ b/httemplate/search/cust_bill_pkg.cgi
@@ -511,7 +511,7 @@ if ( $cgi->param('pkg_tax') ) {
   if ( $unearned ) {
     $count_query .= "SUM( $unearned_base ), SUM( $unearned_sql )";
   } elsif ( $use_usage eq 'recurring' ) {
-    $count_query .= "SUM(setup + recur - usage)";
+    $count_query .= "SUM(cust_bill_pkg.setup + cust_bill_pkg.recur - usage)";
   } elsif ( $use_usage eq 'usage' ) {
     $count_query .= "SUM(usage)";
   } elsif ( scalar( grep( /locationtaxid/, $cgi->param ) ) ) {

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

Summary of changes:
 FS/FS/cust_bill_pkg.pm              |    6 +++---
 httemplate/search/cust_bill_pkg.cgi |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)




More information about the freeside-commits mailing list