[freeside-commits] branch master updated. 29fb80073eb21f453515618f01d2c0d03a3004ec

Ivan ivan at 420.am
Thu Feb 11 05:39:45 PST 2016


The branch, master has been updated
       via  29fb80073eb21f453515618f01d2c0d03a3004ec (commit)
      from  33a67a59980166adf689f2f5327c7147e2cdf0bf (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 29fb80073eb21f453515618f01d2c0d03a3004ec
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Feb 11 05:39:44 2016 -0800

    fix advanced package report, RT#40292, fallout from RT#20173

diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 0b60ed7..02e0e1e 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -56,9 +56,11 @@ our ($disable_agentcheck, $DEBUG, $me, $import) = (0, 0, '[FS::cust_pkg]', 0);
 
 our $upgrade = 0; #go away after setup+start dates cleaned up for old customers
 
+our $cache_enabled = 0;
+
 sub _simplecache {
   my( $self, $hashref ) = @_;
-  if ( $hashref->{'pkg'} ) {
+  if ( $cache_enabled && $hashref->{'pkg'} && $hashref->{'plan'} ) {
     $self->{'_pkgpart'} = FS::part_pkg->new($hashref);
   }
 }
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index 2e81a4a..11cd3a3 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -518,6 +518,7 @@ my $addl_from = qq{
            AND recur_option.optionname = 'recur_fee' )
 };
 
+local($FS::cust_pkg::cache_enabled) = 1; #for $cust_pkg->part_pkg
 my %all_pkgs = map { $_->custnum =>
                        [ $_->$pkgs_method({ select    => $select,
                                             addl_from => $addl_from,
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index f1e686a..dbd346d 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -44,7 +44,7 @@
                         },
                     sub { my $c = shift;
                           sprintf( $money_char.'%.2f',
-                                   $c->part_pkg->base_recur($c)
+                                   $c->base_recur
                                  );
                         },
                     sub { FS::part_pkg::freq_pretty(shift); },

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

Summary of changes:
 FS/FS/cust_pkg.pm               |    4 +++-
 httemplate/search/cust_main.cgi |    1 +
 httemplate/search/cust_pkg.cgi  |    2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list