X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fservices.html;h=a23a4c2fefd9d1ad3a0d7c8ae6691a2129df323a;hb=1939aff38dd65509468760264659091f4b6b3e78;hp=fa193d636305847b0857848b57f0ae036570aaad;hpb=3ece1c396f23e04cd659f1085f6eeee8bdfd846f;p=freeside.git diff --git a/httemplate/view/cust_main/packages/services.html b/httemplate/view/cust_main/packages/services.html index fa193d636..a23a4c2fe 100644 --- a/httemplate/view/cust_main/packages/services.html +++ b/httemplate/view/cust_main/packages/services.html @@ -10,6 +10,7 @@ function clearhint_search_cust_svc(obj, str) { } +% 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,29 +98,32 @@ function clearhint_search_cust_svc(obj, str) { % local $opt{'num_avail'} = $part_svc->num_avail;
<% 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 ($showdidlink) {
<% mt('Browse Received DID Inventory') |h %> % } % } -% } +% } + +% } #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) +% ) { + + <% $svc->{'svc'} |h %> + + <% $svc->{'num_cust_svc'} + ? $svc->{'num_cust_svc'} . ' ' . emt('services in history') + : (defined($svc->{'label'}) ? $svc->{'label'} : emt('(cannot load svc label)')) |h %> + + +% } +% } -% } @@ -183,6 +187,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)'),