X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fsection.html;h=53bdfa14f8d42b2a92c502441d19e87a8df652f9;hb=b70b0d8c6f571a68ffb60c5ca728a230926abee4;hp=85f0c795a1f0c995c3aedf7af2454d08c607c9c9;hpb=dd825e780ad1e7d520f5c2d7f99c0f67fe892781;p=freeside.git
diff --git a/httemplate/view/cust_main/packages/section.html b/httemplate/view/cust_main/packages/section.html
index 85f0c795a..53bdfa14f 100755
--- a/httemplate/view/cust_main/packages/section.html
+++ b/httemplate/view/cust_main/packages/section.html
@@ -1,8 +1,4 @@
% if ( @$packages ) {
-% my $bgcolor1 = '#eeeeee';
-% my $bgcolor2 = '#ffffff';
-% my $bgcolor = '';
-
% #my $width = $show_location ? 'WIDTH="25%"' : 'WIDTH="33%"';
<% mt('Package') |h %> |
@@ -15,39 +11,39 @@
% #$FS::cust_pkg::DEBUG = 2;
% foreach my $cust_pkg (@$packages) {
+ <& .packagerow, $cust_pkg,
+ 'cust_main' => $opt{'cust_main'},
+ %conf_opt
+ &>
+% }
+% } else { # there are no packages
+
+% }
+<%def .packagerow>
%
-% if ( $bgcolor eq $bgcolor1 ) {
-% $bgcolor = $bgcolor2;
-% } else {
-% $bgcolor = $bgcolor1;
-% }
-%
-% my %iopt = (
-% 'bgcolor' => $bgcolor,
-% 'cust_pkg' => $cust_pkg,
-% 'part_pkg' => $cust_pkg->part_pkg,
-% 'cust_main' => $opt{'cust_main'},
-% %conf_opt,
-% );
-%
-
+% my ($cust_pkg, %iopt) = @_;
+% $iopt{'cust_pkg'} = $cust_pkg;
+% $iopt{'part_pkg'} = $cust_pkg->part_pkg;
-
+
<& package.html, %iopt &>
<& status.html, %iopt &>
-% if ( $show_location ) {
+% if ( $iopt{'show_location'} ) {
<& location.html, %iopt &>
% }
<& services.html, %iopt &>
-
-% } #foreach $cust_pkg
-%#
-% } #if @$packages
-% else {
-
+% $row++;
+% # include supplemental packages if any
+% $iopt{'supplemental'} = ($iopt{'supplemental'} || 0) + 1;
+% foreach my $supp_pkg ($cust_pkg->supplemental_pkgs) {
+% warn $supp_pkg->pkgnum;
+ <& .packagerow, $supp_pkg, %iopt &>
% }
-
+%def>
+<%shared>
+my $row = 0;
+%shared>
<%init>
my %opt = @_;