This commit was generated by cvs2svn to compensate for changes in r11022,
[freeside.git] / fs_selfservice / FS-SelfService / cgi / view_support_details.html
1 <HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
2 <BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
3 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
4 <%= include('myaccount_menu') %>
5 <TD VALIGN="top">
6
7 <FONT SIZE=4>Support usage details for
8 <%= Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $beginning) %> -
9 <%= Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $ending) %>
10 </FONT><BR><BR>
11
12 <%= if ( $error ) {
13   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
14 } ''; %>
15  
16 <TABLE WIDTH="100%">
17   <TR>
18     <TD WIDTH="50%">
19 <%= if ($previous < $beginning) {
20     $OUT .= qq!<A HREF="${url}view_support_details;svcnum=$svcnum;beginning=!;
21     $OUT .= qq!$previous;ending=$beginning">Previous period</A>!;
22     }else{
23       '';
24     } %>
25     </TD>
26     <TD  WIDTH="50%" ALIGN="right">
27 <%= if ($next > $ending) {
28     $OUT .= qq!<A HREF="${url}view_support_details;svcnum=$svcnum;beginning=!;
29     $OUT .= qq!$ending;ending=$next">Next period</A>!;
30     }else{
31       '';
32     }%>
33     </TD>
34   </TR>
35 </TABLE>
36 <TABLE BGCOLOR="#cccccc">
37   <TR>
38     <TH ALIGN="left">Ticket</TH>
39     <TH ALIGN="center">Subject</TH>
40     <TH ALIGN="center">Staff</TH>
41     <TH ALIGN="center">Date</TH>
42     <TH ALIGN="center">Status</TH>
43     <TH ALIGN="right">Time</TH>
44   </TR>
45 <%= my $total = 0;
46     foreach my $usage ( @usage ) {
47   $OUT .= '<TR><TD ALIGN="left">';
48     $OUT .= $usage->{'ticketid'};
49     $OUT .= '</TD><TD ALIGN="right">';
50     $OUT .= $usage->{'subject'};
51     $OUT .= '</TD><TD ALIGN="right">';
52     $OUT .= $usage->{'creator'};
53     $OUT .= '</TD><TD ALIGN="left">';
54     $OUT .= Date::Format::time2str('%T%P %a&nbsp;%b&nbsp;%o&nbsp;%Y', $usage->{'_date'});
55     $OUT .= '</TD><TD ALIGN="right">';
56     $OUT .= $usage->{'status'};
57     $OUT .= '</TD><TD ALIGN="right">';
58     my $duration =  $usage->{'support'};
59     $total += $usage->{'support'};
60     my $h = int($duration/3600);
61     my $m = sprintf("%02d", int(($duration % 3600) / 60));
62     my $s = sprintf("%02d", $duration % 60);
63     $OUT .=  $usage->{'support'} < 0 ? '-' : '';
64     $OUT .=  "$h:$m:$s";
65   $OUT .= '</TD></TR>';
66   }
67   my $h = int($total/3600);
68   my $m = sprintf("%02d", int(($total % 3600) / 60));
69   my $s = sprintf("%02d", $total % 60);
70   $OUT .=  qq!<TR><TD COLSPAN="5"></TD><TD ALIGN="right"><HR></TD></TR>!;
71   $OUT .=  qq!<TR><TD COLSPAN="5"></TD><TD ALIGN="right">$h:$m:$s</TD></TR>!;
72   %>
73
74 </TABLE>
75 <BR>
76
77 </TD></TR></TABLE>
78 <%= include('footer') %>