X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fview_usage.html;h=2b9eb8bc2c58faf889c7f4adec1efe522f0ef10c;hb=f822e27a1e00594332ffa487a1c284234c5580a6;hp=b78f9975b3e29ffed5218d9e9c75b9d2c35323e4;hpb=8e219ac3d60ba254c9bbc40adfeb2ebe40fd2b5f;p=freeside.git diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage.html b/fs_selfservice/FS-SelfService/cgi/view_usage.html index b78f9975b..2b9eb8bc2 100644 --- a/fs_selfservice/FS-SelfService/cgi/view_usage.html +++ b/fs_selfservice/FS-SelfService/cgi/view_usage.html @@ -1,58 +1,238 @@ -
Account | -Time remaining | -Upload remaining | -Download remaining | -Total remaining | -||||
---|---|---|---|---|---|---|---|---|
'; - $OUT .= qq!!. $svc->{'label'}. ': '. $svc->{'value'}.''; - $OUT .= ' | '; - $OUT .= $svc->{'seconds'}; - $OUT .= ' | '; - $OUT .= $svc->{'upbytes'}; - $OUT .= ' | '; - $OUT .= $svc->{'downbytes'}; - $OUT .= ' | '; - $OUT .= $svc->{'totalbytes'}; - $OUT .= ' |
Account | '; + $OUT .= 'Time used | ' if $bytes_show{'seconds_used'}; + $OUT .= 'Time remaining | ' if $bytes_show{'seconds'}; + $OUT .= 'Upload used | ' if $bytes_show{'upbytes_used'}; + $OUT .= 'Upload remaining | ' if $bytes_show{'upbytes'}; + $OUT .= 'Download used | ' if $bytes_show{'downbytes_used'}; + $OUT .= 'Download remaining | ' if $bytes_show{'downbytes'}; + $OUT .= 'Total used | ' if $bytes_show{'totalbytes_used'}; + $OUT .= 'Total remaining | ' if $bytes_show{'totalbytes'}; + $OUT .= '
---|---|---|---|---|---|---|---|---|
' . qq!!. $svc->{'label'}. ': '. $username .' | '; + foreach my $field (@bytes_cols) { + $OUT .= '' . $svc->{$field} . ' | ' if $bytes_show{$field}; + } if ( $svc->{'recharge_amount'} ) { my $link = "${url}process_order_recharge;". "svcnum=$svc->{'svcnum'}"; - $OUT .= '|||||||
'; + $OUT .= ' | ||||||||
'; $OUT .= qq!!.'Recharge for $'; $OUT .= $svc->{'recharge_amount'} . ' with'; - $OUT .= ' | '; - $OUT .= $svc->{'recharge_seconds'} if $svc->{'recharge_seconds'}; - $OUT .= ' | '; - $OUT .= $svc->{'recharge_upbytes'} if $svc->{'recharge_upbytes'}; - $OUT .= ' | '; - $OUT .= $svc->{'recharge_downbytes'} if $svc->{'recharge_downbytes'}; - $OUT .= ' | '; - $OUT .= $svc->{'recharge_totalbytes'} if $svc->{'recharge_totalbytes'}; - $OUT .= ' | ' if $bytes_show{$field.'_used'}; + if ($bytes_show{$field}) { + $OUT .= ' | '; + $OUT .= $svc->{'recharge_'.$field} if $svc->{'recharge_'.$field}; + $OUT .= ' | '; + } + } + $OUT .= ''; + } + } + if ((@bytes_svcs > 1) and (grep { $bytes_show{$_.'_used'} } qw(seconds upbytes downbytes totalbytes) )) { + $OUT .= '||
Total Used | '; + foreach my $field (@bytes_cols) { + if ($bytes_show{$field}) { + $OUT .= ''; + $OUT .= $bytes_used_total{$field} || '0' if $field =~ /_used$/; + $OUT .= ' | '; + } } - } %> + $OUT .= '
Number | '; + if ( $any{outbound} ) { + $OUT .= ' +Dialed | '; + } + if ( $any{inbound} ) { + $OUT .= ' +Received | '; + } + $OUT .= '
---|---|---|
'. $svc_x->{'label'}. ': '. $svc_x->{'value'}; + $OUT .= ' | '; + # usage summary w/ links + for my $dir (qw(outbound inbound)) { + if ( $dir eq 'inbound' ) { + $link .= ';inbound=1'; + } + if ( $svc_x->{$dir} ) { + $OUT .= ''.qq!! . + sprintf('%d calls (%.0f minutes)', + $svc_x->{$dir}->{'count'}, + $svc_x->{$dir}->{'duration'} / 60 + ) . + ' | '; + } elsif ( $any{$dir} ) { + $OUT .= ''; + } + } + $OUT .= ' |
Remaining minutes | |||
---|---|---|---|
$description | +$remain | +/ | +$total | +
* shared among all your phone plans |
Service | ++ | +
---|---|
'. $svc_port->{'label'}. ': '. $svc_port->{'value'}.' | '; + $OUT .= qq!