-<TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
+<TD CLASS="inv" BGCOLOR="<% $bgcolor %>" VALIGN="top">
<TABLE CLASS="inv" BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
<TR>
<TD COLSPAN=2>
( <%pkg_dates_link($cust_pkg)%> )
% }
%
+% if ( $curuser->access_right('Discount customer package')
+% && $part_pkg->can_discount
+% && ! scalar($cust_pkg->cust_pkg_discount_active)
+% )
+% {
+% $br=1;
+ ( <%pkg_discount_link($cust_pkg)%> )
+% }
+%
% if ( $curuser->access_right('Customize customer package') ) {
% $br=1;
( <%pkg_customize_link($cust_pkg,$part_pkg)%> )
sub pkg_dates_link { pkg_link('edit/REAL_cust_pkg', 'Edit dates', @_ ); }
+sub pkg_discount_link {
+ my $cust_pkg = shift or return '';
+ #my $part_pkg = shift;
+ #my $custnum = $cust_pkg->custnum;
+ include( '/elements/popup_link-cust_pkg.html',
+ 'action' => $p.'edit/cust_pkg_discount.html',
+ 'label' => 'Discount',
+ 'actionlabel' => 'Discount',
+ 'cust_pkg' => $cust_pkg,
+ 'width' => 616,
+ );
+}
+
sub pkg_customize_link {
my $cust_pkg = shift or return '';
my $part_pkg = shift;