X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fmyaccount.html;h=524be1f6a25d6881877700f0b29ef2bebb47e969;hp=d6527fe76e3bd1cc8e9349d40d82ad0c2d701816;hb=f32ac83068c6211f829f1688a1a9cdec71bc6ec7;hpb=99100d7e0d0b22a1844dde88acd529e79d096463 diff --git a/fs_selfservice/FS-SelfService/cgi/myaccount.html b/fs_selfservice/FS-SelfService/cgi/myaccount.html index d6527fe76..524be1f6a 100644 --- a/fs_selfservice/FS-SelfService/cgi/myaccount.html +++ b/fs_selfservice/FS-SelfService/cgi/myaccount.html @@ -1,66 +1,83 @@ -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('header') %> +<%= $url = "$selfurl?action="; ''; %> +<%= include('header', 'My Account') %> Hello <%= $name %>!

-<%= $small_custview %> + +<%= include('small_custview') %> +
-<%= if ( $pkgnum ) { - $OUT .= qq!Balance: \$$balance

!; - } - ''; + +<%= + $OUT .= qq! View All Invoices     !; %> <%= if ( $balance > 0 ) { - if (scalar(grep $_, @hide_payment_fields)) { + if (scalar(grep $_, @hide_payment_fields)) { # this sucks $OUT .= qq! Make a payment

!; } else { - $OUT .= qq! Make a payment

!; + $OUT .= qq! Make a payment
!; + foreach my $term ( sort { $b <=> $a } keys %discount_terms_hash ) { + my $saved = $discount_terms_hash{$term}->[1]; + my $amount = $discount_terms_hash{$term}->[2]; + my $savings = ( $amount + $saved > 0 ) + ? sprintf('%d', $saved / ( $amount + $saved ) * 100 ) : '0'; + $OUT .= qq! Save $savings\% by paying for $term months: $amount
!; + } + $OUT .= qq!
!; } } %> <%= if ( @open_invoices ) { - $OUT .= ''. - ''; - my $link = qq!!; + my $thr = q!
Open Invoices
!; + $OUT .= ''. + ''. + ''.$th.'Invoice #'.$th.'Date'.$thr.'Charges' + .$thr.'Owed'; + my $col1 = "#ffffff"; + my $col2 = "#dddddd"; my $col = $col1; foreach my $invoice ( @open_invoices ) { - my $td = qq!$td${a}Invoice #". $invoice->{'invnum'}. "$td". - "$td$a". $invoice->{'date'}. "$td". - qq!'. + "". + $td . $a . $invoice->{'invnum'}. "" . + $td . $a . $invoice->{'date'} . "" . + $tdr . $a . $money_char . $invoice->{'charged'} . "" . + $tdr . $a . $money_char . $invoice->{'owed'} . "" . ''; $col = $col eq $col1 ? $col2 : $col1; } $OUT .= '
Open Invoices
!; + my $td = qq!!; + my $tdr = qq!!; my $a=qq!'; $OUT .= - "
$a\$!. $invoice->{'owed'}. - '

'; } else { - $OUT .= 'You have no outstanding invoices.

'; + $OUT .= '

You have no outstanding invoices.

'; } %> +<%= $announcement || '' %> + <%= if ( @support_services ) { $OUT .= ''. ''. - ''. + ''. ''; - my $col1 = "ffffff"; - my $col2 = "dddddd"; + my $col1 = $stripe1_bgcolor || '#ffffff'; + my $col2 = $stripe2_bgcolor || '#dddddd'; my $col = $col1; foreach my $support ( @support_services ) { - my $td = qq!$td$a". $support->{'pkgnum'}. "". - $td.$a. $support->{'pkg'}. "". - $td.$a. $support->{'time'}. "". + "". + $td.$a. $support->{'pkg'}. "". + $td.' '. + $td.$a. $support->{'time'}. "". ''; $col = $col eq $col1 ? $col2 : $col1; } @@ -70,31 +87,11 @@ Hello <%= $name %>!

} %> -<%= - if ( @tickets ) { - $OUT .= '
Support Time Remaining
#Package
PackageTime Remaining
!; + my $td = qq!!; my $a = qq!'; $OUT .= - "
'. - ''. - ''. - ''; - my $col1 = "ffffff"; - my $col2 = "dddddd"; - my $col = $col1; - - foreach my $ticket ( @tickets ) { - my $td = qq!$td". $ticket->{'id'}. "". - $td. $ticket->{'subject'}. "". - $td. ($ticket->{'content'} || $ticket->{'priority'}). "". - $td. $ticket->{'queue'}. "". - $td. $ticket->{'status'}. "". - ''; - $col = $col eq $col1 ? $col2 : $col1; +<%= if (@tickets) { + $OUT .= include('ticket_summary'); + } else { + $OUT .= ''; } - $OUT .= '
Open Tickets
#SubjectPriorityQueueStatus
!; - $OUT .= - "
'; - } else { - $OUT .= ''; - } %> <%= include('footer') %>