X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_acct.cgi;h=e87a8ee9a831c751a637fddc3c7497ef9f0fc0cd;hb=2b8ffc98529637ffddfe7cbf6b4f9b8deb90f0fa;hp=8326818d6e163e3f4eae6c1783c39f25092823cd;hpb=5ca1a5271823c4e3ffbd2f53a0dff62692619d2b;p=freeside.git diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index 8326818d6..e87a8ee9a 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -79,6 +79,7 @@ Upload: <% sprintf("%.3f", $input) %> megabytes
Download: <% sprintf("%.3f", $output) %> megabytes
+ Last Login: <% $svc_acct->last_login_text %>
% my $href = qq! -function enable_change () { - if ( document.OneTrueForm.svcpart.selectedIndex > 1 ) { - document.OneTrueForm.submit.disabled = false; - } else { - document.OneTrueForm.submit.disabled = true; - } -} - -
- - -% #print qq!
Send account information!; + + + + + + +% #print qq!
Send account information!; % -% my @part_svc = (); -% if ( $pkgnum ) { -% @part_svc = grep { $_->svcdb eq 'svc_acct' -% && $_->svcpart != $part_svc->svcpart } -% $cust_pkg->available_part_svc; -% } else { -% @part_svc = qsearch('part_svc', { -% svcdb => 'svc_acct', -% disabled => '', -% svcpart => { op=>'!=', value=>$part_svc->svcpart }, -% } ); -% } +% if ( $pkgnum ) { +% @part_svc = grep { $_->svcdb eq 'svc_acct' +% && $_->svcpart != $part_svc->svcpart } +% $cust_pkg->available_part_svc; +% } else { +% @part_svc = qsearch('part_svc', { +% svcdb => 'svc_acct', +% disabled => '', +% svcpart => { op=>'!=', value=>$part_svc->svcpart }, +% } ); +% } % - +% } Service #<% $svcnum %> | Edit this service + % if ( @part_svc ) { | + % } @@ -254,7 +260,10 @@ Service #<% $svcnum %> % my $tf = $uf . "_threshold"; % if ( $svc_acct->$uf ne '' ) { % my $v = $uf eq 'seconds' -% ? (($svc_acct->$uf < 0 ? '-' : ''). duration_exact($svc_acct->$uf) ) +% #? (($svc_acct->$uf < 0 ? '-' : ''). duration_exact($svc_acct->$uf) ) +% ? ($svc_acct->$uf < 0 ? '-' : ''). +% int(abs($svc_acct->$uf)/3600). "hr ". +% sprintf("%02d",(abs($svc_acct->$uf)%3600)/60). "min" % : FS::UI::bytecount::display_bytecount($svc_acct->$uf); <% $ulabel{$uf} %> remaining @@ -329,8 +338,7 @@ Service #<% $svcnum %> <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('View customer services') - || $FS::CurrentUser::CurrentUser->access_right('View customer'); #XXX remove me + unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); my $conf = new FS::Conf; @@ -346,7 +354,9 @@ my $svc_acct = qsearchs({ 'table' => 'svc_acct', 'addl_from' => $addl_from, 'hashref' => { 'svcnum' => $svcnum }, - 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, + 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql( + 'null_right' => 'View/link unlinked services' + ), }); die "Unknown svcnum" unless $svc_acct;