[freeside-commits] freeside/httemplate/view cust_pkg.cgi,1.13,1.14

Ivan,,, ivan at wavetail.420.am
Tue Jul 12 02:31:23 PDT 2005


Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail:/tmp/cvs-serv8297/httemplate/view

Modified Files:
	cust_pkg.cgi 
Log Message:
<rjbs> More of the same: these patches make it safer to subclass FS::part_pkg's pkg_svc method by eliminating qsearches on table pkg_svc.

Index: cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_pkg.cgi,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cust_pkg.cgi	10 May 2003 06:45:45 -0000	1.13
+++ cust_pkg.cgi	12 Jul 2005 09:31:21 -0000	1.14
@@ -104,8 +104,9 @@
 
   #list of services this pkgpart includes
   my $pkg_svc;
-  my %pkg_svc = ();
-  foreach $pkg_svc ( qsearch('pkg_svc',{'pkgpart'=> $cust_pkg->pkgpart }) ) {
+  my %pkg_svc;
+  #foreach $pkg_svc ( qsearch('pkg_svc',{'pkgpart'=> $cust_pkg->pkgpart }) ) {
+  foreach $pkg_svc ( $cust_pkg->part_pkg->pkg_svc ) {
     $pkg_svc{$pkg_svc->svcpart} = $pkg_svc->quantity if $pkg_svc->quantity;
   }
 



More information about the freeside-commits mailing list