X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fview_usage.html;h=4099a57f514fcb8bb9a41e5d4d73ac07b55c01b2;hb=573a1f97af61acd6d31c70321acbf7bb06bbcebf;hp=35d128998436d5f3324479fff2aa1be53407c67c;hpb=d04c981b5f72ffadabde71af68022059af0d52a5;p=freeside.git
diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage.html b/fs_selfservice/FS-SelfService/cgi/view_usage.html
index 35d128998..4099a57f5 100644
--- a/fs_selfservice/FS-SelfService/cgi/view_usage.html
+++ b/fs_selfservice/FS-SelfService/cgi/view_usage.html
@@ -1,8 +1,9 @@
-<%= $url = "$selfurl?session=$session_id;action=";
+<%= $url = "$selfurl?action=";
%by_pkg_label = (); # not used yet, but I'm sure it will be...
@svc_acct = ();
@svc_phone = ();
@svc_port = ();
+ @svc_pbx = ();
foreach (@svcs) {
$by_pkg_label{ $_->{pkg_label} } ||= [];
@@ -13,6 +14,8 @@
push @svc_phone, $_;
} elsif ( $_->{svcdb} eq 'svc_port' ) {
push @svc_port, $_;
+ } elsif ( $_->{svcdb} eq 'svc_pbx' ) {
+ push @svc_pbx, $_;
}
}
'';
@@ -74,10 +77,10 @@
<%= scalar(@svc_acct) ? '
' : '' %>
-<%= if ( @svc_phone ) {
+<%= if ( @svc_phone or @svc_pbx ) {
%any = ();
for my $dir (qw(outbound inbound)) {
- $any{$dir} = grep { $_->{$dir} } @svc_phone;
+ $any{$dir} = grep { $_->{$dir} } (@svc_phone, @svc_pbx);
}
$OUT.= 'Call usage
'. $svc_phone->{'label'}. ': '. $svc_phone->{'value'}; +<%= foreach my $svc_x ( @svc_phone, @svc_pbx ) { + my $link = $url . 'view_cdr_details;' . + 'svcnum='.$svc_x->{'svcnum'}. + ';beginning=0;ending=0'; + $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_phone->{$dir} ) { + if ( $svc_x->{$dir} ) { $OUT .= ''.qq!! . sprintf('%d calls (%.0f minutes)', - $svc_phone->{$dir}->{'count'}, - $svc_phone->{$dir}->{'duration'} / 60 + $svc_x->{$dir}->{'count'}, + $svc_x->{$dir}->{'duration'} / 60 ) . ' | '; } elsif ( $any{$dir} ) { @@ -154,7 +158,7 @@ '* shared among all your phone plans |