<% pkg_status_row_discount( $cust_pkg, %opt ) %>
-% unless ( $cust_pkg->order_date eq $cust_pkg->get('susp') ) { #on hold
-% unless ( $cust_pkg->get('setup') ) {
- <% pkg_status_row_colspan( $cust_pkg, emt('Never billed'), '', %opt ) %>
-% } else {
+% if ( $cust_pkg->order_date ne $cust_pkg->get('susp') ) { # not on hold
+% if ( $cust_pkg->get('setup') ) {
<% pkg_status_row($cust_pkg, emt('Setup'), 'setup', %opt ) %>
+% } else {
+ <% pkg_status_row_colspan( $cust_pkg, emt('Never billed'), '', %opt ) %>
% }
% }
% }
% if ( $curuser->access_right('Unsuspend customer package') ) {
% if ( $cust_pkg->order_date eq $cust_pkg->get('susp') ) { #on hold
- ( <% pkg_link('misc/unsusp_pkg', emt('Start billing now'), $cust_pkg) %> )
+ ( <% pkg_unhold_link($cust_pkg) %> )
% } else {
( <% pkg_unsuspend_link($cust_pkg) %> )
( <% pkg_resume_link($cust_pkg) %> )
% if ( $change_from ) { # future change
%
<% pkg_status_row_colspan( $cust_pkg, emt('Waiting for package change'), '', %opt ) %>
- <% pkg_status_row( $cust_pkg,
+ <% pkg_status_row_if( $cust_pkg,
emt('Will be activated on'),
'start_date',
%opt ) %>
% }
% }
-% # suspension actions--always available
-% if ( $curuser->access_right('Suspend customer package') ) {
- ( <% pkg_suspend_link($cust_pkg) %> )
-% }
-% if ( $curuser->access_right('Suspend customer package later') ) {
- ( <% pkg_adjourn_link($cust_pkg) %> )
-% }
-% if ( $curuser->access_right('Delay suspension events') ) {
- ( <% pkg_delay_link($cust_pkg) %> )
+% if ( !$change_from ) {
+% # suspension actions--always available
+% if ( $curuser->access_right('Suspend customer package') ) {
+ ( <% pkg_suspend_link($cust_pkg) %> )
+% }
+% if ( $curuser->access_right('Suspend customer package later') ) {
+ ( <% pkg_adjourn_link($cust_pkg) %> )
+% }
+% if ( $curuser->access_right('Delay suspension events') ) {
+ ( <% pkg_delay_link($cust_pkg) %> )
+% }
% }
%
% if ( $change_from or $cust_pkg->change_to_pkgnum ) {
if ( $discount->months ) {
my $remaining = $discount->months - $cust_pkg_discount->months_used;
$remaining = sprintf('%.2f', $remaining) if $remaining =~ /\./;
- $label .= emt("([_1] months remaining)",$remaining);
+ $label .= emt(" ([quant,_1,month,months] remaining)",$remaining);
}
$label .= ' <FONT SIZE="-1">('.
)
}
+sub pkg_unhold_link {
+ include( '/elements/popup_link-cust_pkg.html',
+ 'action' => $p. 'misc/unhold_pkg.html?',
+ 'label' => emt('Start billing'),
+ 'actionlabel' => emt('Start billing'),
+ 'color' => '#00CC00',
+ 'width' => 510,
+ 'height' => 310,
+ 'cust_pkg' => shift,
+ )
+}
+
sub pkg_unsuspend_link { pkg_link('misc/unsusp_pkg', emt('Unsuspend now'), @_ ); }
sub pkg_unadjourn_link { pkg_link('misc/unadjourn_pkg', emt('Abort'), @_ ); }
sub pkg_unexpire_link { pkg_link('misc/unexpire_pkg', emt('Abort'), @_ ); }