-% && $part_svc->svcdb eq 'svc_phone' ) {
- <BR><A HREF="<%$p%>browse/did_order.html?custnum=<%$cust_pkg->custnum%>"><% mt('Browse Received DID Inventory') |h %></A>
+% && $part_svc->svcdb eq 'svc_phone'
+% && ! $opt{no_links}
+% )
+% {
+% if ( $part_svc->num_avail > 5 ) {
+% local $opt{'bulk'} = 1;
+% local $opt{'svc_phone_bulk_provision_simple'} = $svc_phone_bulk_provision_simple;
+% local $opt{'num_avail'} = $part_svc->num_avail;
+ <BR><% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %>
+% }
+% if (
+% qsearch({
+% 'table' => 'did_order',
+% 'hashref' => { 'custnum' => $cust_pkg->custnum },
+% 'extra_sql' => ' LIMIT 1'
+% })
+% ||
+% qsearch({
+% 'table' => 'did_order_item',
+% 'hashref' => { 'custnum' => $cust_pkg->custnum },
+% 'addl_from' => ' INNER JOIN did_order ON did_order_item.ordernum = did_order.ordernum',
+% 'extra_sql' => ' LIMIT 1'
+% })
+% ) {
+ <BR><A HREF="<%$p%>browse/did_order.html?custnum=<%$cust_pkg->custnum%>"><% mt('Browse Received DID Inventory') |h %></A>
+% }