X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fservices.html;h=fa193d636305847b0857848b57f0ae036570aaad;hb=0c8c5a5727dda5f8e5cf6f999d5b671a77556c6a;hp=20b321483a40684a85d8e298dde8f3c3b652f120;hpb=db53e3e2958a14e711cc4cddb1e62bb61fe0c7ca;p=freeside.git diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html index 20b321483..fa193d636 100644 --- a/httemplate/view/cust_main/packages/services.html +++ b/httemplate/view/cust_main/packages/services.html @@ -3,17 +3,22 @@ % ###
% my $href="${p}search/cust_pkg_svc.html?svcpart=".$part_svc->svcpart. % ";pkgnum=".$cust_pkg->pkgnum; - <% $part_svc->svc %> + <% $part_svc->svc |h %> | (<% mt("view all [_1]", $num_cust_svc) |h %>) @@ -71,16 +76,43 @@ function clearhint_search_cust_svc(obj, str) { | |
- <% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %>
+
+
+% if ( $opt{no_links} ) {
+ <% $part_svc->svc |h %>: <% $part_svc->num_avail %>
+ <% mt('Available') |h %>
+% } else {
+ <% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %>
+% }
+
+
% if ( $curuser->access_right('Bulk provision customer service')
-% && $part_svc->svcdb eq 'svc_phone' ) {
+% && $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;
<% svc_provision_link($cust_pkg, $part_svc, \%opt, $curuser) %> % } -% #XXX if there's orders for this customer { +% 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' +% }) +% ) { <% mt('Browse Received DID Inventory') |h %> -% #} +% } % } |