[freeside-commits] freeside/httemplate/view/cust_main packages.html, 1.56, 1.57
Ivan,,,
ivan at wavetail.420.am
Sun Mar 29 21:15:58 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail.420.am:/tmp/cvs-serv20350/httemplate/view/cust_main
Modified Files:
packages.html
Log Message:
try not to search for nothing in cust_svc so much, RT#5083
Index: packages.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages.html,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- packages.html 30 Mar 2009 03:12:25 -0000 1.56
+++ packages.html 30 Mar 2009 04:15:56 -0000 1.57
@@ -173,9 +173,17 @@
my $part_pkg_fields =
join(', ', map { "part_pkg.$_ AS part_pkg_$_" } fields('part_pkg') );
+ my $group_by =
+ join(', ', map "cust_pkg.$_", fields('cust_pkg') ). ', '.
+ join(', ', map "part_pkg.$_", fields('part_pkg') );
+
+ my $num_cust_svc =
+ '( SELECT COUNT(*) FROM cust_svc WHERE cust_pkg.pkgnum = cust_svc.svcnum )';
+
my @packages = $cust_main->$method( {
- 'select' => "$cust_pkg_fields, $part_pkg_fields",
- 'addl_from' => 'LEFT JOIN part_pkg USING ( pkgpart )'
+ 'select' => " $cust_pkg_fields, $part_pkg_fields, ".
+ " $num_cust_svc AS num_cust_svc ",
+ 'addl_from' => ' LEFT JOIN part_pkg USING ( pkgpart ) ',
} );
my $num_old_packages = scalar(@packages);
More information about the freeside-commits
mailing list