diff options
author | ivan <ivan> | 2009-03-30 06:10:18 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-03-30 06:10:18 +0000 |
commit | cec41a47c4cbb9eda007713e376970addc9ac626 (patch) | |
tree | 8276c33daee3ac0789c4b52cc38035bcb7ef8f69 /httemplate | |
parent | 5a66188aae7af4c05345c358f181b523fb2270fa (diff) |
okay. counts are needed for the package sort, so push the embedded counting into cust_main.pm. sure hope this does it. RT#5083
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/view/cust_main/packages.html | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html index 53ed6bf2b..d55560f34 100755 --- a/httemplate/view/cust_main/packages.html +++ b/httemplate/view/cust_main/packages.html @@ -177,13 +177,9 @@ sub get_packages { 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.pkgnum )'; - my @packages = $cust_main->$method( { - 'select' => " $cust_pkg_fields, $part_pkg_fields, ". - " $num_cust_svc AS num_cust_svc ", - 'addl_from' => ' LEFT JOIN part_pkg USING ( pkgpart ) ', + 'select' => "$cust_pkg_fields, $part_pkg_fields", + 'addl_from' => 'LEFT JOIN part_pkg USING ( pkgpart )', } ); my $num_old_packages = scalar(@packages); @@ -192,7 +188,6 @@ sub get_packages { my %part_pkg = map { /^part_pkg_(.+)$/ or die; ( $1 => $hash{$_} ); } grep { /^part_pkg_/ } keys %hash; $cust_pkg->{'_pkgpart'} = new FS::part_pkg \%part_pkg; - $cust_pkg->{'_num_cust_svc'} = $cust_pkg->get('num_cust_svc'); } unless ( $cgi->param('showoldpackages') ) { |