<TR>
<TD COLSPAN=<%$opt{colspan}%>>
<FONT SIZE=-1>
+% if ( !$cust_pkg->change_to_pkgnum # because on a technical level, change won't propagate,
+% # and there's not really a use case worth making that work
+% and $part_pkg->freq # technically possible to have contract_end w/o freq, but nonsensical
+% and $curuser->access_right('Change package contract end date')
+% ) {
+ ( <% pkg_change_contract_end_link($cust_pkg) %> )
+ <BR>
+% }
% if ( $cust_pkg->change_to_pkgnum ) {
% # then you can modify the package change
% if ( $curuser->access_right('Change customer package') ) {
% 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 ) %>
</TR>
% }
-% } else {
+% } else { # recurring package, not yet billed
<% pkg_status_row_colspan($cust_pkg, emt("Not yet billed ($billed_or_prepaid [_1])", myfreq($part_pkg) ), '', %opt ) %>
<TR>
<TD COLSPAN=<%$opt{colspan}%>>
<FONT SIZE=-1>
+
+% #change date links
+% if ( !$change_from and !$supplemental ) {
+% my $has_date_links = 0;
+% if ( !$cust_pkg->get('setup')
+% and $curuser->access_right('Change package start date')
+% ) {
+ ( <% pkg_change_start_link($cust_pkg) %> )
+% $has_date_links = 1;
+% }
+% if ( !$cust_pkg->change_to_pkgnum # because on a technical level, change won't propagate,
+% # and there's not really a use case worth making that work
+% and $curuser->access_right('Change package contract end date')
+% ) {
+ ( <% pkg_change_contract_end_link($cust_pkg) %> )
+% $has_date_links = 1;
+% }
+% if ($has_date_links) {
+ <BR>
+% }
+% }
+
% # action links
% if ( $change_from ) {
% # nothing
if ( $discount->months > 0 and $cust_pkg_discount->months_used > 0 ) {
my $remaining = $discount->months - $cust_pkg_discount->months_used;
$remaining = sprintf('%.2f', $remaining) if $remaining =~ /\./;
- $label .= <br> . emt("([_1] months remaining)",$remaining);
+ $label .= <br> . emt(" ([quant,_1,month,months] remaining)",$remaining);
}
$label .= '</SPAN>';
sub pkg_unhold_link {
include( '/elements/popup_link-cust_pkg.html',
- 'action' => $p. 'misc/unhold_pkg.html?',
+ 'action' => $p. 'misc/unhold_pkg.html',
'label' => emt('Start billing'),
'actionlabel' => emt('Start billing'),
'color' => '#00CC00',
'actionlabel' => emt('Un-cancel'),
#'color' => #?
'cust_pkg' => shift,
+ 'width' => 960,
+ 'height' => 740,
)
}
sub pkg_change_later_link {
my $cust_pkg = shift;
include( '/elements/popup_link-cust_pkg.html',
- 'action' => $p . 'misc/change_pkg.cgi?',
+ 'action' => $p . 'misc/change_pkg.cgi',
'label' => emt('Reschedule'),
'actionlabel' => emt('Edit scheduled change for'),
'cust_pkg' => $cust_pkg,
)
}
+sub pkg_change_start_link {
+ my $cust_pkg = shift;
+ include( '/elements/popup_link-cust_pkg.html',
+ 'action' => $p . 'misc/change_pkg_date.html?field=start_date',
+ 'label' => emt('Set start date'),
+ 'actionlabel' => emt('Set start of billing for'),
+ 'cust_pkg' => $cust_pkg,
+ 'width' => 510,
+ 'height' => 310,
+ )
+}
+
+sub pkg_change_contract_end_link {
+ my $cust_pkg = shift;
+ include( '/elements/popup_link-cust_pkg.html',
+ 'action' => $p . 'misc/change_pkg_date.html?field=contract_end',
+ 'label' => emt('Set contract end'),
+ 'actionlabel' => emt('Set contract end for'),
+ 'cust_pkg' => $cust_pkg,
+ 'width' => 510,
+ 'height' => 310,
+ )
+}
+
sub svc_recharge_link {
include( '/elements/popup_link-cust_svc.html',
'action' => $p. 'misc/recharge_svc.html',