X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_acct.cgi;h=6a47ec76706d4299d34b224d4d8701261d7e11f3;hb=331e3441a2eb49396ed3234da33022ce25244974;hp=971c6a4ae2487230bfd5d98ded5682d67baf5baa;hpb=aab64f96cb0f566980bb1590953102afcac3c29c;p=freeside.git diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index 971c6a4ae..6a47ec767 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 ) { | + % } @@ -208,7 +214,7 @@ Service #<% $svcnum %> % if ($svc_acct->finger ne '') { - GECOS + Real Name <% $svc_acct->finger %> % } @@ -253,8 +259,12 @@ Service #<% $svcnum %> % foreach my $uf ( keys %ulabel ) { % my $tf = $uf . "_threshold"; % if ( $svc_acct->$uf ne '' ) { -% my $v = $uf eq 'seconds' ? duration_exact($svc_acct->$uf) -% : FS::UI::bytecount::display_bytecount($svc_acct->$uf); +% my $v = $uf eq 'seconds' +% #? (($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 <% $v %> @@ -328,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; @@ -345,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;