assign a size to svc_phone.sms_account
[freeside.git] / fs_selfservice / FS-SelfService / cgi / myaccount.html
1 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
2 <%= include('header', 'My Account') %>
3
4 Hello <%= $name %>!<BR><BR>
5
6 <%= include('small_custview') %>
7
8 <BR>
9
10 <%=
11   $OUT .= qq! <B><A HREF="${url}invoices">View All Invoices</A></B> &nbsp; &nbsp; !;
12 %>
13
14 <%= if ( $balance > 0 ) {
15   if (scalar(grep $_, @hide_payment_fields)) { # this sucks
16     $OUT .= qq! <B><A HREF="${url}make_thirdparty_payment&payby_method=CC">Make a payment</A></B><BR><BR>!;
17   } else {
18     $OUT .= qq! <B><A HREF="${url}make_payment">Make a payment</A></B><BR>!;
19     foreach my $term ( sort { $b <=> $a } keys %discount_terms_hash ) {
20       my $saved = $discount_terms_hash{$term}->[1];
21       my $amount = $discount_terms_hash{$term}->[2];
22       my $savings = ( $amount + $saved > 0 )
23                     ? sprintf('%d', $saved / ( $amount + $saved ) * 100 ) : '0';
24       $OUT .= qq! <B><A HREF="${url}make_term_payment;discount_term=$term;amount=$amount">Save $savings\% by paying for $term months: $amount</A></B><BR>!;
25     }
26     $OUT .= qq! <BR>!;
27   }
28 } %>
29 <%=
30   if ( @open_invoices ) {
31     $OUT .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'.
32             '<TR><TH BGCOLOR="#ff6666" COLSPAN=5>Open Invoices</TH></TR>';
33     my $link = qq!<A HREF="<%= $url %>myaccount!;
34     my $col1 = $stripe1_bgcolor || '#ffffff';
35     my $col2 = $stripe2_bgcolor || '#dddddd';
36     my $col = $col1;
37
38     foreach my $invoice ( @open_invoices ) {
39       my $td = qq!<TD BGCOLOR="$col">!;
40       my $a=qq!<A HREF="${url}view_invoice;invnum=!. $invoice->{'invnum'}. '">';
41       $OUT .=
42         "<TR>$td${a}Invoice #". $invoice->{'invnum'}. "</A></TD>$td</TD>".
43         "$td$a". $invoice->{'date'}. "</A></TD>$td</TD>".
44         qq!<TD BGCOLOR="$col" ALIGN="right">$a\$!. $invoice->{'owed'}.
45           '</A></TD>'.
46         '</TR>';
47       $col = $col eq $col1 ? $col2 : $col1;
48     }
49     $OUT .= '</TABLE><BR>';
50   } else {
51     $OUT .= 'You have no outstanding invoices.<BR><BR>';
52   }
53 %>
54
55 <%=
56   if ( @support_services ) {
57     $OUT .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'.
58             '<TR><TH BGCOLOR="#ff6666" COLSPAN="3">Support Time Remaining</TH>'.
59             '</TR><TR><TH>Package</TH><TH></TH>'.
60             '<TH>Time Remaining</TH></TR>';
61     my $col1 = $stripe1_bgcolor || '#ffffff';
62     my $col2 = $stripe2_bgcolor || '#dddddd';
63     my $col = $col1;
64
65     foreach my $support ( @support_services ) {
66       my $td = qq!<TD BGCOLOR="$col">!;
67       my $a = qq!<A HREF="${url}view_support_details;svcnum=!.
68               $support->{'svcnum'}. '">';
69       $OUT .=
70         "<TR>".
71           $td.$a. $support->{'pkg'}. "</A></TD>".
72           $td.'&nbsp;</TD>'.
73           $td.$a. $support->{'time'}. "</A></TD>".
74         '</TR>';
75       $col = $col eq $col1 ? $col2 : $col1;
76     }
77     $OUT .= '</TABLE><BR>';
78   } else {
79     $OUT .= '';
80   }
81 %>
82
83 <%= if (@tickets) {
84       $OUT .= include('ticket_summary');
85     } else {
86       $OUT .= '';
87     }
88 %>
89
90 <%= include('footer') %>