diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2015-01-28 19:15:33 -0600 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2015-01-28 20:25:19 -0600 |
commit | f0715f53ffe05777e8a4ad5542c034423758abe3 (patch) | |
tree | 71e985d978c7e55bc8a1304520c1a9fc2fe0ecba | |
parent | 0b425dc3033774ab661a348d8ac729a70be7f794 (diff) |
Ticket #32226: Disable bulk order link under provisioning link for svc_phone
-rw-r--r-- | httemplate/view/cust_main/packages/services.html | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html index fa193d636..d7644b7de 100644 --- a/httemplate/view/cust_main/packages/services.html +++ b/httemplate/view/cust_main/packages/services.html @@ -97,20 +97,7 @@ 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 ( -% 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' -% }) -% ) { +% if (browse_received_did_inventory($cust_pkg->custnum)) { <BR><A HREF="<%$p%>browse/did_order.html?custnum=<%$cust_pkg->custnum%>"><% mt('Browse Received DID Inventory') |h %></A> % } % } @@ -183,6 +170,21 @@ sub svc_provision_link { $link; } +sub browse_received_did_inventory { + local($FS::Record::qsearch_qualify_columns) = 1; + qsearch({ + 'table' => 'did_order', + 'hashref' => { 'custnum' => $_[0] }, + 'extra_sql' => ' LIMIT 1' + }) || + qsearch({ + 'table' => 'did_order_item', + 'hashref' => { 'custnum' => $_[0] }, + 'addl_from' => ' INNER JOIN did_order ON did_order_item.ordernum = did_order.ordernum', + 'extra_sql' => ' LIMIT 1' + }); +} + my %hints = ( svc_acct => emt('(user or email)'), svc_domain => emt('(domain)'), |