diff options
author | ivan <ivan> | 2009-03-30 01:39:26 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-03-30 01:39:26 +0000 |
commit | ff2ad3e74efe8173d362003e1efdce5953388acf (patch) | |
tree | b9088483eecf186d36bc7c48245af39482d395ec /httemplate/view/cust_main | |
parent | c9ac50fa78dcf1f9ac3dda747448ee8ef703d69c (diff) |
doh, fix pkg display, RT#5083
Diffstat (limited to 'httemplate/view/cust_main')
-rwxr-xr-x | httemplate/view/cust_main/packages.html | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html index 8ff2269ab..9b13a8f97 100755 --- a/httemplate/view/cust_main/packages.html +++ b/httemplate/view/cust_main/packages.html @@ -86,9 +86,9 @@ Current packages % } % % my %hash = $cust_pkg->hash; -% my %part_pkg = map { /^part_pkg_(.+)$/ or die; $1 => $hash{$_}; } +% my %part_pkg = map { /^part_pkg_(.+)$/ or die; ( $1 => $hash{$_} ); } % grep { /^part_pkg_/ } keys %hash; -% $cust_pkg->{'_pkgpart'} = new FS::part_pkg { $cust_pkg->hash }; #quelle klud +% $cust_pkg->{'_pkgpart'} = new FS::part_pkg \%part_pkg; % % my %iopt = ( % 'bgcolor' => $bgcolor, @@ -172,12 +172,14 @@ sub get_packages { $method = 'all_pkgs'; } - my $part_pkg_fields = join(', ', map { "part_pkg.$_ AS part_pkg_$_" } - fields('part_pkg') - ); + my $cust_pkg_fields = + join(', ', map { "cust_pkg.$_ AS $_" } fields('cust_pkg') ); + + my $part_pkg_fields = + join(', ', map { "part_pkg.$_ AS part_pkg_$_" } fields('part_pkg') ); my @packages = $cust_main->$method( { - 'select' => "cust_pkg.*, $part_pkg_fields", + 'select' => "$cust_pkg_fields, $part_pkg_fields", 'addl_from' => 'LEFT JOIN part_pkg USING ( pkgpart )' } ); my $num_old_packages = scalar(@packages); |