summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main/packages/package.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view/cust_main/packages/package.html')
-rw-r--r--httemplate/view/cust_main/packages/package.html23
1 files changed, 12 insertions, 11 deletions
diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html
index b07e1af..280a016 100644
--- a/httemplate/view/cust_main/packages/package.html
+++ b/httemplate/view/cust_main/packages/package.html
@@ -6,7 +6,7 @@
ID ="cust_pkg<% $cust_pkg->pkgnum %>"
><% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B></A>
-
- <% $part_pkg->comment |h %>
+ <% $part_pkg->custom_comment |h %>
</TD>
</TR>
@@ -38,7 +38,7 @@
%
% if ( $curuser->access_right('Customize customer package') ) {
% $br=1;
- (&nbsp;<%pkg_customize_link($cust_pkg,$cust_pkg->custnum)%>&nbsp;)
+ (&nbsp;<%pkg_customize_link($cust_pkg,$part_pkg)%>&nbsp;)
% }
%
<% $br ? '<BR>' : '' %>
@@ -58,18 +58,18 @@
% my $editi = $curuser->access_right('Edit customer package invoice details');
% my $editc = $curuser->access_right('Edit customer package comments');
+% my @cust_pkg_detail = $cust_pkg->cust_pkg_detail;
+% my @invoice_detail = grep { $_->detailtype eq 'I' } @cust_pkg_detail;
+% my @comments = grep { $_->detailtype eq 'C' } @cust_pkg_detail;
%
-% if ( $cust_pkg->cust_pkg_detail('I')
-% || $cust_pkg->cust_pkg_detail('C')
-% || $editi
-% || $editc ) {
+% if ( scalar(@invoice_detail) || scalar(@comments) || $editi || $editc ) {
%
% my $editlink = $p. 'edit/cust_pkg_detail?pkgnum='. $cust_pkg->pkgnum.
% ';detailtype=';
<TR>
-% if ( $cust_pkg->cust_pkg_detail('I') ) {
+% if ( @invoice_detail ) {
<TD VALIGN="top">
<% include('/elements/table-grid.html') %>
<TR>
@@ -89,7 +89,7 @@
</FONT>
</TH>
</TR>
-% foreach my $cust_pkg_detail ( $cust_pkg->cust_pkg_detail('I') ) {
+% foreach my $cust_pkg_detail ( @invoice_detail ) {
<TR>
<TD><FONT SIZE="-1">&nbsp;-&nbsp;<% $cust_pkg_detail->detail |h %></FONT></TD>
</TR>
@@ -113,7 +113,7 @@
</TD>
% }
-% if ( $cust_pkg->cust_pkg_detail('C') ) {
+% if ( @comments ) {
<TD VALIGN="top">
<% include('/elements/table-grid.html') %>
<TR>
@@ -133,7 +133,7 @@
</FONT>
</TH>
</TR>
-% foreach my $cust_pkg_detail ( $cust_pkg->cust_pkg_detail('C') ) {
+% foreach my $cust_pkg_detail ( @comments ) {
<TR>
<TD><FONT SIZE="-1">&nbsp;-&nbsp;<% $cust_pkg_detail->detail |h %></FONT></TD>
</TR>
@@ -198,9 +198,10 @@ sub pkg_dates_link { pkg_link('edit/REAL_cust_pkg', 'Edit&nbsp;dates', @_ ); }
sub pkg_customize_link {
my $cust_pkg = shift or return '';
+ my $part_pkg = shift;
my $custnum = $cust_pkg->custnum;
qq!<A HREF="${p}edit/part_pkg.cgi?!.
- "clone=". $cust_pkg->part_pkg->pkgpart. ';'.
+ "clone=". $part_pkg->pkgpart. ';'.
"pkgnum=". $cust_pkg->pkgnum.
qq!">Customize</A>!;
}