RT#17599: display cancelled services from history [display unprovisionable services...
[freeside.git] / httemplate / view / cust_main / packages / status.html
index d76c979..97011c3 100644 (file)
           </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 ) %>
 
           <% pkg_status_row_if($cust_pkg, emt('Start billing'), 'start_date', %opt) %>
           <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %>
 
+%         if ( !$opt{no_links}
+%               and !$change_from
+%               and !$supplemental # can be changed from its main package
+%               and $curuser->access_right('Change package start date') )
+%         {
+
+        <TR>
+          <TD COLSPAN=<%$opt{colspan}%>>
+            <FONT SIZE=-1>
+            (&nbsp;<% pkg_change_start_link($cust_pkg) %>&nbsp;)
+            </FONT>
+          </TD>
+        </TR>
+%         }
+          
 %       } 
 %
 %     } else { #setup
 %               }
 %           }
 
-%           if ( !$supplemental and !$change_from ) {
-%           # suspension actions--always available for a package that's
-%           # independently active
+%           if ( !$supplemental ) {
+%           # suspension actions--always available
 %             if ( $curuser->access_right('Suspend customer package') ) {
                 (&nbsp;<% pkg_suspend_link($cust_pkg) %>&nbsp;)
 %             }
@@ -668,7 +682,7 @@ sub pkg_resume_link {
 
 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',
@@ -701,6 +715,8 @@ sub pkg_uncancel_link {
              'actionlabel' => emt('Un-cancel'),
              #'color'       =>  #?
              'cust_pkg'    => shift,
+             'width'       => 960,
+             'height'      => 740,
          )
 }
 
@@ -717,7 +733,7 @@ sub pkg_expire_link {
 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,
@@ -726,6 +742,18 @@ sub pkg_change_later_link {
   )
 }
 
+sub pkg_change_start_link {
+  my $cust_pkg = shift;
+  include( '/elements/popup_link-cust_pkg.html',
+    'action'      => $p . 'misc/change_pkg_start.html',
+    'label'       => emt('Set start date'),
+    'actionlabel' => emt('Set start of billing 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',