[freeside-commits] branch master updated. bec96a5b94e6c2484a48ed2d4300a1294fa80de6

Mark Wells mark at 420.am
Wed May 16 15:46:50 PDT 2012


The branch, master has been updated
       via  bec96a5b94e6c2484a48ed2d4300a1294fa80de6 (commit)
      from  8e6571688709ddca07e83191af6610d4248574a3 (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 bec96a5b94e6c2484a48ed2d4300a1294fa80de6
Author: Mark Wells <mark at freeside.biz>
Date:   Wed May 16 15:45:40 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 f196a0a..6551ca8 100644
--- a/FS/FS/cust_bill_pkg.pm
+++ b/FS/FS/cust_bill_pkg.pm
@@ -1082,9 +1082,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