Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / fs_selfservice / FS-SelfService / cgi / view_cdr_details.html
1 <%= include('header', ($inbound ? 'Received calls' : 'Dialed calls' ) . 
2                        ' for '.
3                        Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $beginning).
4                        ' - '.
5                        Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $ending)
6            )
7 %>
8
9 <%= if ( $error ) {
10   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
11 } ''; %>
12
13 <TABLE WIDTH="100%">
14   <TR>
15     <TD WIDTH="50%">
16 <%= if ($previous < $beginning) {
17     $OUT .= qq!<A HREF="${url}view_cdr_details;svcnum=$svcnum;beginning=!;
18     $OUT .= qq!$previous;ending=$beginning">Previous period</A>!;
19     }else{
20       '';
21     } %>
22     </TD>
23     <TD  WIDTH="50%" ALIGN="right">
24 <%= if ($next > $ending) {
25     $OUT .= qq!<A HREF="${url}view_cdr_details;svcnum=$svcnum;beginning=!;
26     $OUT .= qq!$ending;ending=$next">Next period</A>!;
27     }else{
28       '';
29     }%>
30     </TD>
31   </TR>
32 </TABLE>
33 <TABLE BGCOLOR="#cccccc">
34   <TR>
35 <%= $space = '<TD>&nbsp;</TD>';
36   $OUT .= join($space, 
37     map { '<TH ALIGN="right">'.$_.'</TH>' } 
38     @header
39   )
40 %>
41   </TR>
42 <%= my $total = 0;
43     my $utotal = 0;
44     my $dtotal = 0;
45     foreach my $usage ( @usage ) {
46       $OUT .= '<TR>';
47       $OUT .= join($space,
48         map { "<TD>$_</TD>" } @{$usage}
49       );
50       $OUT .= '</TR>';
51     }
52 %>
53
54 </TABLE>
55 <BR>
56
57 <%= include('footer') %>