default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / fs_selfservice / FS-SelfService / cgi / invoices.html
1 <%= $url = "$selfurl?action="; ''; %>
2 <%= include('header', 'All Invoices') %>
3
4 <%=
5   if ( @invoices ) {
6     my $th  = q!<TH STYLE="background: #ff9999; text-align: left; padding: .1em .5em;">!;
7     my $thr = q!<TH STYLE="background: #ff9999; text-align: right; padding: .1em .5em;">!;
8     $OUT .= '<TABLE STYLE="border: 0;" CELLSPACING="0">'.
9             '<TR>'.$th.'Invoice #</TH>'.$th.'Date</TH>'.$thr.'Charges</TH>'
10             .$th.'Date Paid</TH>'.$thr.'Owed</TH></TR>';
11     my $col1 = "#ffffff";
12     my $col2 = "#dddddd";
13     my $col = $col1;
14
15     foreach my $invoice ( @invoices ) {
16       my $td  = qq!<TD STYLE="background: $col; padding: .1em .5em;">!;
17       my $tdr = qq!<TD STYLE="background: $col; padding: .1em .5em; text-align: right;">!;
18       my $a=qq!<A HREF="${url}view_invoice;invnum=!. $invoice->{'invnum'}. '">';
19       $OUT .=
20         "<TR>".
21         $td . $a . $invoice->{'invnum'}. "</A></TD>" .
22         $td . $a . $invoice->{'date'} . "</A></TD>" .
23         $tdr . $a . $money_char . $invoice->{'charged'} . "</A></TD>" .
24         $td . $a . $invoice->{'lastpay'} . "</A></TD>" .
25         $tdr . $a . $money_char . $invoice->{'owed'} . "</A></TD>" .
26         '</TR>';
27       $col = $col eq $col1 ? $col2 : $col1;
28     }
29     my $tht = '<TH COLSPAN="4" STYLE="background: #ff9999; padding: .1em .5em; text-align: right;">';
30     $OUT .= '<TR>'.$tht.'BALANCE DUE</TH>'.$tht.$money_char.$balance.'</TH></TR>';
31     $OUT .= '</TABLE><BR>';
32   } else {
33     $OUT .= '<P>You have no invoices.</P>';
34   }
35 %>
36
37 <%= include('footer') %>