RT#17599: display cancelled services from history [display unprovisionable services...
[freeside.git] / httemplate / view / cust_main / packages / services.html
index d7644b7..a23a4c2 100644 (file)
@@ -10,6 +10,7 @@ function clearhint_search_cust_svc(obj, str) {
 }
     </SCRIPT>
 
+%  my $showdidlink = browse_received_did_inventory($cust_pkg->custnum);
 %  foreach my $part_svc (
 %    $cust_pkg->part_svc(
 %      'summarize_size'    => $opt{'cust_pkg-large_pkg_size'},
@@ -97,16 +98,32 @@ function clearhint_search_cust_svc(obj, str) {
 %             local $opt{'num_avail'} = $part_svc->num_avail;
               <BR><% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %>
 %           }
-%           if (browse_received_did_inventory($cust_pkg->custnum)) {
+%           if ($showdidlink) {
               <BR><A HREF="<%$p%>browse/did_order.html?custnum=<%$cust_pkg->custnum%>"><% mt('Browse Received DID Inventory') |h %></A> 
 %           }
 %       }
         </TD>
       </TR>
 
-%   } 
+%   }
+
+% } #foreach part_svc
+
+% if ($cust_pkg->get('cancel')) {
+%   foreach my $svc (
+%     $cust_pkg->uncancel_svc_summary('summarize_size' => $opt{'cust_pkg-large_pkg_size'}, 'no_test_reprovision' => 1)
+%   ) {
+      <TR>
+        <TD ALIGN="right" VALIGN="top"><% $svc->{'svc'} |h %></TD>
+        <TD STYLE="padding-bottom:0px; font-style: italic">
+        <% $svc->{'num_cust_svc'} 
+           ? $svc->{'num_cust_svc'} . ' ' . emt('services in history') 
+           : (defined($svc->{'label'}) ? $svc->{'label'} : emt('(cannot load svc label)')) |h %>
+        </TD>
+      </TR>
+%   }
+% }
 
-% } 
 
     </TABLE>
   </TD>