[freeside-commits] freeside/httemplate/view/cust_main packages.html, 1.54, 1.55
Ivan,,,
ivan at wavetail.420.am
Sun Mar 29 18:39:28 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail.420.am:/tmp/cvs-serv15182/httemplate/view/cust_main
Modified Files:
packages.html
Log Message:
doh, fix pkg display, RT#5083
Index: packages.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages.html,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- packages.html 30 Mar 2009 01:28:40 -0000 1.54
+++ packages.html 30 Mar 2009 01:39:26 -0000 1.55
@@ -86,9 +86,9 @@
% }
%
% 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 @@
$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);
More information about the freeside-commits
mailing list