[freeside-commits] freeside/httemplate/view/cust_main packages.html, 1.55, 1.56

Ivan,,, ivan at wavetail.420.am
Sun Mar 29 20:12:28 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail.420.am:/tmp/cvs-serv16404/httemplate/view/cust_main

Modified Files:
	packages.html 
Log Message:
really prevent separate part_pkg query, RT#5083

Index: packages.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages.html,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- packages.html	30 Mar 2009 01:39:26 -0000	1.55
+++ packages.html	30 Mar 2009 03:12:25 -0000	1.56
@@ -85,11 +85,6 @@
 %     $bgcolor = $bgcolor1;
 %   }
 %
-%   my %hash = $cust_pkg->hash;
-%   my %part_pkg = map  { /^part_pkg_(.+)$/ or die; ( $1 => $hash{$_} ); }
-%                  grep { /^part_pkg_/ } keys %hash;
-%   $cust_pkg->{'_pkgpart'} = new FS::part_pkg \%part_pkg;
-%
 %   my %iopt = (
 %     'bgcolor'  => $bgcolor,
 %     'cust_pkg' => $cust_pkg,
@@ -184,6 +179,13 @@
   } );
   my $num_old_packages = scalar(@packages);
 
+  foreach my $cust_pkg ( @packages ) {
+    my %hash = $cust_pkg->hash;
+    my %part_pkg = map  { /^part_pkg_(.+)$/ or die; ( $1 => $hash{$_} ); }
+                   grep { /^part_pkg_/ } keys %hash;
+    $cust_pkg->{'_pkgpart'} = new FS::part_pkg \%part_pkg;
+  }
+
   unless ( $cgi->param('showoldpackages') ) {
     my $years = $conf->config('cust_main-packages-years') || 2;
     my $seconds = 31556926; #60*60*24*365.2422 is close enough



More information about the freeside-commits mailing list