+% if ( $change_from ) {
+% # This is the target package for a future change.
+% # Nothing you can do with it besides modify/cancel the
+% # future change, and that's on the current package.
+% } elsif ( $supplemental ) {
+% # Supplemental packages can't be changed independently.
+% # Show only "Add comments" and "Add invoice details".
+% } else {
+% # the usual case: links to change package definition,
+% # discount, and customization
+% my $br = 0;
+% if ( $curuser->access_right('Change customer package') ) {
+% $br=1;
+ ( <%pkg_change_link($cust_pkg)%> )
+% }
+%
+% if ( $curuser->access_right('Discount customer package')
+% && $part_pkg->can_discount
+% && ! scalar( @{ $cust_pkg->{_cust_pkg_discount_active} } )
+% && ( ! $opt{'term_discounts'}
+% || ! scalar($cust_pkg->part_pkg->part_pkg_discount)
+% )
+% )
+% {
+% $br=1;
+ ( <%pkg_discount_link($cust_pkg)%> )
+% }
+%
+% if ( $curuser->access_right('Customize customer package') ) {
+% $br=1;
+ ( <%pkg_customize_link($cust_pkg,$part_pkg)%> )
+% }
+%
+ <% $br ? '<BR>' : '' %>
+% }
+
+% if ( ( $curuser->access_right('Billing event reports')
+% || $curuser->access_right('View customer billing events')
+% )
+% && $cust_pkg->exists_cust_event
+% ) {
+ ( <%pkg_event_link($cust_pkg)%> )
+% }
+% } # a canceled recurring package, or else no_links is in effect
+
+ </FONT>
+ </TD>
+ </TR>
+
+
+ <TR>
+ <TD COLSPAN=2>
+
+% my $change_quan_label = 'Change quantity';
+% if ( $cust_pkg->quantity > 1 ) {
+% $change_quan_label = 'change';
+ <% mt('Quantity:') |h %>
+ <B><% $cust_pkg->quantity %></B>
+% }
+
+% if ( $curuser->access_right('Change customer package')
+% && ! $cust_pkg->get('cancel')
+% && ! $supplemental
+% && $part_pkg->freq ne '0'
+% && ! $opt{no_links}
+% && $opt{'invoice-unitprice'}
+% )
+% {
+ <FONT SIZE="-1">
+ ( <% pkg_change_quantity_link($cust_pkg, $change_quan_label) %> )
+ </FONT>
+% }
+
+ </TD>
+ </TR>
+
+
+ <TR>
+ <TD COLSPAN=2>