summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2009-03-30 01:28:40 +0000
committerivan <ivan>2009-03-30 01:28:40 +0000
commitc9ac50fa78dcf1f9ac3dda747448ee8ef703d69c (patch)
tree6542e1b00294514577d41aacae87ac1734bc3fd7 /httemplate
parenta852ab2648b1496a0010276c2e3b516211190671 (diff)
fix setup date display, RT#5083
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/view/cust_main/packages.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/httemplate/view/cust_main/packages.html b/httemplate/view/cust_main/packages.html
index 07601dd54..8ff2269ab 100755
--- a/httemplate/view/cust_main/packages.html
+++ b/httemplate/view/cust_main/packages.html
@@ -85,6 +85,9 @@ Current packages
% $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 { $cust_pkg->hash }; #quelle klud
%
% my %iopt = (
@@ -169,8 +172,12 @@ sub get_packages {
$method = 'all_pkgs';
}
+ my $part_pkg_fields = join(', ', map { "part_pkg.$_ AS part_pkg_$_" }
+ fields('part_pkg')
+ );
+
my @packages = $cust_main->$method( {
- 'select' => 'cust_pkg.*, part_pkg.*',
+ 'select' => "cust_pkg.*, $part_pkg_fields",
'addl_from' => 'LEFT JOIN part_pkg USING ( pkgpart )'
} );
my $num_old_packages = scalar(@packages);