[freeside-commits] branch FREESIDE_3_BRANCH updated. f0715f53ffe05777e8a4ad5542c034423758abe3

Jonathan Prykop jonathan at 420.am
Thu Jan 29 10:20:54 PST 2015


The branch, FREESIDE_3_BRANCH has been updated
       via  f0715f53ffe05777e8a4ad5542c034423758abe3 (commit)
       via  0b425dc3033774ab661a348d8ac729a70be7f794 (commit)
      from  6d0042982eec69028b9deef42ab2cd8ae015a077 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f0715f53ffe05777e8a4ad5542c034423758abe3
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Wed Jan 28 19:15:33 2015 -0600

    Ticket #32226: Disable bulk order link under provisioning link for svc_phone

diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html
index fa193d6..d7644b7 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)'),


commit 0b425dc3033774ab661a348d8ac729a70be7f794
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Fri Jan 23 13:06:32 2015 -0600

    RT 32226, only displaying DID order link if customer has DID order

diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html
index 5fe41a3..fa193d6 100644
--- a/httemplate/view/cust_main/packages/services.html
+++ b/httemplate/view/cust_main/packages/services.html
@@ -97,9 +97,22 @@ 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) %>
 %           }
-%           #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'
+%                       })
+%           ) {
               <BR><A HREF="<%$p%>browse/did_order.html?custnum=<%$cust_pkg->custnum%>"><% mt('Browse Received DID Inventory') |h %></A> 
-%           #}
+%           }
 %       }
         </TD>
       </TR>


-----------------------------------------------------------------------

Summary of changes:
 httemplate/view/cust_main/packages/services.html |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list