From 8da6efb71ff599762d145904c613ae75d98b10dd Mon Sep 17 00:00:00 2001
From: Jonathan Prykop
Date: Fri, 3 Jul 2015 19:46:00 -0500
Subject: RT#34078: Payment History Report / Statement [various fixes,
integrated with selfservice]
---
fs_selfservice/FS-SelfService/cgi/history.html | 41 +++++---------------------
1 file changed, 8 insertions(+), 33 deletions(-)
(limited to 'fs_selfservice/FS-SelfService')
diff --git a/fs_selfservice/FS-SelfService/cgi/history.html b/fs_selfservice/FS-SelfService/cgi/history.html
index 605bc1cf5..0b6f9ceda 100644
--- a/fs_selfservice/FS-SelfService/cgi/history.html
+++ b/fs_selfservice/FS-SelfService/cgi/history.html
@@ -1,39 +1,14 @@
<%= include('header', 'Payment History') %>
<%=
-my $balance = 0;
-my $style = 'text-align: left; margin: 0; padding: 0 1em 0 0;';
-my $moneystyle = 'text-align: right; margin: 0; padding: 0 1em 0 0;';
-my $col1 = "#ffffff";
-my $col2 = "#dddddd";
-my $col = $col1;
-foreach my $item (@history) {
- $balance += $$item{'amount'};
- $$item{'amount'} =~ s/^(-?)/$1$money_char/;
- $out .= <
- | $$item{'date_pretty'} |
- $$item{'description'} |
- $$item{'amount'} |
-
-EOF
- $col = $col eq $col1 ? $col2 : $col1;
-}
-$balance = sprintf('%.2f',$balance);
-$balance =~ s/^(-?)/$1$money_char/;
-$out = <Balance: $balance
-
-
- | Date |
- Description |
- Amount |
-
-$out
-
-EOF
+my $out = mason_comp(
+ 'session_id' => $session_id,
+ 'comp' => '/elements/customer-statement.html',
+ 'args' => [
+ 'history' => \@history,
+ ]
+);
+$out->{'output'} || $out->{'error'};
%>
-
-
<%= include('footer') %>
--
cgit v1.2.1